repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
webtobesocial/pharmacies_ui
src/app/city-form/city-form.component.ts
<gh_stars>0 import { Component, OnInit, Input } from '@angular/core'; import { ApiService } from '../api.service'; import { City } from '../city'; @Component({ selector: 'app-city-form', templateUrl: './city-form.component.html', styleUrls: ['./city-form.component.css'] }) export class CityFormComponent implemen...
webtobesocial/pharmacies_ui
src/app/cities/cities.component.ts
import { Component, OnInit } from '@angular/core'; import { ApiService } from '../api.service'; @Component({ selector: 'app-cities', templateUrl: './cities.component.html', styleUrls: ['./cities.component.css'] }) export class CitiesComponent implements OnInit { constructor(private apiService: ApiService) { } ...
webtobesocial/pharmacies_ui
src/app/dashboard/dashboard.component.ts
import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { ApiService } from '../api.service'; @Component({ selector: 'app-dashboard', templateUrl: './dashboard.component.html', styleUrls: ['./dashboard.component.css'] }) export class DashboardComponent implemen...
webtobesocial/pharmacies_ui
src/app/navigation/navigation.component.ts
import { Component, Output, EventEmitter } from '@angular/core'; @Component({ selector: 'app-navigation', templateUrl: './navigation.component.html', styleUrls: ['./navigation.component.css'] }) export class NavigationComponent { @Output() searchTerm = new EventEmitter<any>(); search(event) { // console...
webtobesocial/pharmacies_ui
src/app/city.ts
<reponame>webtobesocial/pharmacies_ui<filename>src/app/city.ts export class City { constructor( public id: string, public zip: string, public city: string, public county: string, public country: string, public citizen: string, public district: string, public state: string, public l...
ruben2020/codequery4vscode
src/extension.ts
'use strict'; // The module 'vscode' contains the VS Code extensibility API // Import the module and reference it with the alias vscode in your code below import * as vscode from 'vscode'; import CQSearch from './codequery'; import CQResultsProvider from './cqtreedataprov'; // this method is called when your extension...
ruben2020/codequery4vscode
src/codequery.ts
'use strict'; import * as vscode from 'vscode'; import * as fs from 'fs'; import * as path from 'path'; import * as cp from 'child_process'; import { isNull } from 'util'; import {SRAggregator, SResult} from './srchresults'; import CQResultsProvider from './cqtreedataprov'; export default class CQSearch { privat...
ruben2020/codequery4vscode
src/cqtreedataprov.ts
<filename>src/cqtreedataprov.ts 'use strict'; import * as vscode from 'vscode'; import * as fs from 'fs'; import {SResult} from './srchresults'; import CQSearch from './codequery'; export default class CQResultsProvider implements vscode.TreeDataProvider<SResult> { private _onDidChangeTreeData: vscode.EventEmitter<...
ruben2020/codequery4vscode
src/srchresults.ts
<gh_stars>1-10 'use strict'; import * as vscode from 'vscode'; import { setMaxListeners } from 'process'; export class SRAggregator { private toplevel: SResult[]; constructor () { this.toplevel = []; this.addSearchHelp(); } get treedata(): SResult[] { return this.toplevel; } public reset() { this.top...
latticeapp/editor.js
types/configs/sanitizer-config.d.ts
<reponame>latticeapp/editor.js export interface SanitizerConfig { /** * Tag name and params not to be stripped off * @see {@link https://github.com/guardian/html-janitor} * * @example Save P tags * p: true * * @example Save A tags and do not strip HREF attribute * a: { * href: true * }...
lietu/lietu.tv
ts/website.ts
<reponame>lietu/lietu.tv<filename>ts/website.ts import {config} from "./config"; const TWITCH_API_HEADERS = { "Client-ID": config.clientId }; interface Highlight { title: string; description: string; preview: string; show: () => void; } export class Website { channel: string; channelId: n...
lietu/lietu.tv
ts/main.ts
import {Website} from "./website"; var website = new Website(); website.start();
lietu/lietu.tv
ts/config.ts
<reponame>lietu/lietu.tv<filename>ts/config.ts export var config = { // Your username on Twitch channel: "lietu", // https://blog.twitch.tv/client-id-required-for-kraken-api-calls-afbb8e95f843#.m5og6g6yt clientId: "g0kw5h4rh7q5eqp7txlw1irliw8k8hz", // Get _id from: // http://api.twitch.tv/api/...
erikbfeeley/concerto
packages/concerto-core/types/index.d.ts
<reponame>erikbfeeley/concerto import { EventEmitter } from 'events'; declare module '@accordproject/concerto' { // Exceptions export class BaseException extends Error { constructor(message: string, component?: string); } export class BaseFileException extends BaseException { constructor(message: s...
ZhouJun2303/CocosCreator-GG-Framework
assets/scripts/framework/lib/asset/BundleLoader.ts
<filename>assets/scripts/framework/lib/asset/BundleLoader.ts /** * 提供 Promise 写法的 Bundler 加载器,但是这种写法会缺失加载进度 * * @author caizhitao * @created 2020-11-28 10:27:10 */ export default class BundleLoader { static load<T extends cc.Asset>(bundle: cc.AssetManager.Bundle, path: string, type?: typeof cc.Asset): Promise<...
ZhouJun2303/CocosCreator-GG-Framework
assets/gamebundle/scripts/gamesetting/GameSettingEvent.ts
/** * 游戏设置模块事件 * * @author caizhitao * @created 2020-12-15 21:44:17 */ export enum GameSettingEvent { /** * 音乐音量改变时回调 */ OnMusicVolumeChanged = "GameSettingEvent.OnMusicVolumeChanged", /** * 音效音量改变时回调 */ OnSoundVolumeChanged = "GameSettingEvent.OnSoundVolumeChanged", /** ...
ZhouJun2303/CocosCreator-GG-Framework
assets/mainbundle/scripts/configs/BundleConfigs.ts
<reponame>ZhouJun2303/CocosCreator-GG-Framework /** * Bundle 配置 * * @author caizhitao * @created 2020-12-15 21:03:22 */ export const BundleConfigs = { CommonBundle: "commonbundle", GameBundle: "gamebundle", };
ZhouJun2303/CocosCreator-GG-Framework
assets/scripts/framework/lib/router/PanelRouter.ts
import { gg } from "../../gg"; import { PanelComponent } from "./PanelComponent"; import { PanelConfig } from "./PanelConfig"; import { PanelStateEnum } from "./PanelStateEnum"; /** * 面板路由器 * * 面板结构如下: * * - 图层1 * - 面板1 * - 面板2 * - 图层2 * - 面板3 * - 面板4 * - ... * * 根据面板所以依附的图层节点的zIndex 来决定面板的显示前后顺序(...
ZhouJun2303/CocosCreator-GG-Framework
assets/gamebundle/scripts/gamesetting/GameSettingConst.ts
/** * 游戏设置模块中的常量配置 * * @author caizhitao * @created 2020-12-10 21:42:52 */ export const GameSettingConst = { /** * 游戏设置信息在本次的缓存key */ CacheKey: "game.cache", };
ZhouJun2303/CocosCreator-GG-Framework
assets/scripts/framework/lib/analysis/Analysis.ts
import { gg } from "../../gg"; import { AnalysisInterface, EventParam } from "./AnalysisInterface"; /** * 默认统计分析类 * * @author caizhitao * @created 2020-11-26 22:25:55 */ export default class Analysis implements AnalysisInterface { report(eventName: string, eventParams?: EventParam): void { gg.logger.l...
ZhouJun2303/CocosCreator-GG-Framework
assets/scripts/framework/lib/eventmanager/EventManagerInterface.ts
<filename>assets/scripts/framework/lib/eventmanager/EventManagerInterface.ts /** * 事件管理器接口,支持以下函数: * * * emit():发送事件 * * onOnce():注册事件(回调一次后自动销毁) * * on():注册事件 * * off():注销事件 * * offTarget():注释指定对象下的所有事件 * * @author caizhitao * @created 2020-11-26 22:35:25 */ export interface EventManagerInterface { /** ...
ZhouJun2303/CocosCreator-GG-Framework
assets/scripts/framework/lib/components/EnhancedComponent.ts
const { ccclass, property } = cc._decorator; /** * 增强型组件(额外附加一些方法) * * @author caizhitao * @created 2020-12-02 21:25:28 */ @ccclass export abstract class EnhancedComponent extends cc.Component { /** * 分帧执行 Generator 逻辑 * * @param generator 生成器 * @param duration 持续时间(ms),每次执行 Generator 的操作...
ZhouJun2303/CocosCreator-GG-Framework
assets/scripts/framework/lib/router/PanelConfig.ts
/** * 面板配置 * * @author caizhitao * @created 2020-11-28 09:51:33 */ export interface PanelConfig { /** * 面板的 Prefab 路径,需要写上对应的 bundleName * * e.g. * * resources/prefabs/SettingPanelPrefab */ prefabPath: string; /** * 面板所在的层级节点的ZIndex */ layerZIndex: number; }...
ZhouJun2303/CocosCreator-GG-Framework
assets/scripts/framework/lib/storage/LocalStorage.ts
<filename>assets/scripts/framework/lib/storage/LocalStorage.ts import { gg } from "../../gg"; import { LocalStorageInterface } from "./LocalStorageInterface"; /** * 本地存储管理 * * @author caizhitao * @created 2020-11-26 23:40:23 */ export class LocalStorage implements LocalStorageInterface { /** * 读取指定key值的记...
ZhouJun2303/CocosCreator-GG-Framework
assets/scripts/framework/lib/router/PanelComponent.ts
import { EnhancedComponent } from "../components/EnhancedComponent"; const { ccclass, property } = cc._decorator; /** * 面板组件 * * @author caizhitao * @created 2020-11-28 09:51:33 */ @ccclass export abstract class PanelComponent extends EnhancedComponent { /** * 展示面板(此方法会被面板路由器所调用,请不要直接调用这个方法) */ ...
ZhouJun2303/CocosCreator-GG-Framework
assets/mainbundle/scripts/configs/PanelConfigs.ts
<reponame>ZhouJun2303/CocosCreator-GG-Framework import { PanelConfig } from "../../../scripts/framework/lib/router/PanelConfig"; import { BundleConfigs } from "./BundleConfigs"; /** * 面板图层层级(层级大的显示在最前面) */ enum PanelLayerEnum { /** * 普通界面 */ UILayer = 200, /** * 弹窗层级 */ PopLayer ...
ZhouJun2303/CocosCreator-GG-Framework
assets/gamebundle/scripts/game/GamePanelPrefab.ts
<gh_stars>10-100 import { LoadingPanelShowArgs } from "../../../commonbundle/scripts/popwindow/LoadingPanelPrefab"; import { ToastPanelShowArgs } from "../../../commonbundle/scripts/popwindow/ToastPanelPrefab"; import { PanelConfigs } from "../../../mainbundle/scripts/configs/PanelConfigs"; import { gg } from "../../.....
ZhouJun2303/CocosCreator-GG-Framework
assets/commonbundle/scripts/boot/BootPanelPrefab.ts
<filename>assets/commonbundle/scripts/boot/BootPanelPrefab.ts import GameSettingModule from "../../../gamebundle/scripts/gamesetting/GameSettingModule"; import { PanelConfigs } from "../../../mainbundle/scripts/configs/PanelConfigs"; import { gg } from "../../../scripts/framework/gg"; import { PanelComponent, PanelHide...
ZhouJun2303/CocosCreator-GG-Framework
assets/gamebundle/scripts/gamesetting/GameSettingModule.ts
<gh_stars>10-100 import { gg } from "../../../scripts/framework/gg"; import { GameSettingConst } from "./GameSettingConst"; import GameSettingModel from "./GameSettingModel"; /** * 游戏设置模块 * * @author caizhitao * @created 2020-12-10 21:02:45 */ export default class GameSettingModule { /** * 游戏设置数据 */...
ZhouJun2303/CocosCreator-GG-Framework
assets/scripts/framework/lib/logger/LoggerInterface.ts
/** * 日志接口 * * @author caizhitao * @created 2020-11-26 23:19:21 */ export interface LoggerInterface { /** * 初始化日志 * * @param option 参数选项 */ init(option: LoggerOption): void; log(...args: any[]): void; debug(...args: any[]): void; info(...args: any[]): void; warn(...args:...
ZhouJun2303/CocosCreator-GG-Framework
assets/scripts/framework/lib/components/scrollviewplus/ScrollViewPlusComponent.ts
<gh_stars>10-100 import ScrollViewPlusItemComponent from "./ScrollViewPlusItemComponent"; const { ccclass, property } = cc._decorator; /** * 只渲染可视区域的ScrollView * * @author caizhitao * @created 2020-12-27 22:08:00 * @description * * 用法: * * 1. 将本组件挂载在节点上即可,和正常ScrollView使用一致 * * 原理: * * 1. 滚动时,判断...
ZhouJun2303/CocosCreator-GG-Framework
assets/scripts/framework/lib/components/adapter/SafeAreaWidgetAdapterComponent.ts
<reponame>ZhouJun2303/CocosCreator-GG-Framework import SafeAreaAdapterComponent from "./SafeAreaAdapterComponent"; const { ccclass, property } = cc._decorator; /** * @author zhitaocai * @classdesc 安全区域适配Widget * @description * * 用法: * * 1. 将本组件挂载在节点上即可(注意:该节点上必须挂在 Widget 组件) * * 适配原理: * * 1. 根据安全区域范围,修改wi...
ZhouJun2303/CocosCreator-GG-Framework
assets/scripts/framework/lib/analysis/AnalysisInterface.ts
/** * 数据上报/事件埋点接口 * * @author caizhitao * @created 2020-11-26 22:26:22 */ export interface AnalysisInterface { /** * 上报统计事件 * * @param eventName 事件名 * @param eventParams 自定义参数属性,如:eventParams["date"] = "2019" * * @example * * log("game_finished", { * "time": "0...
ZhouJun2303/CocosCreator-GG-Framework
assets/scripts/framework/lib/logger/CCLogger.ts
import { LoggerInterface, LoggerOption } from "./LoggerInterface"; /** * @author caizhitao * @created 2020-11-26 22:52:45 */ export default class CCLogger implements LoggerInterface { private _option: LoggerOption = null; init(option: LoggerOption): void { this._option = option; } log(...a...
ZhouJun2303/CocosCreator-GG-Framework
assets/commonbundle/scripts/popwindow/LoadingPanelPrefab.ts
import { PanelComponent, PanelHideOption, PanelShowOption } from "../../../scripts/framework/lib/router/PanelComponent"; const { ccclass, property } = cc._decorator; export interface LoadingPanelShowArgs { /** * 展示时是否播放展示动画(不传则默认播放) */ playShowAnim?: boolean; /** * 点击加载页面时回调 */ on...
ZhouJun2303/CocosCreator-GG-Framework
assets/scripts/framework/gg.ts
import Analysis from "./lib/analysis/Analysis"; import { AnalysisInterface } from "./lib/analysis/AnalysisInterface"; import EventManager from "./lib/eventmanager/EventManager"; import { EventManagerInterface } from "./lib/eventmanager/EventManagerInterface"; import CCLogger from "./lib/logger/CCLogger"; import { Logge...
ZhouJun2303/CocosCreator-GG-Framework
assets/commonbundle/scripts/popwindow/ToastPanelPrefab.ts
<filename>assets/commonbundle/scripts/popwindow/ToastPanelPrefab.ts<gh_stars>10-100 import { PanelConfigs } from "../../../mainbundle/scripts/configs/PanelConfigs"; import { gg } from "../../../scripts/framework/gg"; import { PanelComponent, PanelHideOption, PanelShowOption } from "../../../scripts/framework/lib/router...
ZhouJun2303/CocosCreator-GG-Framework
assets/gamebundle/scripts/gamesetting/GameSettingPanelPrefab.ts
<reponame>ZhouJun2303/CocosCreator-GG-Framework<filename>assets/gamebundle/scripts/gamesetting/GameSettingPanelPrefab.ts import { PanelConfigs } from "../../../mainbundle/scripts/configs/PanelConfigs"; import { gg } from "../../../scripts/framework/gg"; import { PanelComponent, PanelHideOption, PanelShowOption } from "...
ZhouJun2303/CocosCreator-GG-Framework
assets/scripts/framework/lib/router/PanelStateEnum.ts
/** * 面板状态枚举 * * @author caizhitao * @created 2020-12-04 16:00:09 */ export enum PanelStateEnum { /** * 面板加载中 */ Loading = "Loading", /** * 面板加载失败 */ LoadFailure = "LoadingFailure", /** * 面板加载成功 */ LoadSuccess = "LoadingSuccess", /** * 面板展示中(一般为正在进...
ZhouJun2303/CocosCreator-GG-Framework
assets/scripts/framework/lib/logger/NativeLogger.ts
import { LoggerInterface, LoggerOption } from "./LoggerInterface"; /** * 原生日志输出管理器 * * 会将 [object object] 转换为 object Json 化后的结果 * * @author caizhitao * @created 2020-11-26 22:52:46 */ export default class NativeLogger implements LoggerInterface { private _option: LoggerOption = null; init(option: Logge...
ZhouJun2303/CocosCreator-GG-Framework
assets/scripts/framework/lib/storage/LocalStorageInterface.ts
/** * 本地存储管理接口 * * @author caizhitao * @created 2020-11-26 23:40:30 */ export interface LocalStorageInterface { /** * 读取指定key值的记录 * * @param key 读取记录key */ getItem(key: string): string; /** * 设置指定key值的记录 * * @param key 待保存key(会覆盖现有的) * @param value 待保存value ...
ZhouJun2303/CocosCreator-GG-Framework
assets/gamebundle/scripts/gamesetting/GameSettingModel.ts
/** * 游戏设置模块数据 * * @author caizhitao * @created 2020-12-10 21:02:57 */ export default class GameSettingModel { /** * 音乐音量[0, 1] */ musicVolume: number = 1; /** * 音效音量[0, 1] */ soundVolume: number = 1; /** * 是否允许振动 */ enableVibrate: boolean = true; fromJS...
ZhouJun2303/CocosCreator-GG-Framework
assets/scripts/framework/lib/eventmanager/EventManager.ts
import { EventManagerInterface } from "./EventManagerInterface"; /** * 默认事件管理器 * * @author caizhitao * @created 2020-11-26 22:37:25 */ export default class EventManager implements EventManagerInterface { /** * key: 事件名 * value: 缓存事件 */ private _eventCacheMap: Map<string, EventCache[]> = new...
ZhouJun2303/CocosCreator-GG-Framework
assets/scripts/framework/lib/asset/AssetLoader.ts
<reponame>ZhouJun2303/CocosCreator-GG-Framework<gh_stars>10-100 /** * 提供 Promise 写法的 cc.assetManager 加载器,但是这种写法会缺失加载进度 * * @author caizhitao * @created 2020-11-28 12:29:04 */ export default class AssetLoader { static loadBundle(bundleName: string): Promise<cc.AssetManager.Bundle> { return new Promise<c...
Le-labot/twitch-notification-on-discord
src/Config/sequelizeConfig.ts
import { Sequelize } from 'sequelize'; const sequelize = new Sequelize('mysql://root:@localhost:3308/<db_name>'); export default sequelize;
Le-labot/twitch-notification-on-discord
src/models/TwitchModel.ts
<reponame>Le-labot/twitch-notification-on-discord import { DataTypes, Sequelize } from 'sequelize'; import {ITwitchInstance} from '../utils/typing'; module.exports = (sequelize: Sequelize) => { const twitchShema = { id: { type: DataTypes.INTEGER.UNSIGNED, autoIncrement: true, ...
Le-labot/twitch-notification-on-discord
src/utils/typing.d.ts
<filename>src/utils/typing.d.ts import { Model, Optional } from 'sequelize'; import { Snowflake } from 'discord.js'; interface ITwitchAttributes { id: number; discordID: Snowflake; twitchUserID: string; announced: boolean; started_at: Date; } interface ITwitchCreationAttributes extends Optional<ITw...
Le-labot/twitch-notification-on-discord
src/main.ts
import {Client, Message} from 'discord.js'; import sequelize from './config/sequelizeConfig'; import * as YAML from 'yamljs'; import * as path from "path"; import {addStreamer} from "./services/TwitchService"; import {getUser} from "./utils/TwitchAuth"; const prefix = '!' const client: any = new Client(); client.setti...
Le-labot/twitch-notification-on-discord
src/modules/TwitchModule.ts
<filename>src/modules/TwitchModule.ts import * as express from 'express'; import {getAllStreamer, updateStreamer} from "../services/TwitchService"; import {getStream} from "../utils/TwitchAuth"; import {TextChannel} from "discord.js"; import * as moment from 'moment'; module.exports = async (client) => { setInterv...
Le-labot/twitch-notification-on-discord
src/services/TwitchService.ts
<reponame>Le-labot/twitch-notification-on-discord<filename>src/services/TwitchService.ts import {Sequelize} from "sequelize"; import {GuildMember, User} from "discord.js"; export async function addStreamer(sequelize: Sequelize, user: User | GuildMember, twitchUserID: string) { const twitchModel = require('../mode...
megawebmaster/react-responsive-modal
react-responsive-modal/__tests__/index.test.tsx
import * as React from 'react'; import { fireEvent, render, waitFor } from '@testing-library/react'; import { Modal } from '../src'; describe('modal', () => { describe('overlay', () => { it('should call onClose when click on the overlay', () => { const onClose = jest.fn(); const { getByTestId } = ren...
PolymeshNetwork/common
packages/util-crypto/src/key/hdkdEcdsa.ts
// Copyright 2017-2021 @polkadot/util-crypto authors & contributors // SPDX-License-Identifier: Apache-2.0 import { secp256k1DeriveHard } from '../secp256k1/deriveHard'; import { secp256k1KeypairFromSeed } from '../secp256k1/keypair/fromSeed'; import { createSeedDeriveFn } from './hdkdDerive'; export const keyHdkdEcd...
PolymeshNetwork/common
packages/util/src/u8a/toBigInt.ts
// Copyright 2017-2021 @polkadot/util authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { ToBnOptions } from '../types'; import { objectSpread } from '../object/spread'; const U8_MULT = 256n; const U16_MUL = U8_MULT * U8_MULT; function xor (input: Uint8Array): Uint8Array { const result = n...
PolymeshNetwork/common
packages/util/src/string/camelCase.ts
<gh_stars>0 // Copyright 2017-2021 @polkadot/util authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { AnyString } from '../types'; import camelcase from 'camelcase'; /** * @name stringCamelCase * @summary Convert a dash/dot/underscore/space separated string/String to camelCase */ export fu...
PolymeshNetwork/common
packages/util-crypto/src/secp256k1/tweakAdd.ts
// Copyright 2017-2021 @polkadot/util-crypto authors & contributors // SPDX-License-Identifier: Apache-2.0 import { assert, BN, bnToU8a, isU8a } from '@polkadot/util'; import { BN_BE_256_OPTS } from '../bn'; import { secp256k1 } from './secp256k1'; const ecparams = secp256k1.curve as { n: BN }; export function secp...
PolymeshNetwork/common
packages/util/src/u8a/eq.spec.ts
<filename>packages/util/src/u8a/eq.spec.ts // Copyright 2017-2021 @polkadot/util authors & contributors // SPDX-License-Identifier: Apache-2.0 import { u8aEq } from '.'; describe('u8aEq', (): void => { it('returns false when the lengths do not match', (): void => { expect( u8aEq( new Uint8Array([1...
PolymeshNetwork/common
packages/util-crypto/src/secp256k1/secp256k1.ts
<reponame>PolymeshNetwork/common<gh_stars>0 // Copyright 2017-2021 @polkadot/util-crypto authors & contributors // SPDX-License-Identifier: Apache-2.0 import elliptic from 'elliptic'; // eslint-disable-next-line new-cap export const secp256k1 = new elliptic.ec('secp256k1');
PolymeshNetwork/common
packages/util/src/string/camelCase.spec.ts
<reponame>PolymeshNetwork/common<filename>packages/util/src/string/camelCase.spec.ts // Copyright 2017-2021 @polkadot/util authors & contributors // SPDX-License-Identifier: Apache-2.0 import { stringCamelCase } from '.'; describe('stringCamelCase', (): void => { it('works correctly', (): void => { expect( ...
PolymeshNetwork/common
packages/util/src/hex/toBigInt.ts
// Copyright 2017-2021 @polkadot/util authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { ToBnOptions } from '../types'; import { objectSpread } from '../object/spread'; import { u8aToBigInt } from '../u8a/toBigInt'; import { hexToU8a } from './toU8a'; /** * @name hexToBigInt * @summary Cre...
PolymeshNetwork/common
packages/util-crypto/src/schnorrkel/deriveSoft.ts
<reponame>PolymeshNetwork/common<gh_stars>1-10 // Copyright 2017-2021 @polkadot/util-crypto authors & contributors // SPDX-License-Identifier: Apache-2.0 import { sr25519DeriveKeypairSoft } from '@polkadot/wasm-crypto'; import { createDeriveFn } from './derive'; export const schnorrkelDeriveSoft = createDeriveFn(sr2...
PolymeshNetwork/common
packages/keyring/src/keyring.ts
// Copyright 2017-2021 @polkadot/keyring authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { EncryptedJsonEncoding, Keypair, KeypairType } from '@polkadot/util-crypto/types'; import type { KeyringInstance, KeyringOptions, KeyringPair, KeyringPair$Json, KeyringPair$Meta } from './types'; import...
PolymeshNetwork/common
packages/util-crypto/src/schnorrkel/derive.ts
<filename>packages/util-crypto/src/schnorrkel/derive.ts // Copyright 2017-2021 @polkadot/util-crypto authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { Keypair } from '../types'; import { assert, isU8a } from '@polkadot/util'; import { schnorrkelKeypairFromU8a } from './keypair/fromU8a'; imp...
PolymeshNetwork/common
packages/util-crypto/src/xxhash/xxhash64/asValue.ts
<reponame>PolymeshNetwork/common // Copyright 2017-2021 @polkadot/util-crypto authors & contributors // SPDX-License-Identifier: Apache-2.0 import xx from 'xxhashjs'; import { u8aToU8a } from '@polkadot/util'; export default function xxhash64AsValue (data: Buffer | Uint8Array | string, seed: number): number { retu...
PolymeshNetwork/common
packages/util/src/u8a/eq.ts
<reponame>PolymeshNetwork/common // Copyright 2017-2021 @polkadot/util authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { HexString } from '../types'; import { u8aToU8a } from './toU8a'; function equals (a: Uint8Array, b: Uint8Array): boolean { if (a.length === b.length) { const dvA = ...
PolymeshNetwork/common
packages/util-crypto/src/address/derive.ts
// Copyright 2017-2021 @polkadot/util-crypto authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { HexString } from '@polkadot/util/types'; import type { DeriveJunction } from '../key/DeriveJunction'; import type { Prefix } from './types'; import { assert } from '@polkadot/util'; import { keyEx...
PolymeshNetwork/common
packages/util-crypto/src/key/hdkdEd25519.ts
<gh_stars>1-10 // Copyright 2017-2021 @polkadot/util-crypto authors & contributors // SPDX-License-Identifier: Apache-2.0 import { naclDeriveHard } from '../nacl/deriveHard'; import { naclKeypairFromSeed } from '../nacl/keypair/fromSeed'; import { createSeedDeriveFn } from './hdkdDerive'; export const keyHdkdEd25519 ...
PolymeshNetwork/common
packages/util/src/hex/alphabet.ts
// Copyright 2017-2021 @polkadot/util authors & contributors // SPDX-License-Identifier: Apache-2.0 const U8_TO_HEX = new Array<string>(256); const U16_TO_HEX = new Array<string>(256 * 256); const HEX_TO_U8: Record<string, number> = {}; const HEX_TO_U16: Record<string, number> = {}; for (let n = 0; n < 256; n++) { ...
PolymeshNetwork/common
packages/util-crypto/src/base32/validate.ts
<gh_stars>1-10 // Copyright 2017-2021 @polkadot/util-crypto authors & contributors // SPDX-License-Identifier: Apache-2.0 import { createValidateFn } from '../base58/validate'; import { BASE32_ALPHABET } from './bs32'; /** * @name base32Validate * @summary Validates a base32 value. * @description * Validates that...
PolymeshNetwork/common
packages/util/src/string/pascalCase.ts
<reponame>PolymeshNetwork/common<filename>packages/util/src/string/pascalCase.ts // Copyright 2017-2021 @polkadot/util authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { AnyString } from '../types'; import camelcase from 'camelcase'; const OPTS = { pascalCase: true }; /** * @name stringPas...
jjcaballero/lens
src/extensions/lens-extension.ts
/** * Copyright (c) 2021 OpenLens Authors * * 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, modify, merge, p...
jjcaballero/lens
src/renderer/components/+extensions/extensions.tsx
<reponame>jjcaballero/lens /** * Copyright (c) 2021 OpenLens Authors * * 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 * ...
jjcaballero/lens
src/renderer/components/cluster-manager/lens-views.ts
<gh_stars>0 /** * Copyright (c) 2021 OpenLens Authors * * 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...
jjcaballero/lens
src/common/catalog-entities/web-link.ts
<filename>src/common/catalog-entities/web-link.ts /** * Copyright (c) 2021 OpenLens Authors * * 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 limit...
jjcaballero/lens
src/renderer/components/cluster-settings/components/show-metrics.tsx
<gh_stars>0 /** * Copyright (c) 2021 OpenLens Authors * * 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...
jjcaballero/lens
src/renderer/components/editable-list/editable-list.tsx
<reponame>jjcaballero/lens /** * Copyright (c) 2021 OpenLens Authors * * 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 * ...
jjcaballero/lens
src/renderer/components/+namespaces/namespace-select-filter.tsx
/** * Copyright (c) 2021 OpenLens Authors * * 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, modify, merge, p...
jjcaballero/lens
src/renderer/components/+config-autoscalers/hpa.tsx
<filename>src/renderer/components/+config-autoscalers/hpa.tsx<gh_stars>0 /** * Copyright (c) 2021 OpenLens Authors * * 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, ...
jjcaballero/lens
src/extensions/renderer-api/k8s-api.ts
/** * Copyright (c) 2021 OpenLens Authors * * 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, modify, merge, p...
jjcaballero/lens
src/renderer/components/layout/main-layout.tsx
<filename>src/renderer/components/layout/main-layout.tsx /** * Copyright (c) 2021 OpenLens Authors * * 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 withou...
jjcaballero/lens
src/extensions/__tests__/lens-extension.test.ts
/** * Copyright (c) 2021 OpenLens Authors * * 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, modify, merge, p...
jjcaballero/lens
src/renderer/components/+storage-classes/storage-classes.tsx
/** * Copyright (c) 2021 OpenLens Authors * * 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, modify, merge, p...
jjcaballero/lens
src/renderer/components/+welcome/welcome.tsx
/** * Copyright (c) 2021 OpenLens Authors * * 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, modify, merge, p...
jjcaballero/lens
src/migrations/cluster-store/3.6.0-beta.1.ts
<reponame>jjcaballero/lens /** * Copyright (c) 2021 OpenLens Authors * * 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 * ...
jjcaballero/lens
src/extensions/extension-store.ts
<filename>src/extensions/extension-store.ts /** * Copyright (c) 2021 OpenLens Authors * * 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 ...
jjcaballero/lens
integration/__tests__/command-palette.tests.ts
<reponame>jjcaballero/lens<gh_stars>0 /** * Copyright (c) 2021 OpenLens Authors * * 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 ri...
jjcaballero/lens
src/renderer/components/+storage/storage.tsx
/** * Copyright (c) 2021 OpenLens Authors * * 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, modify, merge, p...
jjcaballero/lens
src/renderer/components/input/input_validators.ts
/** * Copyright (c) 2021 OpenLens Authors * * 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, modify, merge, p...
jjcaballero/lens
src/main/resource-applier.ts
<gh_stars>0 /** * Copyright (c) 2021 OpenLens Authors * * 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...
jjcaballero/lens
src/common/user-store.ts
<reponame>jjcaballero/lens<filename>src/common/user-store.ts /** * Copyright (c) 2021 OpenLens Authors * * 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 wi...
jjcaballero/lens
src/renderer/ipc/invalid-kubeconfig-handler.tsx
<reponame>jjcaballero/lens /** * Copyright (c) 2021 OpenLens Authors * * 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 * ...
jjcaballero/lens
src/renderer/components/chart/pie-chart.tsx
/** * Copyright (c) 2021 OpenLens Authors * * 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, modify, merge, p...
jjcaballero/lens
src/renderer/components/layout/__test__/main-layout-header.test.tsx
/** * Copyright (c) 2021 OpenLens Authors * * 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, modify, merge, p...
jjcaballero/lens
src/renderer/components/cluster-manager/cluster-manager.tsx
<reponame>jjcaballero/lens /** * Copyright (c) 2021 OpenLens Authors * * 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 * ...
jjcaballero/lens
src/main/catalog/__tests__/catalog-entity-registry.test.ts
/** * Copyright (c) 2021 OpenLens Authors * * 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, modify, merge, p...
jjcaballero/lens
src/renderer/components/cluster-manager/cluster-status.tsx
<gh_stars>0 /** * Copyright (c) 2021 OpenLens Authors * * 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...
jjcaballero/lens
src/renderer/components/hotbar/hotbar.commands.tsx
/** * Copyright (c) 2021 OpenLens Authors * * 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, modify, merge, p...
jjcaballero/lens
src/extensions/common-api/registrations.ts
/** * Copyright (c) 2021 OpenLens Authors * * 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, modify, merge, p...
jjcaballero/lens
src/extensions/extension-installer.ts
/** * Copyright (c) 2021 OpenLens Authors * * 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, modify, merge, p...
jjcaballero/lens
src/renderer/components/+workloads-replicasets/replicasets.tsx
/** * Copyright (c) 2021 OpenLens Authors * * 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, modify, merge, p...
jjcaballero/lens
src/common/__tests__/kube-helpers.test.ts
/** * Copyright (c) 2021 OpenLens Authors * * 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, modify, merge, p...