text stringlengths 10 953k |
|---|
export function escapeHtml(unsafe: string): string {
return unsafe
.replace(/&/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/"/g, '"')
.replace(/'/g, ''');
} |
export const container: string;
export const label: string;
export const active: string;
export const inputWrapper: string;
export const input: string;
export const inputHelp: string;
export const helpIcon: string;
export const helpMessage: string; |
import { getProperties } from './src/methods/turkish';
import * as Tenses from './src/tenses';
import {
convertToNegative,
isAlphabeticallyValid,
isTurkishVerb,
} from './src/methods/verbVerification';
const getConjugations = (verb) => {
const props = getProperties(verb);
const negativeProps = getProperties(... |
import { ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges, ViewContainerRef } from '@angular/core';
import { BsDaterangepickerConfig } from './bs-daterangepicker.config';
import { Subscription } from 'rxjs';
import { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';
import ... |
import * as React from "react";
export enum HTMLTags {
a = "a",
abbr = "abbr",
address = "address",
area = "area",
article = "article",
aside = "aside",
audio = "audio",
b = "b",
base = "base",
bdi = "bdi",
bdo = "bdo",
blockquote = "blockquote",
body = "body",
br = "br",
button = "button... |
import * as fetchMock from "fetch-mock";
import { hubRequestDatasetExport } from "../../src/hub/hub-request-dataset-export";
describe("hubRequestDatasetExport", () => {
afterEach(() => fetchMock.restore());
it("handle remote server 502 error", async done => {
try {
fetchMock.post(
"http://hub.co... |
import { GetStaticProps } from 'next';
import styled from 'styled-components';
import { Team } from '~/domains';
import { ProecoOgpHead } from '~/components/parts/layout/ProecoOgpHead';
import { TeamPageLayout } from '~/components/parts/layout/TeamPageLayout';
import { TeamHomeTab } from '~/components/domains/team/T... |
interface IBookmark {
id: number;
title: string;
description: string;
type: string;
url: string;
image_url: string;
user_id: number;
is_active: boolean;
views: number;
created_at: string;
updated_at: string;
}
export default IBookmark; |
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
import React from 'react';
import CompanyInfo from '../components/marketingPage/CompanyInfo';
import Card from '../components/marketingPage/Card';
import marketingCards from '../utils/marketingCardArray';
import ContactForm from '../components/marketingPage/ContactForm';
import Help from '../components/marketingPage/He... |
/* This is stub file for gapi.client.{{=it.name}} definition tests */
/* IMPORTANT.
* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually.
* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator
*... |
export = IpnsPubsubDatastore;
declare class IpnsPubsubDatastore {
/**
* @param {import('libp2p-interfaces/src/pubsub')} pubsub
* @param {import('interface-datastore').Datastore} localDatastore
* @param {import('peer-id')} peerId
*/
constructor(pubsub: import('libp2p-interfaces/src/pubsub'), ... |
import React from 'react'
import { mount } from 'enzyme'
import { Spinner } from 'components'
describe('Spacer', () => {
it('should render correctly', () => {
const wrapper = mount(<Spinner />)
expect(wrapper.html()).toMatchSnapshot()
expect(() => wrapper.unmount()).not.toThrow()
})
it('should work ... |
import { Maps } from "../../types/types";
import * as React from "react";
import { Box } from "@mui/system";
import MapSelector from "./MapSelector";
type Props = {
maps: Maps;
};
const MapView = ({ maps }: Props) => {
console.log("Maps render: ", maps);
return maps ? (
<>
<Box>Maps</Box>
{maps... |
import * as React from 'react';
import MoveCopy16 from './MoveCopy16';
export const moveCopy16 = () => <MoveCopy16 />;
export default {
title: 'Icon|Fill|MoveCopy16',
component: MoveCopy16,
parameters: {
notes: "`import MoveCopy16 from 'box-ui-elements/es/icon/fill/MoveCopy16';`",
},
}; |
import * as React from "react";
import { Provider, Flex, Text, Button, Header, Input } from "@fluentui/react-northstar";
import { useState, useEffect } from "react";
import { useTeams } from "msteams-react-base-component";
import * as microsoftTeams from "@microsoft/teams-js";
/**
* Implementation of the YouTube Play... |
import { Neovim, Window } from '@chemzqm/neovim'
import log4js from 'log4js'
import { CancellationToken, CompletionTriggerKind, CreateFileOptions, DeleteFileOptions, Diagnostic, DidChangeTextDocumentParams, Disposable, DocumentSelector, Event, FormattingOptions, Location, Position, Range, RenameFileOptions, TextDocumen... |
import React from 'react';
import * as routes from 'routes';
import pluralize from 'pluralize';
import Card from 'components/Card';
import CardContentTitle from 'components/Card/CardContentTitle';
import RelationCounts from 'components/RelationCounts';
import { MenuConfigItem } from 'components/Card/CardMenu';
import ... |
import React from 'react';
import { render } from '@testing-library/react';
import { BrowserRouter } from 'react-router-dom';
import { EditCohortPage } from './edit.page';
describe('CohortManagementPage', () => {
it('renders without errors', () => {
const { baseElement } = render(
<BrowserRout... |
import { Button } from "../components/Button";
import { OpenedBook } from "../components/Opened-book";
type handleChange = () => void;
export class RulebookPage {
constructor(
private handleChangeToSettings: handleChange,
private handleChangeToWelcome: handleChange,
private handleChangeToQuiz: handleCha... |
import { Stack, StackProps } from "@aws-cdk/core"
import { FoundationStack, PipelineFoundationStack } from "./foundation"
import { ContextEnv } from "./context-env"
import { Environment } from "@aws-cdk/cx-api"
export type Stacks = { [key: string]: Stack } |
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
title = 'clean-angular';
} |
import {Game} from './game';
import {ExternalConnectionWebSocket} from './net/external-connection/websocket';
import {Room} from './net/room';
import {ConnectionEvents} from './net/external-connection/external-connection';
import {Client} from './net/client';
declare const WS_SERVER: string;
window.addEventListener('... |
import { EditorManager } from "@theia/editor/lib/browser";
import { inject, injectable } from "inversify";
import { DiagramLanguageClient } from "sprotty-theia/lib/theia/languageserver";
import { FlogoLanguageClientContribution } from "../flogo-dsl-language-client-contribution";
@injectable()
export class FlogoDiagram... |
import { Request, Response, NextFunction } from 'express';
import * as jwt from '../utils/jwt';
import logger from '../utils/logger';
import config from '../config/config';
import ErrorType from './../resources/enums/ErrorType';
import BadRequestError from '../exceptions/BadRequestError';
import UnauthorizedError from... |
import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {AdminComponent} from '@modules/admin/components/admin/admin.component';
const routes: Routes = [{
path: '',
component: AdminComponent
}];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports:... |
import { UserService } from './UserService';
const model = { name: 'teresa teng' };
const userService = new UserService(model);
console.log(userService.model.name); |
import { StatusLabelComponent } from './status-label.component';
describe('StatusLabelComponent', () => {
let component: StatusLabelComponent;
beforeEach(() => {
component = new StatusLabelComponent();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should get the right S... |
import CPK, { EthersAdapter, Transaction } from "contract-proxy-kit";
import React, { useContext, useCallback, useEffect, useState } from "react";
import { SafeAppWeb3Modal as Web3Modal } from "@gnosis.pm/safe-apps-web3modal";
import { EthereumAuthProvider, ThreeIdConnect } from "@3id/connect";
import WalletConnectPro... |
import { IInitData } from '../../reducers/Common/Init';
import { PRICE_MODE_DEFAULT } from '../../constants/Environment';
export const parseStoreResponse = (data: any): IInitData => {
const result: IInitData = {
priceMode: null,
currency: null,
store: null,
locale: null,
timeZone: null,
};
... |
/** Module dependencies. */
import * as http from 'http';
import * as fs from 'fs';
import * as rootPath from 'app-root-path';
import './env';
import {VinemaApi} from '../src/server';
import {NODE_ENV, PORT} from '../src/lib/constant';
import logger from '../src/config/winston';
/** Create log file */
try {
fs.mkd... |
import * as React from "react";
import { assertNever, maybe } from "../common/support";
import { clamp } from "lodash-es";
import DataGridOverlayEditor from "../data-grid-overlay-editor/data-grid-overlay-editor";
import {
EditableGridCell,
GridCell,
GridCellKind,
GridDragEventArgs,
GridKeyEventArgs,... |
import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { IUser } from 'src/interface';
import { AuthService } from '../shared/components/services/auth.service';
@Component({
selector: 'app-login-page',
... |
// Copyright 2017-2020 @polkadot/react-components authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
/* eslint-disable camelcase */
import { I18nProps } from '@polkadot/react-components/types';
import { CodeStored } f... |
import { Animation, AnimationEasing, type AnimationParams } from '$types/animation';
import type { UserNicknameColor } from '$types/nickname';
import type { ChatType, Settings } from '$types/settings';
import * as easing from 'svelte/easing';
import { writable } from 'svelte/store';
import type { EasingFunction } from ... |
import services from '../services';
describe('Services: {{{scaffold_entities}}}', () => {
const config = {
get: (): unknown => jest.fn(),
};
const {{{scaffold_entity}}} = {
name: 'Bolatan Ibrahim',
id: '5c3cab69ffb5bd22494a8484',
};
const json = jest.fn().mockReturnValue(() => {{{scaffold_entity... |
import * as React from "react";
import { IEmojiProps } from "../../styled";
const SvgPersonRole276 = (props: IEmojiProps) => (
<svg viewBox="0 0 72 72" width="1em" height="1em" {...props}>
<path
fill="#9B9B9A"
d="M50.903 27.532c0 1.225-.147 2.416-.424 3.556-1.597 6.568-7.517 11.444-14.576 11.444s-12.... |
import { defineStore } from "pinia";
export const useHelpStore = defineStore("help", {
state: () => ({
visible: false,
}),
actions: {
toggle() {
this.visible = !this.visible;
},
show() {
this.visible = true;
},
},
}); |
import React from 'react';
export declare const PathBack: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>; |
import { Document } from 'mongoose'
export interface IFingerprint extends Document {
readonly blockStart: number
readonly blockEnd: number
readonly fingerprint: string
readonly cumulativeFingerprint: string
readonly transactionHash: string
} |
import { JsonRpcProvider } from "@ethersproject/providers";
import { utils } from "ethers";
const GAS = "10";
export const getGasPrice = async (provider: JsonRpcProvider) => {
const gasPrice = await provider.getGasPrice();
const convertGas = utils.parseUnits(GAS, "gwei");
return gasPrice.add(convertGas);
... |
import { BgImgDirective } from './bg-img.directive';
describe('BgImgDirective', () => {
it('should create an instance', () => {
const directive = new BgImgDirective();
expect(directive).toBeTruthy();
});
}); |
import { Command, ValidationError } from "../../command/mod.ts";
const cmd = new Command()
.throwErrors() // <-- throw also validation errors.
.option("-p, --pizza-type <type>", "Flavour of pizza.")
.action(() => {
throw new Error("Some error happened.");
});
try {
cmd.parse();
} catch (error) {
if (e... |
export { default as constants } from './constants'
/* Functions */
export { buildTreeFromOrderedNodeIds } from './buildTreeFromOrderedNodeIds'
export { fetchTree } from './fetchTree'
export { fetchEquipmentTypes } from './fetchEquipmentTypes'
export { fetchTreeData } from './fetchTreeData'
export { fetchUsers } from '... |
import { Injectable } from '@nestjs/common';
import * as fs from 'fs';
import * as PdfPrinter from 'pdfmake';
import { v4 as uuidv4 } from 'uuid';
import { OperationsService } from '../operations/operations.service';
import { Operation } from '../models/operation.entity';
@Injectable()
export class PdfGeneratorService... |
const types: any = {
Standard: { id: 1, x: 0, y: 0 },
Lift: { id: 36 },
RaceFinish: { id: 38 },
Safehouse: { id: 40 },
PoliceHelicopter: { id: 43 },
ChatBubble: { id: 47 },
Garage2: { id: 50 },
Drugs: {},
Store: {},
PoliceCar: { id: 56 },
PoliceStation: { id: 60, x: 12, y: 0 },
Hospital: {},
H... |
import { AccordionDetails } from '@gnosis.pm/safe-react-components'
import React, { ReactElement, useContext, useEffect, useState } from 'react'
import { Transaction } from 'src/logic/safe/store/models/types/gateway.d'
import { useTransactionActions } from 'src/routes/safe/components/Transactions/TxList/hooks/useTrans... |
import JSBI from 'jsbi'
import { SolidityType } from '../constants'
import { validateSolidityTypeInstance } from '../utils'
/**
* A currency is any fungible financial instrument on Ethereum, including Ether and all ERC20 tokens.
*
* The only instance of the base class `Blockchain` is Ether.
*/
export class Blockch... |
import GeoLocation from './GeoLocation';
import { DBObject, getSchema, ModelName, Schema, Types } from '../@pyro/db';
import IUser, { IUserCreateObject } from '../interfaces/IUser';
import { Entity, Column } from 'typeorm';
/**
* Customer who make orders
* TODO: historically called 'User', but we will rename to 'Cus... |
import React from 'react';
import { shallow } from 'enzyme';
import { LoadingPanel } from '@fpsak-frontend/shared-components';
import { RestApiState } from '@fpsak-frontend/rest-api-hooks';
import FaktaPanelWrapper from './FaktaPanelWrapper';
describe('<FaktaMeny>', () => {
it('skal ikke vise panel når det ikke er... |
import modal from './modal'
import debounce from './debounce'
import { hasFiles } from './files'
import { objectToFormData } from './formData'
import { default as Axios, AxiosResponse } from 'axios'
import { hrefToUrl, mergeDataIntoQueryString, urlWithoutHash } from './url'
import { ActiveVisit, GlobalEvent, GlobalEven... |
// There's no good way to make this type safe.
// import { property } from "./property";
//
// describe("property()", () => {
// //
// // stolen from https://github.com/lodash/lodash
// //
//
// it("should create a function that plucks a property value of a given object", () => {
// const object = { a: 1 }... |
import { Framework, Util } from "@igniteui/cli-core";
const templatesLocation = "../../packages/cli/templates/react";
describe("React templates", () => {
// tslint:disable-next-line:only-arrow-functions
it("Templates should have IDs", async function(done) {
const reactFramework = require(templatesLocation);
exp... |
import { v4 as uuidv4 } from "uuid";
import moment from "moment";
import { Column } from "PersonalKanban/types";
export const getId = (): string => {
return uuidv4();
};
export const reorder = (list: any[], startIndex: number, endIndex: number) => {
const result = Array.from(list);
const [removed] = result.spl... |
import ClassMod from '../ClassMod'
export const Class_Seraph: ClassMod = {
key: 'Class_Seraph',
name: 'Seraph',
religious: true,
originalHero: false,
resistances: {
stun: 0.4,
blight: 0.1,
bleed: 0.5,
disease: 0.2,
move: 0.4,
debuff: 0.3,
deat... |
export default interface PlayerBan {
SteamId: string;
CommunityBanned: boolean;
VACBanned: boolean;
NumberOfVACBans: number;
DaysSinceLastBan: number;
NumberOfGameBans: number;
EconomyBan: string;
} |
import { AxiosRequestConfig, AxiosPromise, AxiosResponse } from '../types'
import { parseHeaders } from '../helpers/header'
import { createError } from '../helpers/error'
export default function xhr(config: AxiosRequestConfig): AxiosPromise {
return new Promise((resolve, reject) => {
const { data = null, url, me... |
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors ma... |
/// <reference path='..\..\..\src\harness\harness.ts' />
/// <reference path='..\..\..\src\compiler\diagnostics.ts' />
/// <reference path='..\runnerbase.ts' />
class CompilerBaselineRunner extends RunnerBase {
private basePath = 'tests/cases';
private errors: boolean;
private emit: boolean;
private d... |
/*
* Copyright by LunaSec (owned by Refinery Labs, Inc)
*
* Licensed under the Business Source License v1.1
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* https://github.com/lunasec-io/lunasec/blob/master/licenses/BSL-LunaTrace.tx... |
import React from 'react';
import createSvgIcon from './helpers/createSvgIcon';
export default createSvgIcon(
<>
<path d="M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zm-2 5.79V18h-3.52L12 20.48 9.52 18H6v-3.52L3.52 12 6 9.52V6h3.52L12 3.52 14.48 6H18v3.... |
import {
AlbumGridItemFragment,
ReviewFilterInput,
ReviewListItemFragment,
ReviewSortInput
} from "../graphql/types";
export interface ReviewListItemArgs extends ReviewListItemFragment {
album?: AlbumGridItemFragment | null;
}
export interface ReviewFilterState {
where: ReviewFilterInput;
sort: ReviewSo... |
import forEach = require('es-abstract/helpers/forEach');
forEach([1, 2, '3'], function(v, i, a) {
v; // $ExpectType string | number
i; // $ExpectType number
a; // $ExpectType (string | number)[]
this; // $ExpectType undefined
});
forEach(
{
a: 1,
2: '3',
[Symbol.toStringTag... |
#!/usr/bin/env node
import { program } from 'commander';
import path from 'path';
import NotePM, {Note, Folder, Page, Tag, Comment, Attachment, User} from './note_pm/';
import { promisify } from 'util';
import Esa from './esa/index';
const dir = process.argv[process.argv.length - 1];
program
.version('0.0.1')
.op... |
import classNames from 'classnames';
import { isUndefined } from 'lodash';
import { CATEGORY_ICONS } from '../../data';
import { ScoreType } from '../../types';
import styles from './CategoriesSummary.module.css';
import CategoryProgressbar from './CategoryProgressbar';
import RoundScore from './RoundScore';
interfac... |
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { retry, map, catchError } from 'rxjs/operators';
import 'rxjs/add/observable/throw';
import { Book } from './book';
import { BookRaw } from './book-raw';
import { BookFac... |
import { Component } from '@angular/core';
import { User } from '../../users/user.model';
import { Sign } from '../../signs/sign.model';
const FOUND_USERS: User[] = [
{ username: "Jen", picUrl: "https://upload.wikimedia.org/wikipedia/commons/e/e9/Official_portrait_of_Barack_Obama.jpg", status: "active" },
{ user... |
// https://github.com/hapijs/hapi/blob/master/API.md#-server-options
import { Plugin, RouteOptions, Server, ServerOptions, ServerRegisterOptions } from "hapi";
import { MimosOptions, MimosOptionsValue } from "mimos";
const mimeOptions: MimosOptions = {
override: {
'node/module': {
source: 'iana... |
import React from "react";
import { LinkWithQuery } from "../commonComponents/LinkWithQuery";
const SettingsNav = () => {
const classNameByActive = ({ isActive }: { isActive: boolean }) =>
isActive ? "active" : "";
return (
<nav className="prime-secondary-nav" aria-label="Secondary navigation">
<ul... |
import type { Projection } from 'mongodb';
import type { TValue, MongoContext, Effect, EffectTypes } from '../types/event-sourcing';
export async function processor(context: MongoContext, effect: Effect<EffectTypes>) {
const { session, collection, documentId } = context;
const { type, key, value, sliceSize } = ef... |
interface Suggestion {
name: string;
description: string;
}
interface CompletionEnv {
line: string;
point: number;
}
export declare const HARDHAT_COMPLETE_FILES = "__hardhat_complete_files__";
export declare const REQUIRED_HH_VERSION_RANGE = "^1.0.0";
export declare function complete({ line, point, }: C... |
import type { GlobalSharedColors, NeutralColorTokens, SharedColorTokens } from '../types';
export const neutralColorTokens: NeutralColorTokens = {
neutralForeground1: 'var(--global-color-white)', // #ffffff Global.Color.White
neutralForeground2: 'var(--global-palette-grey-84)', // #d6d6d6 Global.Color.Grey.84
ne... |
// Description:
// Run arbitrary js/ts code inside a node vm
//
// Commands:
// hubot run
//
// Author:
// Matt Perry
import { Robot } from 'hubot';
import { create } from 'ts-node';
import { VM } from 'vm2';
import crypto from 'crypto';
const md5 = (input: string) => crypto.createHash('md5').update(input).digest... |
import React, { SVGProps } from 'react';
import { IIblisReactUndrawProps } from '../iblis_react_undraw_props';
export const SvgBlackLivesMatter = (props: IIblisReactUndrawProps & SVGProps<SVGSVGElement>) => (
<svg data-name="Layer 1" viewBox="0 0 752 823" className={props.class} width="100%" height={props.height} {..... |
export * from './command-options.interface';
export * from './discord-module-options.interface';
export * from './command.interface';
export * from './option-options.interface';
export * from './arg-options.interface';
export * from './types'; |
import * as React from 'react';
import cn from 'classnames';
import MuiButton, { ButtonTypeMap as MuiButtonTypeMap } from '@material-ui/core/Button';
import { OverrideProps } from '@material-ui/core/OverridableComponent';
import { useAncestorBackgroundHack, OverrideTypeMap } from '@akropolis-web/styles';
import { useS... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
import * as React from 'react';
// tslint:disable-next-line:ordered-imports
import { Svg, Path } from 'swgs';
import {
FlexSvgPropsOptional,
reflexComponent,
SvgIcon,
} from '@reflex-ui/core';
export const FiberDvrIcon = reflexComponent<FlexSvgPropsOptional>({
name: 'FiberDvrIcon',
})((props: FlexSvgPropsOpti... |
import { ISnackBar } from './ISnackBar';
export class SnackBarServiceMock implements ISnackBar
{
IsOpen: Subject<boolean>;
Text: string;
ActionText: string;
public async Action(): Promise<void>
{
}
public Info(text: string, actionText?: string, action?: (args?: any) => Promise<void>): void... |
export interface Image {
id: string;
ownerId: string;
url: string;
} |
import Mongoose = require("mongoose");
interface IVoteModel extends Mongoose.Document {
voteId: String;
postId: String;
userId: String;
voteValue: Number;
timestamp: Date; // same format as comment model
}
export {IVoteModel}; |
import { StoreEnhancer } from 'redux';
import { EnhancerOptions } from './index';
export declare const composeWithDevTools: import("./index").ReduxDevtoolsExtensionCompose;
export declare const devToolsEnhancer: (options?: EnhancerOptions) => StoreEnhancer; |
import React from 'react';
import { Command } from './types';
export const commands: Command[] = [
{
slug: 'videochat',
commands: ['meeting', 'join', 'call'],
icon: (
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path
strokeLinecap="round"
strokeLinejoin="... |
/**
* Checks Enumeration classes for the existance of keys
* @param enumClass The Enum object/class itself
* @param key The key being searched for
* @returns True if the key exists within the Enum object
*/
export const enumHas = (enumClass:any, key:string):boolean => (
Object.keys(enumClass).findIndex((objk:str... |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import * as fs from 'fs';
import * as path from 'path';
import * as shx from 'shelljs';
function main(args: string[... |
export { usePlatforms, useForecast, useForecasts, useForecastMeta } from "./buoyBarn"
export { useDataset, useDatasets } from "./tabledap"
export { UsePlatform, UsePlatforms } from "./BuoyBarnComponents"
export { UseDataset, UseDatasets } from "./TableDAPComponents" |
// Copyright 2017-2021 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { HexString } from '../types';
import { hexStripPrefix } from './stripPrefix';
/**
* @name hexToU8a
* @summary Creates a Uint8Array object from a hex string.
* @description
* `null` inputs returns an e... |
///header, footer (with sheet switcher), switcher between different table components
import React, { ChangeEvent, Component } from 'react';
import * as path from 'path';
import './drop-container.css';
import Dropzone from 'react-dropzone';
import { Button, Card, OverlayTrigger, Spinner, Tooltip } from 'react-bootstrap... |
declare module 'loglevel-std-streams' {
interface ILoglevelStdStreams {
(log: any): void;
}
const loglevelStdStreams: ILoglevelStdStreams;
export = loglevelStdStreams;
} |
/*
MIT License
Copyright (c) 2020 Looker Data Sciences, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modi... |
import { Component, OnInit, Input } from '@angular/core';
@Component({
selector: 'app-main',
templateUrl: './main.component.html',
styleUrls: ['./main.component.scss']
})
export class MainComponent implements OnInit {
@Input() title: string;
@Input() subTitle: string;
constructor() {}
ngOnInit() {}
} |
import { MessageAttachment } from "@slack/client"
import { IMessageConsumer, ISlackEventInfo } from "../../controllers/definitions/slackController"
import { SlackResponseType } from "../factories/definitions/slackCommandHandlerFactory"
import LoggerService from "../services/logger"
import SlackClientService from "../se... |
import React, { FC, useRef } from 'react';
import { useTranslation } from 'react-i18next';
import { useFocus } from '@use/focus';
interface IDatePickerInput {
isOpen: boolean;
onChange: (e: React.BaseSyntheticEvent) => void;
}
export const DatePickerInput: FC<IDatePickerInput> = ({
isOpen,
onChange,
}) => {
... |
import React, {PureComponent, MouseEvent} from 'react'
import classnames from 'classnames'
import _ from 'lodash'
import {INFLUXQL_FUNCTIONS} from 'src/data_explorer/constants'
import {ErrorHandling} from 'src/shared/decorators/errors'
interface Props {
onApply: (item: string[]) => void
selectedItems: string[]
}
... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { schema } from '@kbn/config-schema';
import { parseNext } from '../..... |
import Hasher from './Hasher';
describe('Hasher', () => {
const hasher = new Hasher({ workFactor: 4 });
describe('hash', () => {
it('returns an ASCII-safe hash', async () => {
const hash = await hasher.hash('abc');
expect(hash).toEqual(expect.stringMatching(/^[ -~]+$/));
});
it('generate... |
import { Properties } from './transformers';
export class Comment extends Properties {
type: string;
constructor(type: string, attributes: Map<string, string>) {
attributes.set('onTarget', type);
super(attributes);
this.type = type;
}
public static of(
type: string,
style: string[] = [],
clazz: strin... |
/**
* @author Timur Kuzhagaliyev <tim.kuzh@gmail.com>
* @copyright 2020
* @license MIT
*/
import React from 'react';
export interface ToolbarInfoProps {
}
export declare const ToolbarInfo: React.FC<ToolbarInfoProps>; |
import { Button } from "app/components/Button";
import { Image } from "app/components/Image";
import { Modal } from "app/components/Modal";
import React from "react";
import { useTranslation } from "react-i18next";
import { Size } from "types";
type Props = {
isOpen?: boolean;
description?: string;
title?: string;
... |
import { Box } from "@material-ui/core";
import React from "react";
import { DeploymentFrequencyChart } from "./";
export default {
title: "insights/DeploymentFrequencyChart",
component: DeploymentFrequencyChart,
};
const randData = Array.from(new Array(20)).map((_, v) => ({
value: Math.floor(Math.random() * 20... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.