blob_id large_stringlengths 40 40 | language large_stringclasses 1
value | repo_name large_stringlengths 5 119 | path large_stringlengths 4 271 | score float64 2.52 4.84 | int_score int64 3 5 | text stringlengths 26 4.09M |
|---|---|---|---|---|---|---|
9d697e5550dbb34c6997593034c9ca4c096f924d | TypeScript | Sarmouts/mathflare | /src/stats.ts | 2.59375 | 3 | var storage: any = window.localStorage;
window.addEventListener('load', () => {
loadStats();
});
const loadStats = () => {
const pageviews = storage.getItem("pageCount");
const equations = storage.getItem("equation");
const formulas = storage.getItem("formulas");
const ineq = storage.getItem("ineq")... |
e8a86823bb6627f3fbce97cf5ac9a957a8a3d81a | TypeScript | lanemt/definitelytyped.github.io | /types/ramda/test/nth-tests.ts | 2.828125 | 3 | import * as R from 'ramda';
() => {
const list = ['foo', 'bar', 'baz', 'quux'];
R.nth(1, list); // => 'bar'
R.nth(-1, list); // => 'quux'
R.nth(-99, list); // => undefined
R.nth(-99)(list); // => undefined
};
|
bf5d380550cf19db8e18e842e91fafed8bd23c9e | TypeScript | Libaration/Estate-Auction | /estateauction/src/reducers/HomesReducer.ts | 2.796875 | 3 | import {
FETCH_HOMES,
FETCH_USER_HOMES,
HomeActionDispatchTypes,
LOADING,
PLACE_BID,
SORT_HOMES,
} from '../actions/HomeActionTypes';
interface IDefaultState {
loading: boolean;
sortedBy: string;
homesList: [];
}
const defaultState: IDefaultState = {
homesList: [],
loading: false,
sortedBy: '',... |
5845922de42833dcdc7711ed7cc48b7c4160357f | TypeScript | neocomplexx/ngx-neo-frontend | /projects/ngx-neo-frontend/src/lib/components/menu/menu-group.model.ts | 2.734375 | 3 | import { MenuOptionsModel } from './menu-options.model';
/**
* Clase que representa a un grupo del menu
*/
export class MenuGroupModel {
id: String;
nombre: String;
descripcion: String;
habilitado: boolean;
opciones: Array<MenuOptionsModel>;
constructor(id: string) {
this.opciones ... |
f61591b4ba747151108e65ffb6e714d2d3363b68 | TypeScript | jorgenbuilder/steel-biasts | /src/managers/PortalManager.ts | 2.546875 | 3 | import GameScene from "scenes/GameLevelScene";
import { tiledPropsToObject, PortalData } from "helpers/mapProps";
export default class PortalLayer {
public scene: GameScene;
private objects: Phaser.Types.Tilemaps.TiledObject[] = [];
private gameObjects: Phaser.GameObjects.Rectangle[] = [];
con... |
f78e462a28b4f005d0562b0d26849e08fe92ca34 | TypeScript | TobiasSchotter/FireForceDefense | /src/locale.ts | 2.625 | 3 | import type VueI18n from 'vue-i18n';
class Locale {
private vueI18n: VueI18n;
constructor() {
if (!localStorage.getItem('locale')) {
localStorage.setItem('locale', navigator.language.slice(0, 2));
}
}
setVueI18n(vueI18n: VueI18n) {
this.vueI18n = vueI18... |
191c7d7f9a05c999babbd688accac731ae59aefa | TypeScript | wscld/linkify-usernames | /index.ts | 2.90625 | 3 | import createHtmlElement from 'create-html-element';
const regex = () => (/\B@([a-z0-9](?:-?[a-z0-9]){0,38})/gi);
interface IAtributes {
class: string,
id: string,
target: string
}
const linkifyUsername = (match: string, link: string, attributes: IAtributes | null) => {
let username = match.replace(/^... |
615a6f0a4ca73095ab0ba2035e4f7686ac047809 | TypeScript | Mellywins/Karpully-Backend | /src/generics/connection-paging.ts | 2.875 | 3 | import {ArgsType, Field, Int, ObjectType} from '@nestjs/graphql';
import {Type} from '@nestjs/common';
import * as Relay from 'graphql-relay';
import {
Min,
Validate,
ValidateIf,
ValidationArguments,
ValidatorConstraint,
ValidatorConstraintInterface,
} from 'class-validator';
import {FindManyOptions, Reposi... |
2371da04ba5c84e86d12a9057ad9bdb51ac48106 | TypeScript | gaellebauvin/nodejs | /express/src/RoomCollection.ts | 3.328125 | 3 | import {IRoom} from "./Room";
export interface IRoomCollection extends Iterator<IRoom> {
/**
* Liste des identifiants des salons
*
* @type {Array<string>}
* @memberof IRoomCollection
*/
readonly all: Array<string>
/**
* Récupération des données d'un salon dont l'identifiant es... |
2ea1c14b656706f9c0150a362210caa65879f233 | TypeScript | HydraCG/Heracles.ts | /tests/BodyResourceBoundIriTemplateExpansionStrategy.spec.ts | 2.53125 | 3 | import * as sinon from "sinon";
import BodyResourceBoundIriTemplateExpansionStrategy from "../src/BodyResourceBoundIriTemplateExpansionStrategy";
import MappingsCollection from "../src/DataModel/Collections/MappingsCollection";
import { MappingBuilder } from "../src/DataModel/ITemplatedResource";
import MappingsBuilder... |
3516063c95638143c0055d8302e534c0d85a755f | TypeScript | lgwebdream/awilix | /src/param-parser.ts | 3.71875 | 4 | import { createTokenizer, Token } from './function-tokenizer'
/**
* A parameter for a function.
*/
export interface Parameter {
/**
* Parameter name.
*/
name: string
/**
* True if the parameter is optional.
*/
optional: boolean
}
/*
* Parses the parameter list of a function string, including ES... |
bfdafb9751f0c280a0a04146677b8a44648bf508 | TypeScript | cstuncsik/marble | /packages/core/src/operators/use/use.operator.spec.ts | 2.5625 | 3 | import { tap } from 'rxjs/operators';
import { Effect } from '../../effects/effects.interface';
import { HttpRequest } from '../../http.interface';
import { Marbles } from '../../util/marbles.spec-util';
import { use } from './use.operator';
const createMockReq = (test = 0) => ({ test } as any as HttpRequest);
const ... |
bdf6cb11ff33383d33a55569df9e2616e50bf0ba | TypeScript | t13ka/notes-sharing | /Web/ClientApp/app/components/notes/new-note.component.ts | 2.609375 | 3 | import { Component } from '@angular/core';
import { NotesDataService } from './notes.data.service'
import { Router } from '@angular/router';
export class NewNoteItemModel {
constructor(public title: string, text: any, lifetime: string) {}
}
@Component({
selector: 'new-note-form',
templateUrl: './new-note... |
152328069c6ba709f41d482a19476b04ab1e46b3 | TypeScript | sergidt/data-structures-and-algorithms | /src/algorithms/backtracking/sudoku-solver.ts | 3.015625 | 3 | export type SudokuBoard = Array<Array<number>>;
export type Location = [number, number];
export type SudokuMap = {
[key: string]: SudokuBoard;
}
export enum SudokuDifficulty {
Easy = 'Easy',
Difficult = 'Difficult',
VeryDifficult = 'Very difficult'
}
const UNASSIGNED = 0;
export const SUDOKUS: Sudo... |
4f726e712b0369f88e9e19116b84188695fb6728 | TypeScript | lanemt/definitelytyped.github.io | /types/amcharts/TrendLine.d.ts | 3.390625 | 3 | /**
* Trend lines are straight lines indicating trends, might also be used for some different purposes.
* Can be used by Serial and XY charts.
* To add/remove trend line, use chart.addTrendLine(trendLine)/chart.removeTrendLine(trendLine) methods
* or simply pass array of trend lines: chart.trendLines = [trendLine1,... |
c5daf41f50669dece8f0824c156dd0655c9823f9 | TypeScript | chesteryang/CoreAngular | /CoreAngular/ClientApp/src/app/scaffold/redux/reducers/index.ts | 2.5625 | 3 | import { Reducer, combineReducers } from 'redux';
import {IUserInfo, IScaffoldState } from '../common';
import { UserInfoActions } from '../actions';
export const initUserInfo: IUserInfo = { name: '', phone: '', email: ''};
export const initScaffoldState: IScaffoldState = { userInfo: initUserInfo };
export const user... |
e123d23f3132763c24590267c4e26a0624b1c1bd | TypeScript | trmcnealy/EngineeringToolsServer | /wwwroot/js/Ignore/DataTypes/contracts/federatedConceptualSchema.ts | 2.75 | 3 | /// <reference path="../_references.ts"/>
export module data {
export interface FederatedConceptualSchemaInitOptions {
schemas: {[name: string]: ConceptualSchema};
links?: ConceptualSchemaLink[];
}
/** Represents a federated conceptual schema. */
export default class FederatedConceptu... |
9c77a0f964d7eb0ae2c2fd6d420318659ae00014 | TypeScript | ChisWill/ep-swoole | /static/ts/EpSocket.ts | 2.796875 | 3 | namespace Ep {
export class EpSocket {
webSocket: WebSocket;
events: {};
constructor(url: string) {
this.webSocket = new WebSocket(url);
}
public onOpen(callback: any): void {
this.webSocket.onopen = callback;
}
public onClose(callb... |
0d76f71dbce60fd3046567c7bc0dee8cb8952de0 | TypeScript | GninninwokyOuattara/React-Watch-List | /server/src/controllers/users/getUserById.ts | 2.578125 | 3 | import { RequestHandler } from "express";
import mongoose from "mongoose";
import ErrorWithStatusCode from "./../../utils/customError";
import Movie from "../../db/schemas/MovieSchema";
import User from "../../db/schemas/UserSchema";
interface userData {
_id: string;
name: string;
email: string;
image... |
f399527742b4851800293dc5a7162b794f35f990 | TypeScript | j-rewerts/task-runner | /source/tr/timeout.ts | 3.125 | 3 | module tr {
/**
* Decorates a Task and enforces a max-execution time limit.
*
* <p>If specified time interval elapses before the decorated Task has complete it is considered to be an error.
* The decorated Task will be interrupted in that event.
*/
export class Timeout extends tr.Abstract {
pri... |
ee97f7e66ddbc53e063e6add46740b393a6a8a37 | TypeScript | catos/pew | /src/shaders/darkenColors.ts | 3.171875 | 3 | const darkenColors = (context: CanvasRenderingContext2D, alpha: number = 4) => {
// Get the CanvasPixelArray from the given coordinates and dimensions.
const imgd = context.getImageData(0, 0, context.canvas.width, context.canvas.height);
const pix = imgd.data;
// Loop over each pixel and invert the color.
fo... |
a556cf52731151751fc75f8a7b04d57cc0611e88 | TypeScript | AmbientLighter/waldur-homeport | /src/marketplace/orders/store/reducer.ts | 2.734375 | 3 | import * as constants from './constants';
const INITIAL_STATE = {
stateChangeStatus: {
processing: false,
processed: false,
},
};
export const ordersReducer = (state = INITIAL_STATE, action) => {
const { type, payload } = action;
switch (type) {
case constants.SET_ORDER_STATE_CHANGE_STATUS:
... |
6e9f90b7eae06bcb14ef15599a7c3afba192690c | TypeScript | ramtob/angular-heros-tutorial | /src/app/store/message/message.reducer.ts | 2.640625 | 3 | import * as MessageActions from './message.action';
import {MessageState, initializeMessageState, MessageListState} from "./message.state";
import {Message} from "../../models/message.model";
export type Action = MessageActions.All;
const defaultMessageStates: MessageState[] = [
{
...Message.generateMockInstanc... |
fbd2995ba82fe0b12ad7a10814bc40c1d41cd308 | TypeScript | ariel017/typescript-examples | /src/animales/animales.ts | 3.59375 | 4 | class Animal {
nombre: string;
constructor(nombre: string) {
this.nombre = nombre;
}
mover(distancia: number=0) {
console.log(`${this.nombre} se movio ${distancia}m.`);
}
}
class Gato extends Animal {
constructor(nombre: string) {
super(nombre);
}
mover(di... |
0777ccc15c5ed773e626b9f0c10bd098034e2168 | TypeScript | santoshchaubey7/hindu-panchang | /src/actions/advance-panchang.ts | 2.703125 | 3 | import { Dispatch } from 'redux';
import { AdvancePanchangApiActionTypes } from '../common/action-contants';
import { AdvancePanchangApiDataAction, AdvancePanchangApiErrorAction } from '../interface/actions';
import { AdvancePanchangApiResponse } from '../interface/advance-panchang-api';
/**
* Fetchs advance panchan... |
9248a63b6e2bb5dae643e5ea8cf68751e9237bdf | TypeScript | jzyrobert/eleven-stats | /src/types/statTypes.ts | 2.6875 | 3 | import dayjs, { Dayjs } from "dayjs";
export const enum Ranked {
All = "all",
Ranked = "ranked",
Unranked = "unranked",
}
export const enum Home {
All = "all",
Home = "home",
Away = "away",
}
export const enum Higher {
All = "all",
Higher = "higher",
Lower = "lower",
}
// Examp... |
7cafbbcc300944b09a0208d7cf83563299433b2a | TypeScript | Diogny/adt | /test/dfs-analizer.ts | 2.671875 | 3 | import { expect } from 'chai';
import { Graph } from '../src/lib/Graph';
import { dfsAnalysis } from "../src/lib/Graph-Search";
import { CyclesAnalizer, EdgeAnalizer, ComponentAnalizer } from '../src/lib/Graph-Analizers'
//run as Task launch.json
//or node node_modules/mocha/bin/_mocha --require ts-node/register test/... |
575f0ce084bc9d13323ef6b86c9cc84946f7a507 | TypeScript | oleomiranda/compare_nba_players | /helper/playerInfo.ts | 2.578125 | 3 | import axios, { AxiosResponse } from "axios";
import * as cheerio from "cheerio";
export default async function playerData(name: string, year: string): Promise<any> {
try {
let playerPage = await axios(`https://www.basketball-reference.com/search/search.fcgi?search=${name}`)
let $ = cheerio.load(playerPage.data)... |
76209df1c2793c98f5224162c8590b88f9e611a4 | TypeScript | catalin-enache/catalin-enache-15-09-2021 | /src/state/middlewares/streaming/streaming.midleware.ts | 2.59375 | 3 | import { createAction, Middleware } from "@reduxjs/toolkit";
import {
StreamingBaseEvent,
StreamingCloseEvent,
StreamingMessageEvent,
StreamingOpenEvent,
SubscriptionEvent,
SubscriptionPayload,
} from "./types";
export const actionStreamingConnectionPending =
createAction<StreamingBaseEvent>("streaming/c... |
069a9134884d842565147f80bdc3d0e19d816f94 | TypeScript | irtizabatool/nestjs-chat-app | /src/chats/chats.service.ts | 2.734375 | 3 | import { Injectable } from '@nestjs/common';
import { Chat } from './chat.model';
import { CreateChatDto } from './dto/create-chat.dto';
import { FilterDto } from './dto/filter-chat.dto';
@Injectable()
export class ChatsService {
private chats: Chat[] = [];
getAllMessages(): Chat[] {
return this.chats;
}
... |
3d88c06b53d882a2090baa6a83e910e1fe3fb1b1 | TypeScript | whwh1233/vue3 | /10_learn_typescript/12_Typescript的其他内容补充/src/utils/math.ts | 2.59375 | 3 | export function add(num1:number,num2:number) {
return num1 + num2
}
export function sub ( num1:number,num2:number) {
return num1 - num2
} |
55d88adebdb28d6db05612e0eaa4d419bdd79619 | TypeScript | VasilhsSot/Angular-Training | /angular7-routing-and-navigation/src/app/department-detail/department-detail.component.ts | 2.65625 | 3 | import { Component, OnInit } from '@angular/core';
//importing ActivatedRoute so we can grab the id from the URL.
//Router so we can change page
//ParamMap so we can use Observable approach.
import { ActivatedRoute , Router, ParamMap} from '@angular/router';
@Component({
selector: 'app-department-detail',
templat... |
03e3644355a6c998e96a167b78bc867a0761b99d | TypeScript | adietish/penfold | /src/standup/service.ts | 2.53125 | 3 | import { IMessageConsumer, Response, Message, Robot} from '../protocol';
import * as Report from './report';
import * as Channel from './channel';
import * as moment from 'moment';
import * as logger from 'winston';
import { IChannel, IReport } from './model';
export class StandupService implements IMessageConsumer {... |
a17eca28e3c93806723225cba1bec8d9c76388ec | TypeScript | hepiska/puskesmas | /src/methods/voice-queue.ts | 2.5625 | 3 | import {db} from '@src/utils/firebase'
interface Voicequeue {
text: string
service: string
}
const voicequeueDb = db.collection("voicequeue")
export const addNewVoice = async (data: Voicequeue): Promise<MessageResponseType> => {
try {
const puskesmas = localStorage.getItem("puskesmas") || ""
con... |
34b4fcfecaa4084df9e1b655cb34e36897138be6 | TypeScript | Djiffit/fs | /part7/blog-ui/src/reducers/notificationReducer.ts | 3.1875 | 3 | import { NotificationType, NotificationClass } from '../types'
import { Dispatch } from 'redux'
const initialState = [] as NotificationType[]
export interface CreateNotificationType {
type: 'CREATE_NOTIFICATON',
notification: NotificationType,
}
export interface DeleteNotificationType {
type: 'DELETE_NOT... |
a04559a92ddeef312aa583ed841ecb685255045b | TypeScript | aztack/webgl-programming-guide | /oowebgl/src/math/vector.ts | 2.640625 | 3 | import {
toString, copy, clone,
add, substract,
scale, negate, zero, each, static_from
} from './utils-shared';
import {
divide,
inverse, dot, multiply, normalize, angle, lerp, squaredDistance, distance
} from './utils-vec';
import {
hypot
} from './utils'
import { Copyable } from './types';
export class... |
2a3f00d1f6e98616193d7975dd7f29781cc23a5e | TypeScript | gavongra/haxbotron | /db/router/v1.player.router.ts | 2.578125 | 3 | import express, { Request, Response, Router, NextFunction } from "express";
import { PlayerController } from '../controller/player.controller';
import { IRepository } from '../repository/repository.interface';
import { PlayerRepository } from '../repository/player.repository';
import { Player } from '../entity/player.e... |
b6253b933080c07bc8b39637d39061852236da9b | TypeScript | flyzsd/spring-boot-web-component-app | /src/main/webapp/components/howto-checkbox.ts | 2.625 | 3 | // @ts-ignore
import {html, render} from '../webjars/lit-html/lit-html.js';
// @ts-ignore
import {styleMap} from '../webjars/lit-html/directives/style-map.js';
// @ts-ignore
import {classMap} from '../webjars/lit-html/directives/class-map.js';
// @ts-ignore
import {ifDefined} from '../webjars/lit-html/directives/if-def... |
a5e070b9e773c535c20c22edb348e69c804466a7 | TypeScript | McCutchenCompany/memorial-frontend | /src/app/store/create-photos/reducers/photo-need-approval.reducer.ts | 2.515625 | 3 | import { createEntityAdapter, EntityAdapter, EntityState } from '@ngrx/entity';
import { Photo } from '@shared/models/photo.model';
import { All, CreatePhotosActionTypes } from '../photos.actions';
function sortByDate(p1, p2) {
const p1Date = new Date(p1.created_at);
const p2Date = new Date(p2.created_at);
if (... |
7bc45e634d4901013d7dc6f5723b3b615cd0d551 | TypeScript | philmander/save-the-moon | /src/core/BaseSprite.ts | 2.921875 | 3 | export default abstract class BaseSprite {
protected _spriteImage: ImageBitmap;
protected _width: number;
protected _height: number;
protected _x: number;
protected _y: number;
protected _dx: number = 0;
protected _dy: number = 0;
protected _strength: number;
protected _scoreModifi... |
bb0f7cff888ece759e98639e6ec4c4b5857fed67 | TypeScript | enramir/TFG-Project | /frontend-angular/src/app/models/product.ts | 2.75 | 3 | export class Product{
// public name: string;
// public image: string;
// public description: string;
// public price: number;
// constructor(name, available, description, price){
// this.name = name;
// this.image = image;
// this.description = description;
// this.... |
dae870b519dd81e6ced8e3692873a791b6c03170 | TypeScript | khpatel4991/dsalgo | /src/euler/005.ts | 2.921875 | 3 | const gcd = (x: number, y: number): number => {
if (x % y === 0) {
return y;
} else {
return gcd(y, x % y);
}
};
export const smallestMultiple = (n: number): number => {
let ans = 1;
for (let i = 1; i <= n; i++) {
ans = (ans * i) / gcd(ans, i);
}
return ans;
};
export {};
|
56da314d317d4f8a36e534d7b8cd4a6a8fe86fd3 | TypeScript | vladislavs-poznaks/codelex-prep-course | /exercises/02-mini-projects/00-tic-tac-toe/src/Game.test.ts | 3.1875 | 3 | import { Game } from "./Game";
describe("Tic-Tac-Toe", () => {
it("should start with blank state", () => {
const game = new Game();
expect(game.getCells()).toEqual([
"-", "-", "-",
"-", "-", "-",
"-", "-", "-"
]);
expect(game.getTurn()).toBe("X");
expect(game.getWinner()).toBe(... |
d52805a38248bc530db6865dfc7dfac099a502db | TypeScript | Xtry333/HotelManager | /client-react/src/Server.ts | 2.53125 | 3 | import Axios, { AxiosRequestConfig } from 'axios';
import { RouteComponentProps } from 'react-router-dom';
import * as config from './app.config';
import { Dto } from './dtos/Dto';
import { ResourceError } from './dtos/Error';
import { SystemLogout } from './components/Login';
const instance = Axios.create({
base... |
9261c09b66bf032b7efc3a029d5c1896a305c1bc | TypeScript | Loeka1234/graphql-typeorm-api | /src/mail/index.ts | 2.53125 | 3 | import nodemailer from "nodemailer";
import fs from "fs";
import path from "path";
import handlebars from "handlebars";
const TEMPLATES_PATH = path.join(process.cwd(), "mail-templates");
const PARTIALS_PATH = path.join(TEMPLATES_PATH, "partials");
const sendMail = async (to: string, html: string, subject: string) => ... |
c1fdbd575143b1873815387b1570878f81d7dd5f | TypeScript | boian123/nestjs-query | /packages/query-graphql/src/types/query/query-args/interfaces.ts | 2.765625 | 3 | import { Class, Filter, Query, SortField } from '@nestjs-query/core';
import { PagingStrategies, PagingTypes, StaticPagingTypes } from '../paging';
export type BaseQueryArgsTypeOpts<DTO> = {
/**
* The default number of results to return.
* [Default=10]
*/
defaultResultSize?: number;
/**
* The maximum... |
ed14839e83128cf79e8a16a7592e30e5a6c4b8a9 | TypeScript | neotag/riakuto | /10-redux/04-fsa/src/actions/counter.ts | 2.8125 | 3 | export const ADD = 'ADD';
export const DECREMENT = 'DECREMENT';
export const INCREMENT = 'INCREMENT';
export const add = (amount: number) => ({
type: ADD as typeof ADD,
payload: { amount },
});
export const decrement = () => ({
type: DECREMENT as typeof DECREMENT,
});
export const increment = () => ({
type: ... |
4f5b51ab3d02d9a5cc1a25414c5fccb3afeac6db | TypeScript | jtsshieh/Advent-of-Code-2020 | /src/Day6/Part2.ts | 2.515625 | 3 | import { readInput } from '../common/utils';
export const main = () => {
const groups = readInput(__dirname).split('\r\n\r\n');
return groups.reduce((total, group) => {
return (
total +
group.split('\r\n').reduce((acc, cur) => {
return [...acc].filter((item) => cur.includes(item)).join('');
}).length... |
27a0f1c1a684ad3ac2830627b3b16164b317aa5b | TypeScript | dodevops/file-hierarchy | /lib/FileNode.ts | 3.109375 | 3 | /**
* @module file-hierarchy
*/
/**
*/
// import needed modules
import { AbstractNode } from 'js-hierarchy'
import * as fs from 'fs'
import { FileNodeType } from './FileNodeType'
import { ScanOptionsInterface } from './ScanOptionsInterface'
import * as path from 'path'
import * as minimatch from 'minimatch'
import... |
58033f458a81d55c054fbb5448b538b85de2f8f6 | TypeScript | MpStyle/air-quality-monitor | /web-interface/src/reducer/AppErrorsReducer.ts | 2.765625 | 3 | import { Action } from "redux";
import { DeleteDeviceErrorAction, DeleteDeviceErrorActionName } from "../action/DeleteDeviceAction";
import { FetchDevicesErrorAction, FetchDevicesErrorActionName } from "../action/FetchDevicesAction";
import { FetchLastReadingsErrorAction, FetchLastReadingsErrorActionName } from "../act... |
b348c4018aa72d4e7f506386374c391e5010339b | TypeScript | jinglikeblue/boxman | /h5_version/src/views/ControlLayer.ts | 2.84375 | 3 | class ControlLayer extends egret.Shape
{
private startPos: egret.Point;
private nowPos: egret.Point;
public constructor()
{
super();
this.touchEnabled = true;
this.graphics.beginFill(0, 0.3);
this.graphics.drawRect(0, 0, DataCenter.stage.stageWidth, DataCenter.s... |
d37a3dd7bdac02de34fd92c4831aa62f6938a958 | TypeScript | kinecosystem/kin-devplatform-marketplace-server | /scripts/src/models/wallets.ts | 2.625 | 3 | import { BaseEntity, Column, Entity, PrimaryColumn } from "typeorm";
import { register as Register } from "./index";
@Entity({ name: "wallets" })
@Register
export class Wallet extends BaseEntity {
public static async doesExist(address: string, appId: string): Promise<boolean> {
const query = Wallet.createQueryBuil... |
19628687b0f93ff6f5deb41c1e930f423a925961 | TypeScript | OOlashyn/PCF-SamplePopup | /SamplePopup/index.ts | 3 | 3 | import {IInputs, IOutputs} from "./generated/ManifestTypes";
interface PopupDev extends ComponentFramework.FactoryApi.Popup.Popup {
popupStyle: object;
}
export class SamplePopup implements ComponentFramework.StandardControl<IInputs, IOutputs> {
private _container: HTMLDivElement;
private _popUpService: ComponentF... |
cc6dd83d71745aec5b4f5d93b24b2a15ae96c2bd | TypeScript | einfachiota/explorer | /client/src/app/components/FooterProps.ts | 2.875 | 3 | /**
* The props for the Footer component.
*/
export interface FooterProps {
/**
* The dynamic sections to link to.
*/
dynamic: {
/**
* The label for the network.
*/
label: string;
/**
* The url to navigate to.
*/
url: string;
}[... |
d78958289ed5060f85823f56388bc4d086e9ca96 | TypeScript | bipinbce/EComService-1 | /src/models/index.ts | 2.53125 | 3 | import {Model, Table, Column, ForeignKey, BelongsTo} from 'sequelize-typescript';
@Table
export class User extends Model<User> {
@Column name: string;
@Column email: string;
@Column phoneNo: string;
@Column address : string;
@Column password : string;
}
@Table
export class Product extends Model<Prod... |
f6cb6056b04b71f3b4556e33d050bdb4327326c2 | TypeScript | jhlagado/obags | /src/for-each.ts | 3.03125 | 3 | import { Effect, CB } from "./common";
export class CBForEach implements CB {
operation: Effect;
source: CB | undefined;
talkback: CB | undefined;
constructor(source: CB, operation: Effect) {
this.source = source;
this.operation = operation;
this.source?.init(this);
}
... |
2e5f2c64c792c8cde0ee0b8925b3d6bfa28d6783 | TypeScript | intelliapps-io/booking-app | /server/src/helpers/graphqlObjects/PaginatedResponse.ts | 3.015625 | 3 | import { ObjectType, Field, Int, ClassType, InputType } from "type-graphql";
export function PaginatedResponse<TItem>(TItemClass: ClassType<TItem>) {
// `isAbstract` decorator option is mandatory to prevent registering in schema
@ObjectType({ isAbstract: true })
abstract class PaginatedResponseClass {
// her... |
f9ed1ed124e8c7ac7cd5026466f15d2f8653a9c8 | TypeScript | bgeihsgt/celo-monorepo | /packages/phone-number-privacy/signer/src/database/models/domainState.ts | 2.6875 | 3 | import { SequentialDelayDomainState, WarningMessage } from '@celo/phone-number-privacy-common'
import {
Domain,
domainHash,
isSequentialDelayDomain,
} from '@celo/phone-number-privacy-common/lib/domains'
export const DOMAINS_STATES_TABLE = 'domainsStates'
export enum DOMAINS_STATES_COLUMNS {
domainHash = 'doma... |
d93b9a6c9b600b6a4cda5cfaddc713bebb98e775 | TypeScript | twilio-labs/paste | /packages/paste-style-props/src/types/typography.ts | 2.78125 | 3 | // https://styled-system.com/api/#typography
import type {Properties} from 'csstype';
import type {ThemeShape} from '@twilio-paste/theme';
import type {ResponsiveValue} from '@twilio-paste/styling-library';
// Tokens
export type FontFamilyOptions = keyof ThemeShape['fonts'] | 'inherit';
export type FontSizeOptions = k... |
c811b7ae554c8d67016d3531addb1359bdfd2242 | TypeScript | 16patsle/TermListDB | /packages/termlist-web/src/components/TermList/TermRow.stories.ts | 2.53125 | 3 | import type { Story } from '@storybook/vue3'
import TermRow from './TermRow.vue'
export default {
title: 'TermList/TermRow',
component: TermRow,
argTypes: {
onEdit: { action: 'edited' },
onRemove: { action: 'removed' },
},
decorators: [
() => ({
template: `
<table class="table">
<... |
14dfdc6ca823efdce51e6ed08bac14614c1d9a85 | TypeScript | alexodle/vitamind | /src/nodeUtils.ts | 2.765625 | 3 | // Utils intended for node.js/server use only
export function requireEnv(k: string): string {
// NOTE: Only use this for env vars we do not expect to be replaced in code (e.g. NODE_ENV and BASE_URL)
if (process.env.NODE_ENV !== 'production') {
if (['BASE_URL', 'NODE_ENV'].indexOf(k) !== -1) {
throw new E... |
7c16965b617605eff82423e0c5de74f880bda66a | TypeScript | hejny/vire | /src/detection/getAreaColor.ts | 2.84375 | 3 | /*
import { Color } from './Color';
import Vector2 from './Vector2';
export function getPointColor(
ctx: CanvasRenderingContext2D,
point: Vector2,
): Color {
var frame = ctx.getImageData(point.x, point.y, 1, 1);
return new Color(frame.data[0], frame.data[1], frame.data[2]);
}
export function setPointC... |
a53f3301f40bcc9b9da05fb35ebc7234e524d23c | TypeScript | Frikki/typed | /packages/logic/src/is/isIterable.ts | 3.46875 | 3 | import { isIterator } from './isIterator'
/**
* Returns true if a value is an Iterable.
* @name isIterable<A>(x: any): x is Iterable<A>
*/
export function isIterable<A>(x: any): x is Iterable<A> {
return x && typeof x[Symbol.iterator] === 'function' && isIterator(x[Symbol.iterator]())
}
|
5a846238b35c57cf50cf4f4c1cde8caa192dba33 | TypeScript | Bimal-Angular/TestNg7 | /src/app/Pipes/myFilterPipe.ts | 2.609375 | 3 | import {Pipe, PipeTransform} from '@angular/core'
@Pipe({
name:'myFilterPipe',
pure:false //
})
export class myFilterPipe implements PipeTransform
{
transform(value: any[], ...args: any[]) {
let filterby = args[0];
if (!value || !filterby)
return value;
return ... |
7f7bbd56c4828eadb4013d60849afcaeb61b0d53 | TypeScript | Kurt29/ngx-function-expression | /ngx-function-expression/src/lib/fn-evaluation.service.ts | 2.90625 | 3 | import {Injectable, isDevMode} from '@angular/core';
import {FunctionExpression} from './fn-function-expression.type';
@Injectable({
providedIn: 'root'
})
export class FnEvaluationService {
private warningsEnabled = isDevMode();
private static checkContext(context: object, fnName: string): void {
if (conte... |
0fb3af9e4f78818d8b81b73ff54979d39b856668 | TypeScript | GibbyH/MunchiesForMaladies_Client | /src/app/models/meal.model.ts | 2.875 | 3 | export class Meal {
strMeal: string;
strInstructions: string;
constructor(strMeal: string, strInstructions: string) {
this.strMeal = strMeal;
this.strInstructions = strInstructions;
}
}
|
bc8fa28b800f7048c442de8f1f3fb9677e235552 | TypeScript | vladimirdd96/softuniJsAdvanced | /DOM Manipulation/DOM Manipulations ex/notificationF/solution.ts | 2.625 | 3 | function main() {
const btnGetNotified = <HTMLElement>document.getElementById('btnGetNotified')
const notification = <HTMLElement>document.getElementById('notification')
function notify(str: string) {
notification.style.display = 'block'
notification.textContent = str
setTimeout(()... |
264c4f12a805cb562ba41ba3a79ab43e68f424b2 | TypeScript | dp28/account-management | /src/domain/identities/state.ts | 2.71875 | 3 | import produce, { Draft } from "immer";
import { ID, get } from "../framework";
import { DomainState } from "../projection";
import {
IdentityEvents,
IDENTITY_ADDED,
IDENTITY_DELETED,
SECRET_ADDED,
} from "./events";
export interface Identity {
id: ID;
personId: ID;
organisationId: ID;
name: string;
... |
917637596f8fbfcd35b7024546d61ae0d3c9aec2 | TypeScript | dhyanitha/twitter-clone-nest-typeorm-backend | /src/users/users.controller.ts | 3 | 3 | import { Controller, Get, Post, Delete, Param, Body, ForbiddenException, NotFoundException } from '@nestjs/common';
import { omit } from 'lodash';
import { CreateUserDTO } from './dto';
import { User } from './user.entity';
import { UsersService, UsernameAlreadyExist, EmailAlreadyExist } from './users.service';
/**
... |
206506fec714366b1fc34358df406f579f79189a | TypeScript | StoneT2000/brain.js | /src/recurrent/matrix/clone.ts | 2.71875 | 3 | import { Matrix } from '.';
/**
*
* @param {Matrix} product
* @return {Matrix}
*/
function clone(product: Matrix): Matrix {
const cloned = new Matrix();
cloned.rows = product.rows;
cloned.columns = product.columns;
cloned.weights = product.weights.slice(0);
cloned.deltas = product.deltas.slice(0);
re... |
ab90424ccd5aea4f0e11d09bb0ca393393f98d8c | TypeScript | tngraphql/console | /src/Contracts/index.ts | 2.71875 | 3 | /**
* (c) Phan Trung Nguyên <nguyenpl117@gmail.com>
* User: nguyenpl117
* Date: 3/26/2020
* Time: 9:54 AM
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import { ParsedOptions } from 'getopts'
import { Colors } from '@poppinss/c... |
127295f3a25639a4ebf8c13c87818f165c6ee200 | TypeScript | notVitaliy/evjs | /src/individual/individual.model.ts | 2.546875 | 3 | export interface Fitness {
(entity: any, name: string): number
}
export interface Mutate {
(entity: any, name: string): any
}
export interface Mate {
(mother: any, father: any, motherName: string, fatherName: string): [any, any]
}
export interface IndividualConfig {
fitness: Fitness
mutate: Mutate
mate: Mat... |
713bb1cb5ba4602e61cfacedb4924bd1e4b2940e | TypeScript | olegpetrush/React-freight-pay | /packages/gateway/src/lib/di/Container.ts | 2.6875 | 3 | export default class Container {
services: any;
constructor() {
this.services = {};
}
has(id: any) {
return !!this.services[id];
}
register(id: any, service: any) {
this.services[id] = service;
}
get(id: any) {
if (!this.services[id]) {
return null;
}
return this.servi... |
6b91e583b3f7021f8a12c2146391d046ba9c7afb | TypeScript | CiBuildOrg/packages | /packages/mail/index.ts | 2.546875 | 3 | import { config } from "dotenv";
import { createTransport, Transporter } from "nodemailer";
import { success, logError } from "@staart/errors";
import aws from "aws-sdk";
config();
const EMAIL_FROM = process.env.EMAIL_FROM || "";
const EMAIL_HOST = process.env.EMAIL_HOST || "";
const EMAIL_PORT = process.env.EMAIL_PO... |
94cc8d865f01ab5d33822d4aef076ca9834e805e | TypeScript | ExePtion31/cursoRxJs | /src/operadores/01-map-pluck.ts | 2.78125 | 3 | import { fromEvent, range, from, of } from 'rxjs';
import { map, pluck, mapTo } from 'rxjs/operators'
const data = {
nombre: 'Juan',
apellido: 'Perez',
ubicacion:{
pais: 'Colombia',
ciudad: 'Bogotá'
},
edad: 21
}
//pipe map
range(1,3).pipe(
map<number, number>(val => val * 10)
... |
07043a83abdd23baca39c0b58e051e37a071309f | TypeScript | venkatarami-ui/Angular-7_POC | /src/app/app.component.ts | 2.5625 | 3 | import { Component } from '@angular/core';
import { FavoriteChangeEventArgs } from './favorite/favorite.component';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
task = {
title: 'Review the Application',
assignee: ... |
97581171dfde1e32712ef433e16a8947e54e2aec | TypeScript | LunarFuror/phantasmal-world | /src/quest_editor/gui/AsmEditorToolBar.ts | 2.515625 | 3 | import { ToolBar } from "../../core/gui/ToolBar";
import { CheckBox } from "../../core/gui/CheckBox";
import { AsmEditorStore } from "../stores/AsmEditorStore";
export class AsmEditorToolBar extends ToolBar {
constructor(asm_editor_store: AsmEditorStore) {
const inline_args_mode_checkbox = new CheckBox(tru... |
f3df720eee4dbd63fa349aad4900c44d93a97ca0 | TypeScript | JonathanHuarca/Proyecto-Care | /src/resources/section/controllers/upload-file.ts | 2.625 | 3 | import catchAsync from '../../../utils/catchAsync'
import moment from 'moment-timezone'
import AWS from 'aws-sdk'
let msgErrorController = 'Error en uplodad file section controlador'
/**
* credenciales para S3
*/
const bucket = process.env.BUCKET_NAME
const s3 = new AWS.S3({
accessKeyId: process.env.ID,
secretA... |
554116af1923c36b00206fe1f0829111b65095ef | TypeScript | Suko-dev/ignite-4semana-desafio1 | /src/modules/users/useCases/showUserProfile/ShowUserProfileUseCase.spec.ts | 2.53125 | 3 | import { InMemoryUsersRepository } from "../../repositories/in-memory/InMemoryUsersRepository";
import { CreateUserUseCase } from "../createUser/CreateUserUseCase";
import { ShowUserProfileUseCase } from "./ShowUserProfileUseCase";
let createUserUseCase: CreateUserUseCase;
let inMemoryUsersRepository: InMemoryUsersRe... |
29f89cb15876b582cc999edd6877c1d9703d121a | TypeScript | flisbao-ciandt/stryker-dashboard | /packages/data-access/src/services/BlobServiceAsPromised.ts | 2.53125 | 3 | import { BlobService, createBlobService } from 'azure-storage';
import { promisify } from 'util';
export class BlobServiceAsPromised {
public createContainerIfNotExists: (container: string, options: BlobService.CreateContainerOptions) => Promise<BlobService.ContainerResult>;
public createBlockBlobFromText: (conta... |
14c9401e23f5c196465d184c08c5360f79a2a198 | TypeScript | Eden-Hazani/SweetBash | /Utility/saveCurrentGame.ts | 2.671875 | 3 | import AsyncStorage from "@react-native-async-storage/async-storage";
export const saveGame = async (currentScore: number, currentLevel: number) => {
if (currentScore === 0) return;
const gameObj = {
gameScore: currentScore,
gameLevel: currentLevel,
date: new Date().toLocaleString()
... |
a0e5d6d841a42d6d89f0b098bdfb6660aaa0f1c1 | TypeScript | cyberixae/experimental-ts | /test/Tombstone.ts | 2.65625 | 3 | import * as _ from '../src/Tombstone'
describe('Tombstone', () => {
it('tombstone', () => {
const stone: _.Tombstone<number> = _.tombstone(123)
expect(stone).toBeInstanceOf(_.Tombstone)
})
it('toString', () => {
expect(String(_.tombstone(123))).toStrictEqual('Tombstone {}')
})
})
|
aadb662f7f782d080e8c0a0a205e3e4c26bced2b | TypeScript | Haivex/clean-code-typescript | /src/errors/Http404Error.ts | 2.5625 | 3 | import { BaseError } from "./BaseError";
import { HttpStatusCode } from "./HttpStatusCode";
export class Http404Error extends BaseError {
constructor(description = "Not Found") {
super("NOT FOUND", HttpStatusCode.NOT_FOUND, description, true);
}
}
|
9bed99e95fbb212ed24c30d4db8caa9eff42ffa6 | TypeScript | Visn0/pathfinding-ui | /src/algorithms/IAlgorithm.ts | 3.46875 | 3 | import Board from "../Board";
/////////////////////////////////
// INTERFACE
/////////////////////////////////
export type BoardPath = Array<ICoordinate>
export interface IAlgorithm {
findPath(board: Board, animationDelay: number): BoardPath
}
export class IBaseCoordinate {
row: number
col: number
construc... |
4bc12c42461e1bfd13d3b2a60131bca509bae78b | TypeScript | bhoomidesai/SkillMap | /my-app/src/app/employee.service.ts | 2.640625 | 3 | import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { of } from 'rxjs/observable/of';
import { catchError, map, tap } from 'rxjs/operators';
import {Employee} from './employee';
import { MessageService } from '... |
470d769b244e152a354fb3230792da55d0f9c340 | TypeScript | keycloak/keycloak | /js/libs/keycloak-admin-client/test/stringifyQueryParams.spec.ts | 3.015625 | 3 | import { expect } from "chai";
import { stringifyQueryParams } from "../src/utils/stringifyQueryParams.js";
describe("stringifyQueryParams", () => {
it("ignores undefined and null", () => {
expect(stringifyQueryParams({ foo: undefined, bar: null })).to.equal("");
});
it("ignores empty strings", () => {
... |
50bd8874a902c8d0372602b9a5b1ec5dd63f9797 | TypeScript | AleoHQ-archived/aleo-setup-coordinator-archived | /coordinator-service/src/app.ts | 2.515625 | 3 | import bodyParser from 'body-parser'
import express from 'express'
import { authorize } from './authorize'
import { ChunkStorage, Coordinator } from './coordinator'
import { logger } from './logger'
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace Express {
export... |
da6bc8187e4300133fa61b9a1963c7e412806f63 | TypeScript | bustle/mobiledoc-kit | /src/js/editor/edit-state.ts | 2.921875 | 3 | import { contains, isArrayEqual, objectToSortedKVArray } from '../utils/array-utils'
import Range from '../utils/cursor/range'
import { Option, Dict } from '../utils/types'
import Editor from './editor'
import { Cloneable } from '../models/_cloneable'
import Section from '../models/_section'
import Markup from '../mode... |
f3fbd7737fc6a3e795e3181961147cab262e013d | TypeScript | AlexsaniKY/UnicodeRPG | /src/sprite.ts | 2.859375 | 3 | import { IDrawable, IDrawScaleOptions, IDrawSourceOptions } from "./shared/drawable";
import { Color } from "./shared/color";
export class Sprite implements IDrawable{
canvas: HTMLCanvasElement;
context: CanvasRenderingContext2D;
width: number;
height: number;
constructor(width:number, height:numb... |
df71e25f2bbdc4e48bb49aecdecbbfb93f094b93 | TypeScript | MaciejReimann/patterny | /src/patterns/arabesque/Polygon.ts | 2.8125 | 3 | import p5 from "p5"
import { makeLine } from "../../lib/fabric-wrappers"
import { Edge } from "./Edge"
export class Polygon {
vertices: p5.Vector[] = []
edges: Edge[] = []
constructor(readonly canvas: any) {
this.canvas = canvas
}
addVertex(x: number, y: number): Polygon {
const vertex = new p5.Ve... |
73ddc5542380ab614b4434d6cf015794bf750b3b | TypeScript | nikolay-t16/JMReactBlog | /src/helpers/ValidationError.ts | 2.90625 | 3 | export type ValidationErrorsData = {
email?: string[];
username?: string[];
password?: string[];
};
export default class ValidationError extends Error {
errors: any = {};
constructor(errors?: ValidationErrorsData) {
super();
if (errors) {
this.errors = errors;
}
}
}
|
4e7a3e70d8794d652821fb3556f7010dcaaf858a | TypeScript | cybernetics/WebRx | /test/Bindings/EventSpecs.ts | 2.6875 | 3 | /// <reference path="../typings/jasmine.d.ts" />
/// <reference path="../typings/jasmine-jquery.d.ts" />
/// <reference path="../../src/web.rx.d.ts" />
describe('Bindings', () => {
describe('Event',() => {
it('binds a single event to a handler function',() => {
loadFixtures('templates/Bindings/... |
51ac8ae167e4c4916d5cafb07170e9cc2c952aab | TypeScript | falsandtru/spica | /src/monad/sequence/member/instance/subsequences.ts | 2.75 | 3 | import { Sequence } from '../../core';
import { compose } from '../../../../helper/compose';
compose(Sequence, class <a, z> extends Sequence<a, z> {
public override subsequences(): Sequence<a[], [Sequence.Iterator<a[]>, Sequence.Iterator<a[]>]> {
return Sequence.mappend<a[]>(
Sequence.from([[]]),
Seq... |
630061386f7ecacef9fec25eb239e7d06f864b62 | TypeScript | Inna3112/Tests | /src/10/10_1.test.ts | 2.96875 | 3 | import {
addBooksToUser, addNewCompany, addOneBookToUser,
makeHairStyle,
moveUser,
moveUserToOtherHouse, removeBook,
updateBooks, updateCompany, updateCompany2,
upgradeLaptop,
UsersType,
UserWithBooksType,
UserWithLaptopType, WithCompaniesType
} from "./10_1";
test('refe... |
6d6f950017c4823bc487b5b80c71944ec4abfeb5 | TypeScript | MateuszLebioda/OneCinema_PZ | /UI/src/app/modules/admin/pages/movie-processing/components/seance/validators/seance-validator.ts | 2.546875 | 3 | import {AbstractControl, FormControl, ValidatorFn} from '@angular/forms';
import {DateTime} from 'luxon';
import {Time} from '@angular/common';
import {Luxon} from '../../../../../../../shared/helpers/external/luxon';
import {DateTimeService} from '../../../../../../../shared/helpers/internal/date-time.service';
import... |
b69420edb3dead7f6ccc8ea7ba31d78f876b1319 | TypeScript | kozPio/MasteringTypescript | /web/src/router/routes.ts | 2.828125 | 3 | //router instance
type Routes = {path: string, name: string}
class Router {
constructor(public name: string, public routes: Routes[]){}
start(): {} {
return {
name: this.name,
routes: this.routes
}
}
}
const routerInstance = new Router('routerInstance', [{
path: "/",
name: "R... |
80a114f7b8fc3aea4c22c335120fbcd756bfeb81 | TypeScript | iagobruno/ideas-for-title-animation | /src/ts/utils.ts | 3.640625 | 4 | /**
* Pause the code for some time.
* @returns {Promise}
*/
export function sleep(durationInMs: number) {
return new Promise(resolve => setTimeout(resolve, durationInMs))
}
/**
* Traversing the items of an array with a short time interval between each one.
* @returns {Promise} Returns a promise that resolves on... |
320d7704494ecb2e524115d1af2c4d2ae3961cce | TypeScript | nadineouro/react-concepts | /src/store/country/types.ts | 2.765625 | 3 | export type Country = {
code: string
name?: string
native?: string
phone?: string
continent?: Continent
currency?: string
languages?: Language[]
emoji?: string
emojiU?: string
states?: State[]
}
export type CountryStore = {
countries: Country[]
}
export type Continent = {
code?: string
name?... |
15324fc0575d4847f50c4653093453a998d6b60d | TypeScript | arruw/survey | /src/components/Assessment/scorers/psqi.test.ts | 2.5625 | 3 | import psqi, { IPSQIResponse, IPSQIScore } from './psqi';
it ('scoring best', () => {
expect(psqi.calculateScore(responseBest)).toEqual(scoringBest);
});
it ('scoring worst', () => {
expect(psqi.calculateScore(responseWorst)).toEqual(scoringWorst);
});
it ('hoursInBed', () => {
expect(psqi.hoursInBed('22:00', ... |
de20bef0d0775bb5e43171d428a608c3cd9c80ad | TypeScript | fierydeer/TypeScript | /Telerik-codes/Loops/Calculate n! = 1 * 2 * ... * n improved.ts | 3.609375 | 4 | // Calculate n! = 1 * 2 * ... * n
let n: number = 6;
let result: number = 1;
let logable = n;
while (true) {
if (n <= 1) {
break;
}
result *= n;
n--;
}
console.log(`${logable}! = ${result}`);
|