repo stringlengths 4 140 | commit_id stringlengths 7 7 | rel_path stringlengths 1 3.5k | language stringclasses 37
values | url stringlengths 37 3.56k | raw_url stringlengths 54 3.58k | key stringlengths 20 3.54k | ok bool 1
class | status int64 200 200 | bytes int64 48 425k | content stringlengths 40 425k | worker_id int64 0 7 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Pongpipat-64160139/library-reservations-backend | cb84bf7 | src/role-assignments/role-assignments.module.ts | TypeScript | www.github.com/Pongpipat-64160139/library-reservations-backend/tree/main/src/role-assignments/role-assignments.module.ts | https://raw.githubusercontent.com/Pongpipat-64160139/library-reservations-backend/cb84bf7/src/role-assignments/role-assignments.module.ts | Pongpipat-64160139/library-reservations-backend cb84bf7 src/role-assignments/role-assignments.module.ts | true | 200 | 653 | import { Module } from '@nestjs/common';
import { RoleAssignmentsService } from './role-assignments.service';
import { RoleAssignmentsController } from './role-assignments.controller';
import { TypeOrmModule } from '@nestjs/typeorm';
import { User } from 'src/users/entities/user.entity';
import { Role } from 'src/roles... | 1 |
nialldbarber/Testing | a1daa0c | packages/ui/utils/a11y.ts | TypeScript | www.github.com/nialldbarber/Testing/tree/main/packages/ui/utils/a11y.ts | https://raw.githubusercontent.com/nialldbarber/Testing/a1daa0c/packages/ui/utils/a11y.ts | nialldbarber/Testing a1daa0c packages/ui/utils/a11y.ts | true | 200 | 521 | import type {ViewProps} from 'react-native';
type UiComponents =
| 'Button'
| 'Divider'
| 'Form'
| 'Input'
| 'Layout'
| 'Spinner'
| 'Text';
const SPECIAL_CHARS_REGEX = /[^\p{L}\d]+/gu;
export const getA11yAndTestIdFromText = (
text: string,
component: UiComponents,
): Pick<ViewProps, 'testID' | 'ac... | 5 |
GuitarMusashi616/DiceThrownTS | b35b5f8 | src/view/RollButton.ts | TypeScript | www.github.com/GuitarMusashi616/DiceThrownTS/tree/main/src/view/RollButton.ts | https://raw.githubusercontent.com/GuitarMusashi616/DiceThrownTS/b35b5f8/src/view/RollButton.ts | GuitarMusashi616/DiceThrownTS b35b5f8 src/view/RollButton.ts | true | 200 | 535 | import { Roll } from "../event/Roll";
import { IGameController } from "../game/IGameController";
import { EventType } from "../subscribers/EventType";
import { IRollButton } from "./IRollButton";
export class RollButton implements IRollButton {
private controller: IGameController;
constructor(controller: IGam... | 6 |
JolyMolyf/CarsaNew | b95350d | database/models/carGeneration.ts | TypeScript | www.github.com/JolyMolyf/CarsaNew/tree/main/database/models/carGeneration.ts | https://raw.githubusercontent.com/JolyMolyf/CarsaNew/b95350d/database/models/carGeneration.ts | JolyMolyf/CarsaNew b95350d database/models/carGeneration.ts | true | 200 | 1,952 | const { Model } = require('sequelize');
import { CarGenerationType } from '../../types/carGeneration';
module.exports = (sequelize: any, DataTypes: any) => {
class CarGeneration extends Model<CarGenerationType> implements CarGenerationType {
id!: string;
name!: string;
start_year?: number;
end_year?:... | 1 |
scwood/workout-log | b31a3cc | src/hooks/useCreateWorkoutMutation.ts | TypeScript | www.github.com/scwood/workout-log/tree/main/src/hooks/useCreateWorkoutMutation.ts | https://raw.githubusercontent.com/scwood/workout-log/b31a3cc/src/hooks/useCreateWorkoutMutation.ts | scwood/workout-log b31a3cc src/hooks/useCreateWorkoutMutation.ts | true | 200 | 808 | import { useMutation, useQueryClient } from "@tanstack/react-query";
import { useCurrentUser } from "../hooks/useCurrentUser";
import { createWorkout } from "../api/workoutsApi";
import { currentWorkoutQueryKey } from "./useCurrentWorkoutQuery";
import { Workout } from "../types/Workout";
export function useCreateWor... | 0 |
Venkatesh17042002/Angular_1 | 31feeed | task/src/app/core/core.module.ts | TypeScript | www.github.com/Venkatesh17042002/Angular_1/tree/main/task/src/app/core/core.module.ts | https://raw.githubusercontent.com/Venkatesh17042002/Angular_1/31feeed/task/src/app/core/core.module.ts | Venkatesh17042002/Angular_1 31feeed task/src/app/core/core.module.ts | true | 200 | 531 | import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { BodyComponent } from './body/body.component';
import { LeftComponent } from './left/left.component';
import { RightComponent } from './right/right.component';
import { QuoteComponent } from './quote/quote.component';
@... | 5 |
Stalynasity/bootcampng | 46ce107 | src/app/lib/shared/botonestabla/botonestabla.component.ts | TypeScript | www.github.com/Stalynasity/bootcampng/tree/main/src/app/lib/shared/botonestabla/botonestabla.component.ts | https://raw.githubusercontent.com/Stalynasity/bootcampng/46ce107/src/app/lib/shared/botonestabla/botonestabla.component.ts | Stalynasity/bootcampng 46ce107 src/app/lib/shared/botonestabla/botonestabla.component.ts | true | 200 | 727 | import { Component, EventEmitter, Input, Output } from '@angular/core';
import { PropertiesBtnTabla } from '../../interface/PropertiesBtnTabla.interface';
@Component({
selector: 'app-botonestabla',
templateUrl: './botonestabla.component.html',
})
export class BotonestablaComponent {
@Output() eventoEditar =new... | 6 |
yat1ma30/subsquid-cryptopunks-migration | 5a2c49e | src/main.ts | TypeScript | www.github.com/yat1ma30/subsquid-cryptopunks-migration/tree/main/src/main.ts | https://raw.githubusercontent.com/yat1ma30/subsquid-cryptopunks-migration/5a2c49e/src/main.ts | yat1ma30/subsquid-cryptopunks-migration 5a2c49e src/main.ts | true | 200 | 1,787 | import {TypeormDatabase} from '@subsquid/typeorm-store'
import {
processor,
mapper,
BLOCK_HEIGHT_TO_FETCH_PUNK_IMAGES,
CtxWithCache,
} from './processor'
import * as model from './model'
import {fetchAndSavePunkImages} from './mapping/share/contracts'
import {TransferRecorder, EntitySyncManager, SimpleQ... | 1 |
AndyBlu/proof-angular | d48f5e7 | src/app/modules/financial-product/financial-product.module.ts | TypeScript | www.github.com/AndyBlu/proof-angular/tree/main/src/app/modules/financial-product/financial-product.module.ts | https://raw.githubusercontent.com/AndyBlu/proof-angular/d48f5e7/src/app/modules/financial-product/financial-product.module.ts | AndyBlu/proof-angular d48f5e7 src/app/modules/financial-product/financial-product.module.ts | true | 200 | 999 | import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FinancialProductRoutingModule } from './financial-product-routing.module';
import { UpdateFinancialProductComponent } from './pages/update-financial-product/update-financial-product.component';
import { CreateFinancialPr... | 0 |
yapu115/clinica-yapura-franco | f2efdc4 | src/app/components/mis-turnos/especialistas/especialistas.component.ts | TypeScript | www.github.com/yapu115/clinica-yapura-franco/tree/main/src/app/components/mis-turnos/especialistas/especialistas.component.ts | https://raw.githubusercontent.com/yapu115/clinica-yapura-franco/f2efdc4/src/app/components/mis-turnos/especialistas/especialistas.component.ts | yapu115/clinica-yapura-franco f2efdc4 src/app/components/mis-turnos/especialistas/especialistas.component.ts | true | 200 | 11,994 | import { Component } from '@angular/core';
import {
FormArray,
FormControl,
FormGroup,
FormsModule,
ReactiveFormsModule,
Validators,
} from '@angular/forms';
import Swal from 'sweetalert2';
import { DatabaseService } from '../../../services/database.service';
import { AuthService } from '../../../services/a... | 6 |
j-tegen/gql-test | 8d7cd72 | src/user/user.resolver.ts | TypeScript | www.github.com/j-tegen/gql-test/tree/main/src/user/user.resolver.ts | https://raw.githubusercontent.com/j-tegen/gql-test/8d7cd72/src/user/user.resolver.ts | j-tegen/gql-test 8d7cd72 src/user/user.resolver.ts | true | 200 | 1,637 | import { User } from './models/user.model'
import { UserService } from './user.service'
import { NotFoundException, UseGuards } from '@nestjs/common'
import {
Mutation,
Args,
Resolver,
Query,
Parent,
ResolveProperty,
} from '@nestjs/graphql'
import { UserArgs } from './dto/arguments'
import { GqlAuthGuard }... | 0 |
jibuene/NTP-Frontend | 39eb3dd | src/app/shop-card/shop-card.component.ts | TypeScript | www.github.com/jibuene/NTP-Frontend/tree/main/src/app/shop-card/shop-card.component.ts | https://raw.githubusercontent.com/jibuene/NTP-Frontend/39eb3dd/src/app/shop-card/shop-card.component.ts | jibuene/NTP-Frontend 39eb3dd src/app/shop-card/shop-card.component.ts | true | 200 | 1,602 | import { Component, OnInit, Input } from '@angular/core';
import { DateTime } from "luxon";
interface productData {
ProductId: number;
ProductName: string;
UnitName: string;
DeliveryTimes: Array<{ min: number, max: number, time: number }>;
}
@Component({
selector: 'app-shop-card',
templateUrl: './shop-card.... | 1 |
eom-droid/project_eom_backend_api_server | d2d9a30 | src/v1/services/diary_service.ts | TypeScript | www.github.com/eom-droid/project_eom_backend_api_server/tree/main/src/v1/services/diary_service.ts | https://raw.githubusercontent.com/eom-droid/project_eom_backend_api_server/d2d9a30/src/v1/services/diary_service.ts | eom-droid/project_eom_backend_api_server d2d9a30 src/v1/services/diary_service.ts | true | 200 | 15,292 | import {
DiaryPaginateReqModel,
PaginateReqModel,
} from "../../models/paginate_req_model";
import { PaginateResModel } from "../../models/paginate_res_model";
import { Diary } from "../models/diary_model";
import * as diaryRepository from "../repositorys/diary_repository";
import * as diaryCommentRepository from ... | 5 |
clacscode/node-ts-multiplication-app | d93f81a | src/app.logic.ts | TypeScript | www.github.com/clacscode/node-ts-multiplication-app/tree/main/src/app.logic.ts | https://raw.githubusercontent.com/clacscode/node-ts-multiplication-app/d93f81a/src/app.logic.ts | clacscode/node-ts-multiplication-app d93f81a src/app.logic.ts | true | 200 | 895 | import fs from 'fs'
import { yarg } from './plugins/args.plugin'
interface Options {
base: number,
limit: number,
showTable: boolean
}
const { b, l, s } = yarg;
const options: Options = {
base: b,
limit: l,
showTable: s,
}
const multiplicacion = (options: Options) => {
const { base, lim... | 6 |
EnCoder101/medium-application | d8967d1 | frontend/src/hooks/index.ts | TypeScript | www.github.com/EnCoder101/medium-application/tree/main/frontend/src/hooks/index.ts | https://raw.githubusercontent.com/EnCoder101/medium-application/d8967d1/frontend/src/hooks/index.ts | EnCoder101/medium-application d8967d1 frontend/src/hooks/index.ts | true | 200 | 1,340 | import axios from "axios"
import { useEffect, useState } from "react"
import { BACKEND_URL } from "../config"
interface Blog {
id: number,
content: string,
title: string,
published: Boolean,
author: {
name: string
}
}
export const useBlog = ({ id }: { id: string }) => {
const [load... | 0 |
aitorevi/you-pod-2.0 | 0bd27e7 | app/api/auth/[...nextauth]/route.ts | TypeScript | www.github.com/aitorevi/you-pod-2.0/tree/main/app/api/auth/[...nextauth]/route.ts | https://raw.githubusercontent.com/aitorevi/you-pod-2.0/0bd27e7/app/api/auth/%5B...nextauth%5D/route.ts | aitorevi/you-pod-2.0 0bd27e7 app/api/auth/[...nextauth]/route.ts | true | 200 | 1,429 | import NextAuth from "next-auth/next";
import CredentialsProvider from "next-auth/providers/credentials";
const nextAuthUrl: string = process.env.NEXTAUTH_URL ?? "http://localhost:3000";
const handler = NextAuth({
providers: [
CredentialsProvider({
name: "Credentials",
credentials: {
usernam... | 1 |
EdySnakee/campos | 7d6b309 | src/app/services/campos.service.ts | TypeScript | www.github.com/EdySnakee/campos/tree/main/src/app/services/campos.service.ts | https://raw.githubusercontent.com/EdySnakee/campos/7d6b309/src/app/services/campos.service.ts | EdySnakee/campos 7d6b309 src/app/services/campos.service.ts | true | 200 | 1,331 | import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { API_CAMPOS } from 'src/config';
import { Observable, catchError, map } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class CamposService {
constructor(
private http : HttpClient
) { }
priva... | 5 |
tNE1K/SE347.P12-CNWeb | a6c66ea | front/src/app/types/lesson.d.ts | TypeScript | www.github.com/tNE1K/SE347.P12-CNWeb/tree/main/front/src/app/types/lesson.d.ts | https://raw.githubusercontent.com/tNE1K/SE347.P12-CNWeb/a6c66ea/front/src/app/types/lesson.d.ts | tNE1K/SE347.P12-CNWeb a6c66ea front/src/app/types/lesson.d.ts | true | 200 | 680 | export interface ILesson {
_id: string;
comments: string[];
description: string;
duration: number;
resource: IVideoLesson[] | IScriptLesson[] | ISelectionLesson[];
title: string;
createdAt: string;
type: "video" | "scriptlesson" | "testselection";
rating: number;
numberRatings: number;
}
export inte... | 6 |
bengquist/recipe-book | 7482c56 | pages/api/user.ts | TypeScript | www.github.com/bengquist/recipe-book/tree/main/pages/api/user.ts | https://raw.githubusercontent.com/bengquist/recipe-book/7482c56/pages/api/user.ts | bengquist/recipe-book 7482c56 pages/api/user.ts | true | 200 | 492 | // Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import type { NextApiRequest, NextApiResponse } from "next";
type User = {
firstName: string;
lastName: string;
username: string;
email: string;
};
export default function handler(
req: NextApiRequest,
res: NextApiResponse<User>... | 0 |
Srizza93/event-invitation | c68b65f | src/services/languageService.ts | TypeScript | www.github.com/Srizza93/event-invitation/tree/main/src/services/languageService.ts | https://raw.githubusercontent.com/Srizza93/event-invitation/c68b65f/src/services/languageService.ts | Srizza93/event-invitation c68b65f src/services/languageService.ts | true | 200 | 1,310 | import { getCookie, setCookie, LANGUAGE_COOKIE } from '@/helpers/cookieHelper'
import i18n from '@/i18n'
import AppLocaleService from '@/services/appLocaleService'
import { getFilePath } from '@/services/fileService'
type AvailableLocales = (typeof i18n.global.availableLocales)[number]
export function initLanguage() ... | 5 |
luckfunc/vite-ts | 3957800 | src/数组对象.ts | TypeScript | www.github.com/luckfunc/vite-ts/tree/main/src/数组对象.ts | https://raw.githubusercontent.com/luckfunc/vite-ts/3957800/src/%E6%95%B0%E7%BB%84%E5%AF%B9%E8%B1%A1.ts | luckfunc/vite-ts 3957800 src/数组对象.ts | true | 200 | 397 | //数组对象怎么描述
const arr: Array<number> = [1, 2, 3];
type A = string[];
const a: A = ['1', '2'];
console.log('a', a);
// ==> type A = Array<string>'
type Three = [string, string, string];
const d: Three = ['1', '2', '3'];// 三个string类型组成的数组
type E = [string, number];
const e: E = ['1', 2];
//思考题
type Think = [1, 2, 3];
cons... | 2 |
iricardofernandes/microservices-ddd | 9528084 | apps/account/src/infra/http/graphql/resolvers/register-user.resolver.e2e-spec.ts | TypeScript | www.github.com/iricardofernandes/microservices-ddd/tree/main/apps/account/src/infra/http/graphql/resolvers/register-user.resolver.e2e-spec.ts | https://raw.githubusercontent.com/iricardofernandes/microservices-ddd/9528084/apps/account/src/infra/http/graphql/resolvers/register-user.resolver.e2e-spec.ts | iricardofernandes/microservices-ddd 9528084 apps/account/src/infra/http/graphql/resolvers/register-user.resolver.e2e-spec.ts | true | 200 | 1,334 | import { INestApplication } from '@nestjs/common'
import { Test } from '@nestjs/testing'
import request from 'supertest'
import { AppModule } from '@/infra/app.module'
import { DatabaseModule } from '@/infra/database/database.module'
describe('Register User Resolver (e2e)', () => {
let app: INestApplication
befo... | 4 |
RajCode12/Guest-Suite-Frontend | 2388de5 | src/app/Module/payment/room-payment/room-payment.component.ts | TypeScript | www.github.com/RajCode12/Guest-Suite-Frontend/tree/main/src/app/Module/payment/room-payment/room-payment.component.ts | https://raw.githubusercontent.com/RajCode12/Guest-Suite-Frontend/2388de5/src/app/Module/payment/room-payment/room-payment.component.ts | RajCode12/Guest-Suite-Frontend 2388de5 src/app/Module/payment/room-payment/room-payment.component.ts | true | 200 | 3,404 | import { Component } from '@angular/core';
import { PaymentService } from '../../../Service/Payment/payment.service';
import { Router } from '@angular/router';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { Payment } from '../../../Class/Payment/payment';
import { RoomService } from '../.... | 1 |
Dmacgam34/sb1-zgjrxqee | 8c32a55 | src/tests/cart.test.ts | TypeScript | www.github.com/Dmacgam34/sb1-zgjrxqee/tree/main/src/tests/cart.test.ts | https://raw.githubusercontent.com/Dmacgam34/sb1-zgjrxqee/8c32a55/src/tests/cart.test.ts | Dmacgam34/sb1-zgjrxqee 8c32a55 src/tests/cart.test.ts | true | 200 | 843 | import { test, expect } from 'vitest';
import { useCart } from '../hooks/useCart';
test('cart functionality', () => {
const cart = useCart.getState();
// Test adding item
const testProduct = {
id: 'test-1',
name: 'Test Product',
price: 29.99,
images: ['test.jpg'],
category_id: 'test-cat',
... | 7 |
DDu-Du-DDu-Du/DDuDu_Front | 1aa6c5b | src/app/_hooks/useGoalDetail/useGoalDetail.ts | TypeScript | www.github.com/DDu-Du-DDu-Du/DDuDu_Front/tree/main/src/app/_hooks/useGoalDetail/useGoalDetail.ts | https://raw.githubusercontent.com/DDu-Du-DDu-Du/DDuDu_Front/1aa6c5b/src/app/_hooks/useGoalDetail/useGoalDetail.ts | DDu-Du-DDu-Du/DDuDu_Front 1aa6c5b src/app/_hooks/useGoalDetail/useGoalDetail.ts | true | 200 | 745 | import { GOAL_KEY } from "@/app/_constants/queryKey/queryKey";
import { getGoalEditorData } from "@/app/_services/client/goalEditor";
import { GoalDetailType } from "@/app/_types/response/goal/goal";
import { useQuery } from "@tanstack/react-query";
import { useSession } from "next-auth/react";
interface UseGoalDetai... | 6 |
AminelMhl/Tunisian-Football-Premier-League-RESTful-API | 47ddbeb | src/users/users.service.spec.ts | TypeScript | www.github.com/AminelMhl/Tunisian-Football-Premier-League-RESTful-API/tree/main/src/users/users.service.spec.ts | https://raw.githubusercontent.com/AminelMhl/Tunisian-Football-Premier-League-RESTful-API/47ddbeb/src/users/users.service.spec.ts | AminelMhl/Tunisian-Football-Premier-League-RESTful-API 47ddbeb src/users/users.service.spec.ts | true | 200 | 2,445 | import { Test, TestingModule } from '@nestjs/testing';
import { UsersService } from './users.service';
import { PrismaService } from '../prisma/prisma.service';
import { DeepMockProxy, mockDeep } from 'jest-mock-extended';
import { hash } from 'crypto';
describe('UsersService', () => {
let service: UsersService;
l... | 5 |
Irfanwani/servicebarbershop | cb51dfd | src/utils/getassets.ts | TypeScript | www.github.com/Irfanwani/servicebarbershop/tree/main/src/utils/getassets.ts | https://raw.githubusercontent.com/Irfanwani/servicebarbershop/cb51dfd/src/utils/getassets.ts | Irfanwani/servicebarbershop cb51dfd src/utils/getassets.ts | true | 200 | 1,445 | import {
launchCameraAsync,
launchImageLibraryAsync,
MediaTypeOptions,
requestCameraPermissionsAsync,
} from "expo-image-picker";
import { Alert } from "react-native";
import Share from "react-native-share";
export const getCameraImageAsync = async () => {
let { status } = await requestCameraPermissionsAsync... | 3 |
AdaY45/Interview | ab75af3 | backend/src/images/images.module.ts | TypeScript | www.github.com/AdaY45/Interview/tree/main/backend/src/images/images.module.ts | https://raw.githubusercontent.com/AdaY45/Interview/ab75af3/backend/src/images/images.module.ts | AdaY45/Interview ab75af3 backend/src/images/images.module.ts | true | 200 | 325 | import { Module } from '@nestjs/common';
import { HttpModule } from '@nestjs/axios';
import { ImagesService } from './images.service';
import { ImagesController } from './images.controller';
@Module({
imports: [HttpModule],
controllers: [ImagesController],
providers: [ImagesService],
})
export class ImagesModul... | 0 |
pmagasdev/react-nodejs-typescript-mongodb | 89d79e3 | server/src/index.ts | TypeScript | www.github.com/pmagasdev/react-nodejs-typescript-mongodb/tree/main/server/src/index.ts | https://raw.githubusercontent.com/pmagasdev/react-nodejs-typescript-mongodb/89d79e3/server/src/index.ts | pmagasdev/react-nodejs-typescript-mongodb 89d79e3 server/src/index.ts | true | 200 | 419 | import mongoose from 'mongoose';
import { app } from './app';
const start = async () => {
if (!process.env.MONGO_URI) {
throw new Error('MONGO_URI must be defined');
}
try {
await mongoose.connect(process.env.MONGO_URI);
console.log('Connected to MongoDB!');
} catch (err) {
console.error(err)... | 4 |
eborrallo/cf-worker | 7aa9029 | src/contexts/shared/infrastructure/commandBus/CommandHandlersInformation.ts | TypeScript | www.github.com/eborrallo/cf-worker/tree/main/src/contexts/shared/infrastructure/commandBus/CommandHandlersInformation.ts | https://raw.githubusercontent.com/eborrallo/cf-worker/7aa9029/src/contexts/shared/infrastructure/commandBus/CommandHandlersInformation.ts | eborrallo/cf-worker 7aa9029 src/contexts/shared/infrastructure/commandBus/CommandHandlersInformation.ts | true | 200 | 1,011 | import { Command } from '../../domain/cqrs/Command'
import { CommandHandler } from '../../domain/cqrs/CommandHandler'
import { CommandNotRegisteredError } from '../../domain/cqrs/CommandNotRegisteredError'
export class CommandHandlersInformation {
private commandHandlersMap: Map<Command, CommandHandler<Command>>
... | 6 |
bl0pez/code-Manager-nextjs | aafdbc9 | src/actions/codePanel/codeRed/getCodeRedWhitPagination.ts | TypeScript | www.github.com/bl0pez/code-Manager-nextjs/tree/main/src/actions/codePanel/codeRed/getCodeRedWhitPagination.ts | https://raw.githubusercontent.com/bl0pez/code-Manager-nextjs/aafdbc9/src/actions/codePanel/codeRed/getCodeRedWhitPagination.ts | bl0pez/code-Manager-nextjs aafdbc9 src/actions/codePanel/codeRed/getCodeRedWhitPagination.ts | true | 200 | 858 | "use server";
import { createPagination } from "@/lib/createPagination";
import prisma from "@/lib/prisma";
import { redirect } from "next/navigation";
interface PaginationOptions {
page?: number;
take?: number;
}
export const getCodeRedWhitPagination = async ({
page = 1,
take = 5,
}: PaginationOptions) => {
... | 7 |
Erivck/prueba-tecnica | 2725b61 | src/controllers/user/index.ts | TypeScript | www.github.com/Erivck/prueba-tecnica/tree/main/src/controllers/user/index.ts | https://raw.githubusercontent.com/Erivck/prueba-tecnica/2725b61/src/controllers/user/index.ts | Erivck/prueba-tecnica 2725b61 src/controllers/user/index.ts | true | 200 | 1,351 | import { NextFunction, Request, Response } from "express";
import { updateUserById, deleteUserById } from "../../services/user";
import { UserWithoutPassword } from "../../types";
import { omitPropertyFromObject } from "../../utils";
import { UserDto } from "validation";
export const getUser = (req: Request, res: Resp... | 1 |
SarahOtmane/p10_app | 029f106 | api/src/graphql/resolvers/userResolvers.ts | TypeScript | www.github.com/SarahOtmane/p10_app/tree/main/api/src/graphql/resolvers/userResolvers.ts | https://raw.githubusercontent.com/SarahOtmane/p10_app/029f106/api/src/graphql/resolvers/userResolvers.ts | SarahOtmane/p10_app 029f106 api/src/graphql/resolvers/userResolvers.ts | true | 200 | 1,002 | import User from '../../models/User';
import bcrypt from 'bcrypt';
const userResolvers = {
Query: {
users: async () => {
return await User.findAll({ attributes: { exclude: ['password'] } });
},
user: async (_: any, { id }: { id: string }) => {
return await User.findByPk(id, { attributes: { ex... | 5 |
paulocappa/wav-back | 887025c | src/modules/users/infra/http/controllers/AvatarController.ts | TypeScript | www.github.com/paulocappa/wav-back/tree/main/src/modules/users/infra/http/controllers/AvatarController.ts | https://raw.githubusercontent.com/paulocappa/wav-back/887025c/src/modules/users/infra/http/controllers/AvatarController.ts | paulocappa/wav-back 887025c src/modules/users/infra/http/controllers/AvatarController.ts | true | 200 | 738 | import { Request, Response } from 'express';
import { container } from 'tsyringe';
import { instanceToPlain } from 'class-transformer';
import UpdateUserAvatarService from '@modules/users/services/UpdateUserAvatarService';
import AvatarValidation from '../validations/AvatarValidation';
class AvatarController {
publ... | 2 |
JovanaVlahovicOdt/dutch-cities | e97f5a8 | src/utils/city.ts | TypeScript | www.github.com/JovanaVlahovicOdt/dutch-cities/tree/main/src/utils/city.ts | https://raw.githubusercontent.com/JovanaVlahovicOdt/dutch-cities/e97f5a8/src/utils/city.ts | JovanaVlahovicOdt/dutch-cities e97f5a8 src/utils/city.ts | true | 200 | 638 | export interface City {
name: string;
province: string;
population: string;
}
export function findCitiesByName(cities: City[], name: string) {
return cities.filter((city) => {
return city.name.toLowerCase().includes(name.toLowerCase());
});
}
export function getPaginatedCities(
cities: City[],
page:... | 0 |
sambitskd0/Excel-template | 258a5e8 | src/app/application/grant-fund/manageGrantExpenditure/check-balance/check-balance.component.ts | TypeScript | www.github.com/sambitskd0/Excel-template/tree/main/src/app/application/grant-fund/manageGrantExpenditure/check-balance/check-balance.component.ts | https://raw.githubusercontent.com/sambitskd0/Excel-template/258a5e8/src/app/application/grant-fund/manageGrantExpenditure/check-balance/check-balance.component.ts | sambitskd0/Excel-template 258a5e8 src/app/application/grant-fund/manageGrantExpenditure/check-balance/check-balance.component.ts | true | 200 | 13,978 | import { Component, Input, OnInit, ViewChild } from "@angular/core";
import { NgForm } from "@angular/forms";
import { MatPaginator } from "@angular/material/paginator";
import { ProgressBarMode } from "@angular/material/progress-bar";
import { MatSort } from "@angular/material/sort";
import { MatTableDataSource } from... | 4 |
ItaloCovas/sales-api-nodejs | 17d31c0 | src/shared/infra/typeorm/migrations/1680204823794-AddProductIdToOrdersProducts.ts | TypeScript | www.github.com/ItaloCovas/sales-api-nodejs/tree/main/src/shared/infra/typeorm/migrations/1680204823794-AddProductIdToOrdersProducts.ts | https://raw.githubusercontent.com/ItaloCovas/sales-api-nodejs/17d31c0/src/shared/infra/typeorm/migrations/1680204823794-AddProductIdToOrdersProducts.ts | ItaloCovas/sales-api-nodejs 17d31c0 src/shared/infra/typeorm/migrations/1680204823794-AddProductIdToOrdersProducts.ts | true | 200 | 1,043 | import {
MigrationInterface,
QueryRunner,
TableColumn,
TableForeignKey,
} from 'typeorm';
export class AddProductIdToOrdersProducts1680204823794
implements MigrationInterface
{
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.addColumn(
'orders_products',
... | 3 |
behzad-shafiee/trader_bot | 816ec0c | src/modules/auth/member/auth.member.module.ts | TypeScript | www.github.com/behzad-shafiee/trader_bot/tree/main/src/modules/auth/member/auth.member.module.ts | https://raw.githubusercontent.com/behzad-shafiee/trader_bot/816ec0c/src/modules/auth/member/auth.member.module.ts | behzad-shafiee/trader_bot 816ec0c src/modules/auth/member/auth.member.module.ts | true | 200 | 1,409 | import { Module } from '@nestjs/common'
import { JwtModule } from '@nestjs/jwt'
import { MongooseModule } from '@nestjs/mongoose'
import { PassportModule } from '@nestjs/passport'
import
{
Account,
AccountSchema
} from 'src/database/mongoose/schema/account.schema'
import { Log, LogSchema } from 'src/database/mo... | 7 |
iStork1/Taller-1-TypeScript | 82bb4bf | typescript/FillTable.ts | TypeScript | www.github.com/iStork1/Taller-1-TypeScript/tree/main/typescript/FillTable.ts | https://raw.githubusercontent.com/iStork1/Taller-1-TypeScript/82bb4bf/typescript/FillTable.ts | iStork1/Taller-1-TypeScript 82bb4bf typescript/FillTable.ts | true | 200 | 1,090 |
import { Data } from "./data.js";
import { Serie } from "./Serie.js";
const tvshowsTbody: HTMLElement = document.getElementById('tvTbody')!;
let seasonsAvarage = 0;
function renderTable(tvshows: Serie[]): void {
//add tvshows
tvshows.forEach(s => {
let trElement = document.createElement("... | 6 |
Javarome/ssg-api | 7ce1dde | src/step/content/replace/html/ssi/SsiSetVarCommandTest.ts | TypeScript | www.github.com/Javarome/ssg-api/tree/main/src/step/content/replace/html/ssi/SsiSetVarCommandTest.ts | https://raw.githubusercontent.com/Javarome/ssg-api/7ce1dde/src/step/content/replace/html/ssi/SsiSetVarCommandTest.ts | Javarome/ssg-api 7ce1dde src/step/content/replace/html/ssi/SsiSetVarCommandTest.ts | true | 200 | 1,240 | import { describe, expect, test } from "@javarome/testscript"
import { SsiSetVarReplaceCommand } from "./SsiSetVarCommand.js"
import { testUtil } from "../../../../../../test/TestUtil.js"
describe("SsiVarCommand", () => {
test("replaces title var", async () => {
const command = new SsiSetVarReplaceCommand("titl... | 1 |
Reolight/masked-text | fb15975 | src/tests/reset.test.ts | TypeScript | www.github.com/Reolight/masked-text/tree/main/src/tests/reset.test.ts | https://raw.githubusercontent.com/Reolight/masked-text/fb15975/src/tests/reset.test.ts | Reolight/masked-text fb15975 src/tests/reset.test.ts | true | 200 | 1,456 | import MaskCharSynthetizer from "../MaskedEngine/maskSynthetizer";
import { MaskFormat } from "../MaskedEngine/types";
export const maskSynthetizerPrompt = new MaskCharSynthetizer();
maskSynthetizerPrompt.applySettings({
beepOnError: false,
cutCopyMaskFormat: MaskFormat.IncludePromptAndLiterals,
hidePrompt... | 5 |
RinkeshGolwala/string-calculator | ba3d390 | src/index.test.ts | TypeScript | www.github.com/RinkeshGolwala/string-calculator/tree/main/src/index.test.ts | https://raw.githubusercontent.com/RinkeshGolwala/string-calculator/ba3d390/src/index.test.ts | RinkeshGolwala/string-calculator ba3d390 src/index.test.ts | true | 200 | 2,796 | import { faker } from '@faker-js/faker';
import { add } from "./index";
describe('Add function for comma-separated numbers', () => {
it('should return 0 for an empty string', () => {
expect(add('')).toBe(0);
});
it('should return the number itself if only one number is provided', () => {
const number = ... | 2 |
harish-ramamurthy-dev/offline-lottie-animation | 31653ed | src/store/store.ts | TypeScript | www.github.com/harish-ramamurthy-dev/offline-lottie-animation/tree/main/src/store/store.ts | https://raw.githubusercontent.com/harish-ramamurthy-dev/offline-lottie-animation/31653ed/src/store/store.ts | harish-ramamurthy-dev/offline-lottie-animation 31653ed src/store/store.ts | true | 200 | 1,041 | import { configureStore, ThunkAction, Action } from "@reduxjs/toolkit";
import publicAnimationReducer from "./animationReducer";
import storage from "redux-persist/lib/storage";
import { FLUSH, PAUSE, PERSIST, PURGE, REGISTER, REHYDRATE, persistReducer, persistStore } from "redux-persist";
const persistConfig = {
ke... | 4 |
karpov-anatolii/music-platform | 04c3f42 | server/src/track/track.service.ts | TypeScript | www.github.com/karpov-anatolii/music-platform/tree/main/server/src/track/track.service.ts | https://raw.githubusercontent.com/karpov-anatolii/music-platform/04c3f42/server/src/track/track.service.ts | karpov-anatolii/music-platform 04c3f42 server/src/track/track.service.ts | true | 200 | 5,962 | import { Injectable, PipeTransform } from '@nestjs/common';
import { Track, TrackDocument } from './schemas/track.schema';
import { InjectModel } from '@nestjs/mongoose';
import { Model, Types } from 'mongoose';
import { Comment, CommentDocument } from './schemas/comment.schema';
import { CreateTrackDto } from './dto/c... | 3 |
Lehodev/IonicApp | a81e0b0 | src/frontend/ionic/src/app/login/login-page.component.spec.ts | TypeScript | www.github.com/Lehodev/IonicApp/tree/main/src/frontend/ionic/src/app/login/login-page.component.spec.ts | https://raw.githubusercontent.com/Lehodev/IonicApp/a81e0b0/src/frontend/ionic/src/app/login/login-page.component.spec.ts | Lehodev/IonicApp a81e0b0 src/frontend/ionic/src/app/login/login-page.component.spec.ts | true | 200 | 696 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'
import { IonicModule } from '@ionic/angular'
import { LoginPageComponent } from './login-page.component'
describe('LoginPage', () => {
let component: LoginPageComponent
let fixture: ComponentFixture<LoginPageComponent>
beforeEach(w... | 0 |
AbdelrahmanNawar/E-Commerce-Application-MEAN-Stack | c789da6 | ecommercestore_mean-master/src/app/components/product-details/product-details.component.ts | TypeScript | www.github.com/AbdelrahmanNawar/E-Commerce-Application-MEAN-Stack/tree/main/ecommercestore_mean-master/src/app/components/product-details/product-details.component.ts | https://raw.githubusercontent.com/AbdelrahmanNawar/E-Commerce-Application-MEAN-Stack/c789da6/ecommercestore_mean-master/src/app/components/product-details/product-details.component.ts | AbdelrahmanNawar/E-Commerce-Application-MEAN-Stack c789da6 ecommercestore_mean-master/src/app/components/product-details/product-details.component.ts | true | 200 | 1,855 | import { Component, OnInit, Input } from '@angular/core';
import { ProductsService } from 'src/app/services/products.service';
import { Router, ActivatedRoute } from '@angular/router';
import { UsersService } from 'src/app/services/users.service';
import { productModel } from 'src/app/models/productModel';
@Component(... | 7 |
keepTop2/india-h5 | 9d505b5 | src/views/lottery/types/base.ts | TypeScript | www.github.com/keepTop2/india-h5/tree/main/src/views/lottery/types/base.ts | https://raw.githubusercontent.com/keepTop2/india-h5/9d505b5/src/views/lottery/types/base.ts | keepTop2/india-h5 9d505b5 src/views/lottery/types/base.ts | true | 200 | 812 | /**
* @description 语言类型
*/
export type LangType = "zh";
/**
* @description 启用状态
*/
export enum EnableStatus {
DISABLED = 0, // 禁用
ENABLED = 1, // 启用
}
/**
* @description 分页信息
*/
export interface PaginationInfo {
total: number; // 总条数
size: number; // 每页大小
current: number; // 当前页数
pages: number; // 总页数
}
... | 6 |
dinitha1296/angular-material-sample | 09655c6 | src/app/layout/shared/const/routes.const.ts | TypeScript | www.github.com/dinitha1296/angular-material-sample/tree/main/src/app/layout/shared/const/routes.const.ts | https://raw.githubusercontent.com/dinitha1296/angular-material-sample/09655c6/src/app/layout/shared/const/routes.const.ts | dinitha1296/angular-material-sample 09655c6 src/app/layout/shared/const/routes.const.ts | true | 200 | 1,606 | import { Route } from '../model';
export const routes: Route[] = [
{ name: 'Autocomplete', path: '/autocomplete' },
{ name: 'Badge', path: '/badge' },
{ name: 'Bottom Sheet', path: '/bottom-sheet' },
{ name: 'Button', path: '/button' },
{ name: 'Button toggle', path: '/button-toggle' },
{ name: 'Card', pat... | 2 |
romanpoleshko/carousel | cbeeb14 | src/hooks/useCarouselController.ts | TypeScript | www.github.com/romanpoleshko/carousel/tree/main/src/hooks/useCarouselController.ts | https://raw.githubusercontent.com/romanpoleshko/carousel/cbeeb14/src/hooks/useCarouselController.ts | romanpoleshko/carousel cbeeb14 src/hooks/useCarouselController.ts | true | 200 | 652 | import { useMemo, useState } from "react";
type useCarouselController = {
length: number;
}
export const useCarouselController = ({ length }: useCarouselController) => {
const [activeItem, setActiveItem] = useState<number>(1);
const isLastItem = useMemo(() => activeItem === length, [activeItem, length]);
con... | 4 |
Borys35/Docs-Drive | e449113 | src/redux/reducers/pathReducer.ts | TypeScript | www.github.com/Borys35/Docs-Drive/tree/main/src/redux/reducers/pathReducer.ts | https://raw.githubusercontent.com/Borys35/Docs-Drive/e449113/src/redux/reducers/pathReducer.ts | Borys35/Docs-Drive e449113 src/redux/reducers/pathReducer.ts | true | 200 | 1,899 | import * as actions from "../actionTypes";
const initialState = {
fileModalOpen: false,
folderModalOpen: false,
loading: true,
currentFile: {},
currentFolder: {},
rootFolder: {},
subfolders: [],
subfiles: [],
beforeFolders: [],
};
function pathReducer(state = initialState, { type, payload }: any) {
... | 1 |
SachinCoder1/Astra-DeFi | 1cb0800 | client/src/lib/utils/date.ts | TypeScript | www.github.com/SachinCoder1/Astra-DeFi/tree/main/client/src/lib/utils/date.ts | https://raw.githubusercontent.com/SachinCoder1/Astra-DeFi/1cb0800/client/src/lib/utils/date.ts | SachinCoder1/Astra-DeFi 1cb0800 client/src/lib/utils/date.ts | true | 200 | 649 | import {
format,
addDays,
eachDayOfInterval,
subDays,
eachHourOfInterval,
startOfDay,
endOfDay,
} from "date-fns";
export const formatXAxisDate = (date: string, period: any) => {
if (period === "1D") {
return format(date, "dd MMM yyyy hh:mm a");
} else {
return format(date, "dd MMM yyyy");
... | 3 |
opentaskai/opentaskai-web3-solana | 60439ca | scripts/tokens.ts | TypeScript | www.github.com/opentaskai/opentaskai-web3-solana/tree/main/scripts/tokens.ts | https://raw.githubusercontent.com/opentaskai/opentaskai-web3-solana/60439ca/scripts/tokens.ts | opentaskai/opentaskai-web3-solana 60439ca scripts/tokens.ts | true | 200 | 3,614 | import * as web3 from "@solana/web3.js";
import * as token from "@solana/spl-token";
import fs from 'fs';
import os from 'os';
import path from 'path';
import {identifySolanaNetwork} from './utils';
import {getContract, setContract} from './accounts';
export async function deployToken(connection: web3.Connection, pa... | 0 |
darenft-labs/nft2-client-nodejs | e41a97d | src/nft2dataregistry-multichain.ts | TypeScript | www.github.com/darenft-labs/nft2-client-nodejs/tree/main/src/nft2dataregistry-multichain.ts | https://raw.githubusercontent.com/darenft-labs/nft2-client-nodejs/e41a97d/src/nft2dataregistry-multichain.ts | darenft-labs/nft2-client-nodejs e41a97d src/nft2dataregistry-multichain.ts | true | 200 | 6,955 | import {ethers} from 'ethers';
import {NFT2DataRegistry} from './nft2dataregistry';
import {OnchainDapp, OnchainDappQuery, Pagination} from './types';
import {gql} from 'graphql-request';
import {subqueryService} from './services/subquery.service';
import {
checkIsDerivable,
constructDappCachedResponse,
construct... | 7 |
kovkir/bmstu-web | 7001694 | src/frontend/src/authentificationService.ts | TypeScript | www.github.com/kovkir/bmstu-web/tree/main/src/frontend/src/authentificationService.ts | https://raw.githubusercontent.com/kovkir/bmstu-web/7001694/src/frontend/src/authentificationService.ts | kovkir/bmstu-web 7001694 src/frontend/src/authentificationService.ts | true | 200 | 1,574 | import SquadInterface from "./Interfaces/SquadInterface";
import UserInterface from "./Interfaces/UserInterface";
interface User {
id: Number,
login: String,
permission: String
}
export default {
async login(login: String, password: String) {
const result = await UserInterface.login(login, pas... | 5 |
Jansen-Killinger-Cara/bomdiaangular | 1f38497 | my-po-project/src/app/app.config.ts | TypeScript | www.github.com/Jansen-Killinger-Cara/bomdiaangular/tree/main/my-po-project/src/app/app.config.ts | https://raw.githubusercontent.com/Jansen-Killinger-Cara/bomdiaangular/1f38497/my-po-project/src/app/app.config.ts | Jansen-Killinger-Cara/bomdiaangular 1f38497 my-po-project/src/app/app.config.ts | true | 200 | 697 | import { provideRouter } from '@angular/router';
import { routes } from './app.routes';
import { provideClientHydration, withEventReplay } from '@angular/platform-browser';
import { ApplicationConfig, importProvidersFrom, provideZoneChangeDetection } from '@angular/core';
import { provideHttpClient, withInterceptorsF... | 6 |
FatCat-Coders/fatcat-ui | ea05063 | src/theme/props/grid/grid.ts | TypeScript | www.github.com/FatCat-Coders/fatcat-ui/tree/main/src/theme/props/grid/grid.ts | https://raw.githubusercontent.com/FatCat-Coders/fatcat-ui/ea05063/src/theme/props/grid/grid.ts | FatCat-Coders/fatcat-ui ea05063 src/theme/props/grid/grid.ts | true | 200 | 1,689 | import { DefaultTheme, css } from 'styled-components';
import { Properties } from 'csstype';
import { GapDefinition } from 'src/theme/definitions/gap/gap';
export type GridProps = {
gap?: GapDefinition
rowGap?: Properties['rowGap']
grid?: Properties['grid']
gridTemplateAreas?: Properties['gridTemplateAreas']
... | 2 |
OstapenkoIvan/np_api_be | 79a3c45 | src/routes/api/warehouse.routes.ts | TypeScript | www.github.com/OstapenkoIvan/np_api_be/tree/main/src/routes/api/warehouse.routes.ts | https://raw.githubusercontent.com/OstapenkoIvan/np_api_be/79a3c45/src/routes/api/warehouse.routes.ts | OstapenkoIvan/np_api_be 79a3c45 src/routes/api/warehouse.routes.ts | true | 200 | 1,146 | import { Router } from "express";
import middlewares, { Middlewares } from "../../middleware";
import { helpers, Helpers } from "../../helpers";
import { WarehouseController, warehouseController } from "../../controllers";
import { warehouseSchema, WarehouseSchema } from "../../schemas";
export default class Warehous... | 4 |
aManAndCode/typescript-project-81 | eee3122 | index.ts | TypeScript | www.github.com/aManAndCode/typescript-project-81/tree/main/index.ts | https://raw.githubusercontent.com/aManAndCode/typescript-project-81/eee3122/index.ts | aManAndCode/typescript-project-81 eee3122 index.ts | true | 200 | 1,009 | type TagAttributes = Record<string, string | number | boolean>;
type TagContent = string | null;
class Tag {
tagName: string;
attributes: TagAttributes;
content: TagContent;
selfClosingTags: Set<string> = new Set(["br", "img", "input", "hr", "meta", "link"]);
constructor(tagName: string, attributes: Ta... | 1 |
Hanaasagi/starlark-ts | 62d0de6 | src/starlark-runtime/values/types/bytes.ts | TypeScript | www.github.com/Hanaasagi/starlark-ts/tree/main/src/starlark-runtime/values/types/bytes.ts | https://raw.githubusercontent.com/Hanaasagi/starlark-ts/62d0de6/src/starlark-runtime/values/types/bytes.ts | Hanaasagi/starlark-ts 62d0de6 src/starlark-runtime/values/types/bytes.ts | true | 200 | 1,973 | import { Token } from '../../../starlark-parser';
import { signum } from '../../../utils';
import { builtinAttr } from './common';
import { builtinAttrNames } from './common';
import { threeway } from './common';
import { Comparable, Indexable, Sliceable, Value } from './interface';
import { String } from './string';
... | 3 |
wenceslauthiagon/kafka-api-services | 0f3bdb2 | apps/api-paas/src/infrastructure/nest/controllers/pix_payments/get_all_pix_devolution.v2.controller.ts | TypeScript | www.github.com/wenceslauthiagon/kafka-api-services/tree/main/apps/api-paas/src/infrastructure/nest/controllers/pix_payments/get_all_pix_devolution.v2.controller.ts | https://raw.githubusercontent.com/wenceslauthiagon/kafka-api-services/0f3bdb2/apps/api-paas/src/infrastructure/nest/controllers/pix_payments/get_all_pix_devolution.v2.controller.ts | wenceslauthiagon/kafka-api-services 0f3bdb2 apps/api-paas/src/infrastructure/nest/controllers/pix_payments/get_all_pix_devolution.v2.controller.ts | true | 200 | 9,158 | import { Logger } from 'winston';
import { Controller, Get, Query, Version } from '@nestjs/common';
import { IsEnum, IsOptional, IsString, MaxLength } from 'class-validator';
import {
ApiProperty,
ApiBearerAuth,
ApiOperation,
ApiTags,
ApiUnauthorizedResponse,
ApiUnprocessableEntityResponse,
ApiBadRequestR... | 6 |
needle-di/core | c1379de | apps/docs/.vitepress/theme/index.ts | TypeScript | www.github.com/needle-di/core/tree/main/apps/docs/.vitepress/theme/index.ts | https://raw.githubusercontent.com/needle-di/core/c1379de/apps/docs/.vitepress/theme/index.ts | needle-di/core c1379de apps/docs/.vitepress/theme/index.ts | true | 200 | 506 | // https://vitepress.dev/guide/custom-theme
import { h } from "vue";
import type { Theme } from "vitepress";
import DefaultTheme from "vitepress/theme";
import "./style.css";
export default {
extends: DefaultTheme,
Layout: () => {
return h(DefaultTheme.Layout, null, {
// https://vitepress.dev/guide/exten... | 7 |
cibulka/react-tetris-ts | 56d1843 | src/modules/menu/use-on-unpause.ts | TypeScript | www.github.com/cibulka/react-tetris-ts/tree/main/src/modules/menu/use-on-unpause.ts | https://raw.githubusercontent.com/cibulka/react-tetris-ts/56d1843/src/modules/menu/use-on-unpause.ts | cibulka/react-tetris-ts 56d1843 src/modules/menu/use-on-unpause.ts | true | 200 | 855 | import { useGameCallbacks, useGameContext } from "@/context/game";
import { GameStatus } from "@/shared/constants/game";
import { KEYS_PAUSE } from "@/shared/constants/keyboard";
import { useCallback, useEffect } from "react";
export function useOnUnpause() {
const {
state: { status },
} = useGameContext();
... | 5 |
shinokada/svelte-5-ui-lib | ff0c552 | src/lib/forms/textarea/theme.ts | TypeScript | www.github.com/shinokada/svelte-5-ui-lib/tree/main/src/lib/forms/textarea/theme.ts | https://raw.githubusercontent.com/shinokada/svelte-5-ui-lib/ff0c552/src/lib/forms/textarea/theme.ts | shinokada/svelte-5-ui-lib ff0c552 src/lib/forms/textarea/theme.ts | true | 200 | 1,116 | import { tv } from 'tailwind-variants';
export const textarea = tv({
slots: {
base: 'block text-sm border-0 px-0 bg-inherit dark:bg-inherit focus:outline-none focus:ring-0 disabled:cursor-not-allowed disabled:opacity-50',
wrapper:
'rounded-lg bg-gray-50 dark:bg-gray-600 text-gray-900 dark:placeholder-gray-400 ... | 2 |
Dloganreeves/DevsandDonuts | 3f9527a | src/app/component/dev/dev.component.ts | TypeScript | www.github.com/Dloganreeves/DevsandDonuts/tree/main/src/app/component/dev/dev.component.ts | https://raw.githubusercontent.com/Dloganreeves/DevsandDonuts/3f9527a/src/app/component/dev/dev.component.ts | Dloganreeves/DevsandDonuts 3f9527a src/app/component/dev/dev.component.ts | true | 200 | 745 | import { Component } from '@angular/core';
import { ShareDevsService } from '../../Service/share-devs.service';
import { DevModel } from '../../Models/dev-model';
import { SingledevComponent } from '../singledev/singledev.component';
@Component({
selector: 'app-dev',
standalone: true,
imports: [SingledevComponen... | 0 |
raydnersilva/fitmenew2 | 715282b | src/app/register/dados-juridico/dados-juridico.component.ts | TypeScript | www.github.com/raydnersilva/fitmenew2/tree/main/src/app/register/dados-juridico/dados-juridico.component.ts | https://raw.githubusercontent.com/raydnersilva/fitmenew2/715282b/src/app/register/dados-juridico/dados-juridico.component.ts | raydnersilva/fitmenew2 715282b src/app/register/dados-juridico/dados-juridico.component.ts | true | 200 | 2,051 | import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { CnpjwsService } from './cnpjws.service';
import { CadastroService } from '../cadastro.service';
@Component({
selector: 'app-dados-juridico',
tem... | 1 |
dave-inc/chai-purify | a594241 | src/maybe.ts | TypeScript | www.github.com/dave-inc/chai-purify/tree/main/src/maybe.ts | https://raw.githubusercontent.com/dave-inc/chai-purify/a594241/src/maybe.ts | dave-inc/chai-purify a594241 src/maybe.ts | true | 200 | 1,211 | import { Assertion } from 'chai';
import { Just, Maybe, Nothing } from 'purify-ts/Maybe';
declare global {
export namespace Chai {
interface Assertion {
Maybe: Assertion;
Nothing: Assertion;
Just(value?: any): Assertion;
}
}
}
function isMaybe(obj: any): obj is Maybe<unknown> {
return ... | 3 |
brr-dev/testing | 064171d | src/fetch/spyOnFetch.ts | TypeScript | www.github.com/brr-dev/testing/tree/main/src/fetch/spyOnFetch.ts | https://raw.githubusercontent.com/brr-dev/testing/064171d/src/fetch/spyOnFetch.ts | brr-dev/testing 064171d src/fetch/spyOnFetch.ts | true | 200 | 811 | // ! Copyright (c) 2024, Brandon Ramirez, brr.dev
import { _makeFetchRes } from './_helpers';
export type SpyOnFetchOptions = {
mockImplementation?: boolean; // Default true
restoreAfterAll?: boolean; // Default true
clearBeforeEach?: boolean; // Default true
};
export function spyOnFetch({
mockImple... | 6 |
Vigorski/fraxi | d08da88 | src/utilities/map/pacContainer.ts | TypeScript | www.github.com/Vigorski/fraxi/tree/main/src/utilities/map/pacContainer.ts | https://raw.githubusercontent.com/Vigorski/fraxi/d08da88/src/utilities/map/pacContainer.ts | Vigorski/fraxi d08da88 src/utilities/map/pacContainer.ts | true | 200 | 1,295 | import { ExtendedAutocompleteType } from "types/map";
// The pac-container element comes from google
// As of yet, there is an unresolved bug with this element
// where it is duplocated every time the autocomplete is being used
// this is a crude way of removing the duplications.
export const getAutocompletePacContai... | 7 |
GABRIELBOLDIVEIGA/Controle-de-Pedidos-Blinking-Lights | ac13e1e | frontend/src/service/produto/get/todos-produtos.ts | TypeScript | www.github.com/GABRIELBOLDIVEIGA/Controle-de-Pedidos-Blinking-Lights/tree/main/frontend/src/service/produto/get/todos-produtos.ts | https://raw.githubusercontent.com/GABRIELBOLDIVEIGA/Controle-de-Pedidos-Blinking-Lights/ac13e1e/frontend/src/service/produto/get/todos-produtos.ts | GABRIELBOLDIVEIGA/Controle-de-Pedidos-Blinking-Lights ac13e1e frontend/src/service/produto/get/todos-produtos.ts | true | 200 | 944 | import kmbApi from "@/lib/axios/useKmbApi";
import { ProdutoValidator, produtoSchema } from "@/utils/validators/Produto";
export async function fetchTodosProdutos(
pagina: number,
limit: number,
filter: string,
promocaoAtiva: boolean | undefined,
): Promise<ProdutoValidator[]> {
if (pagina < 0 || limit < 0) ... | 5 |
Ibrahim4Grace/resturant_api | 265158e | src/resources/order/order-model.ts | TypeScript | www.github.com/Ibrahim4Grace/resturant_api/tree/main/src/resources/order/order-model.ts | https://raw.githubusercontent.com/Ibrahim4Grace/resturant_api/265158e/src/resources/order/order-model.ts | Ibrahim4Grace/resturant_api 265158e src/resources/order/order-model.ts | true | 200 | 2,819 | import { Schema, model } from 'mongoose';
import { IOrder } from '../order/order-interface';
const orderSchema = new Schema<IOrder>(
{
userId: {
type: Schema.Types.ObjectId,
ref: 'User',
required: true,
},
restaurantId: {
type: Schema.Types.Ob... | 2 |
yizhuan/lyrics | b533174 | app/src/app/public/login/login.page.ts | TypeScript | www.github.com/yizhuan/lyrics/tree/main/app/src/app/public/login/login.page.ts | https://raw.githubusercontent.com/yizhuan/lyrics/b533174/app/src/app/public/login/login.page.ts | yizhuan/lyrics b533174 app/src/app/public/login/login.page.ts | true | 200 | 3,131 | import { Component, OnInit } from '@angular/core';
import { AuthenticationService } from 'src/app/services/authentication.service';
import { NgForm } from '@angular/forms';
import { AccountService } from 'src/app/services/account.service';
import { Account } from 'src/app/models/account';
import { SupportedlanguagesSer... | 0 |
fabianojunior139/Recicla-Brasil | 38ac3ef | api/src/models/Endereco.ts | TypeScript | www.github.com/fabianojunior139/Recicla-Brasil/tree/main/api/src/models/Endereco.ts | https://raw.githubusercontent.com/fabianojunior139/Recicla-Brasil/38ac3ef/api/src/models/Endereco.ts | fabianojunior139/Recicla-Brasil 38ac3ef api/src/models/Endereco.ts | true | 200 | 1,983 | import RegisterNewAdressService from "../Services/EnderecoServices/RegisterNewAdressService";
import ListAllAdressService from "../Services/EnderecoServices/ListAllAdressService";
import UpdateAdressService from "../Services/EnderecoServices/UpdateAdressService";
import FindIdByCellphoneService from "../Services/Ender... | 1 |
Ghost8345/Video-Game-Library | a0b9098 | FrontEnd/src/app/login/login.guard.ts | TypeScript | www.github.com/Ghost8345/Video-Game-Library/tree/main/FrontEnd/src/app/login/login.guard.ts | https://raw.githubusercontent.com/Ghost8345/Video-Game-Library/a0b9098/FrontEnd/src/app/login/login.guard.ts | Ghost8345/Video-Game-Library a0b9098 FrontEnd/src/app/login/login.guard.ts | true | 200 | 1,056 | import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, CanActivate, CanLoad, Route, Router, RouterStateSnapshot, UrlSegment, UrlTree } from '@angular/router';
import { Observable } from 'rxjs';
import { LoginService } from './login.service';
@Injectable({
providedIn: 'root'
})
export class Logi... | 6 |
leoarafat/Trading-app-server | d91f0c4 | src/socket/socket.ts | TypeScript | www.github.com/leoarafat/Trading-app-server/tree/main/src/socket/socket.ts | https://raw.githubusercontent.com/leoarafat/Trading-app-server/d91f0c4/src/socket/socket.ts | leoarafat/Trading-app-server d91f0c4 src/socket/socket.ts | true | 200 | 406 | import { Server } from 'socket.io';
const socket = (io: Server) => {
io.on('connection', socket => {
console.log('👤 A user connected');
socket.on('join', userId => {
socket.join(userId);
console.log(`User ${userId} joined room`);
});
//disconnect user
socket.on('disconnect', () => {... | 3 |
AnaghaPramod/Movie-Time | dd60e20 | src/app/app-routing.module.ts | TypeScript | www.github.com/AnaghaPramod/Movie-Time/tree/main/src/app/app-routing.module.ts | https://raw.githubusercontent.com/AnaghaPramod/Movie-Time/dd60e20/src/app/app-routing.module.ts | AnaghaPramod/Movie-Time dd60e20 src/app/app-routing.module.ts | true | 200 | 688 | import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouterModule, Routes } from '@angular/router';
import { MoviesModule } from './movies/movies.module';
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
const routes: Routes = [... | 7 |
willybrauner/advent-of-code | dd002a7 | 2024/day-05/index.ts | TypeScript | www.github.com/willybrauner/advent-of-code/tree/main/2024/day-05/index.ts | https://raw.githubusercontent.com/willybrauner/advent-of-code/dd002a7/2024/day-05/index.ts | willybrauner/advent-of-code dd002a7 2024/day-05/index.ts | true | 200 | 1,665 | /**
* 2024 - Day 5
* https://adventofcode.com/2024/day/5
*/
import fs from 'fs'
import path from 'path'
type OrderingRules = [number, number][]
type Updates = number[][]
type Input = [OrderingRules, Updates]
const useInput = (filename: 'input.test' | 'input'): Input =>
fs
.readFileSync(path.resolve(__dirname,... | 5 |
siarhei-herasko/react-tmdb-app | 1e3efda | src/components/genre-list/genre-list.types.ts | TypeScript | www.github.com/siarhei-herasko/react-tmdb-app/tree/main/src/components/genre-list/genre-list.types.ts | https://raw.githubusercontent.com/siarhei-herasko/react-tmdb-app/1e3efda/src/components/genre-list/genre-list.types.ts | siarhei-herasko/react-tmdb-app 1e3efda src/components/genre-list/genre-list.types.ts | true | 200 | 347 | import {Filter} from 'types/filter';
export type GenreListProps = {
type: 'movie' | 'tv';
actives: Filter['genres'];
onClick: (value: Filter['genres'][0]) => void;
}
export type GetGenreList = {
genres?: {
id?: number;
name?: string;
}[]
}
export type GenreList = {
label: stri... | 2 |
amir7896/Nestjs-Authorization | 3fb6638 | src/auth/auth.controller.ts | TypeScript | www.github.com/amir7896/Nestjs-Authorization/tree/main/src/auth/auth.controller.ts | https://raw.githubusercontent.com/amir7896/Nestjs-Authorization/3fb6638/src/auth/auth.controller.ts | amir7896/Nestjs-Authorization 3fb6638 src/auth/auth.controller.ts | true | 200 | 561 | import { Controller, Post, Body, UseGuards, Request } from '@nestjs/common';
import { AuthService } from './auth.service';
import { JwtAuthGuard } from './jwt-auth.guard';
import { LoginRequest } from '../interfaces/user/login-request.interface';
@Controller('auth')
export class AuthController {
constructor(private ... | 0 |
Dj-Viking/LED-Art-matrix | 4e5ff4e | server/jest.config.ts | TypeScript | www.github.com/Dj-Viking/LED-Art-matrix/tree/main/server/jest.config.ts | https://raw.githubusercontent.com/Dj-Viking/LED-Art-matrix/4e5ff4e/server/jest.config.ts | Dj-Viking/LED-Art-matrix 4e5ff4e server/jest.config.ts | true | 200 | 974 | import type { Config } from "@jest/types";
export default async (): Promise<Config.InitialOptions> => {
return {
testTimeout: 6000,
testEnvironment: "node",
transform: {
"^.+\\.tsx?$": "ts-jest",
},
collectCoverageFrom: [
"!utils/sendEmail.ts",
... | 4 |
p5terk2uria/customers | 6861f62 | src/app/account/account-routing.module.ts | TypeScript | www.github.com/p5terk2uria/customers/tree/main/src/app/account/account-routing.module.ts | https://raw.githubusercontent.com/p5terk2uria/customers/6861f62/src/app/account/account-routing.module.ts | p5terk2uria/customers 6861f62 src/app/account/account-routing.module.ts | true | 200 | 961 | import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { CreateAccountComponent } from './create-account/create-account.component';
import { EditAccountsComponent } from './edit-accounts/edit-accounts.component';
import { DeleteAccountComponent } from './delete-account/... | 7 |
Doplax/Spotify-Angular | dc9148a | src/app/tracks/services/track.service.ts | TypeScript | www.github.com/Doplax/Spotify-Angular/tree/main/src/app/tracks/services/track.service.ts | https://raw.githubusercontent.com/Doplax/Spotify-Angular/dc9148a/src/app/tracks/services/track.service.ts | Doplax/Spotify-Angular dc9148a src/app/tracks/services/track.service.ts | true | 200 | 1,300 | import { environment } from 'src/environments/environment';
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { from, Observable, of } from 'rxjs';
import { catchError, map, mergeMap, tap } from 'rxjs/operators';
import { TrackModel } from '@core/models/tracks.model';... | 1 |
learnmer/raise-hand | df17bee | message.ts | TypeScript | www.github.com/learnmer/raise-hand/tree/main/message.ts | https://raw.githubusercontent.com/learnmer/raise-hand/df17bee/message.ts | learnmer/raise-hand df17bee message.ts | true | 200 | 672 | export const raiseHandTimeoutMilliseconds = 5 * 1000;
export type RaiseHandClientMessage = { type: "raise-hand" };
export type LowerHandClientMessage = { type: "lower-hand" };
export type ClientMessage = RaiseHandClientMessage | LowerHandClientMessage;
export type HandState = {
username: string;
timestampMillis... | 3 |
silverbulletmd/silverbullet | 84bd5fc | plugs/index/item.ts | TypeScript | www.github.com/silverbulletmd/silverbullet/tree/main/plugs/index/item.ts | https://raw.githubusercontent.com/silverbulletmd/silverbullet/84bd5fc/plugs/index/item.ts | silverbulletmd/silverbullet 84bd5fc plugs/index/item.ts | true | 200 | 3,869 | import type { IndexTreeEvent, ObjectValue } from "../../plug-api/types.ts";
import {
findParentMatching,
type ParseTree,
renderToText,
traverseTreeAsync,
} from "@silverbulletmd/silverbullet/lib/tree";
import {
cleanAttributes,
extractAttributes,
} from "@silverbulletmd/silverbullet/lib/attribute";
import ... | 6 |
WhippingCream/ornn | f0df4a0 | apps/api-server/src/main.ts | TypeScript | www.github.com/WhippingCream/ornn/tree/main/apps/api-server/src/main.ts | https://raw.githubusercontent.com/WhippingCream/ornn/f0df4a0/apps/api-server/src/main.ts | WhippingCream/ornn f0df4a0 apps/api-server/src/main.ts | true | 200 | 556 | import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
import { AppModule } from './app.module';
import { NestFactory } from '@nestjs/core';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
const config = new DocumentBuilder()
.setTitle('Ornn')
.setDescription('The... | 5 |
PrasannaRajanS/Library-Management-System | e3f835d | src/app/+school/+students/components/student-add/student-add-routing.module.ts | TypeScript | www.github.com/PrasannaRajanS/Library-Management-System/tree/main/src/app/+school/+students/components/student-add/student-add-routing.module.ts | https://raw.githubusercontent.com/PrasannaRajanS/Library-Management-System/e3f835d/src/app/%2Bschool/%2Bstudents/components/student-add/student-add-routing.module.ts | PrasannaRajanS/Library-Management-System e3f835d src/app/+school/+students/components/student-add/student-add-routing.module.ts | true | 200 | 370 | import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { StudentAddComponent } from './student-add.component';
const routes: Routes = [
{
path: '', component: StudentAddComponent
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterMo... | 2 |
Ramirokaffo/nocoin | 9232d72 | dist/src/payment/dto/webhook.data.dto.d.ts | TypeScript | www.github.com/Ramirokaffo/nocoin/tree/main/dist/src/payment/dto/webhook.data.dto.d.ts | https://raw.githubusercontent.com/Ramirokaffo/nocoin/9232d72/dist/src/payment/dto/webhook.data.dto.d.ts | Ramirokaffo/nocoin 9232d72 dist/src/payment/dto/webhook.data.dto.d.ts | true | 200 | 319 | export declare class WebhookDataDto {
converted_amount: number;
fee: number;
sandbox: boolean;
amount_total: number;
payment_method: string;
customer: string;
reference: string;
provider_reference: string;
status: string;
currency: string;
geo: string;
amount: number;
}
| 4 |
xuanchinh104/Lio-shop | 542d302 | libs/features/dashboard/src/lib/dashboard.component.ts | TypeScript | www.github.com/xuanchinh104/Lio-shop/tree/main/libs/features/dashboard/src/lib/dashboard.component.ts | https://raw.githubusercontent.com/xuanchinh104/Lio-shop/542d302/libs/features/dashboard/src/lib/dashboard.component.ts | xuanchinh104/Lio-shop 542d302 libs/features/dashboard/src/lib/dashboard.component.ts | true | 200 | 863 | import { ChangeDetectionStrategy, Component } from '@angular/core';
import { DashboardService } from './dashboard.service';
import { ThemeUIEnum } from './dashboard.enum';
import { map } from 'rxjs/operators';
import { MenuService } from '@asc/features/shell/data-access/state';
import { combineLatest } from 'rxjs';
@C... | 0 |
marwaagh/LEAN-APP | 2de0185 | LeanTrainingFront/src/app/modules/categories/manufactoring/manufactoring.component.ts | TypeScript | www.github.com/marwaagh/LEAN-APP/tree/main/LeanTrainingFront/src/app/modules/categories/manufactoring/manufactoring.component.ts | https://raw.githubusercontent.com/marwaagh/LEAN-APP/2de0185/LeanTrainingFront/src/app/modules/categories/manufactoring/manufactoring.component.ts | marwaagh/LEAN-APP 2de0185 LeanTrainingFront/src/app/modules/categories/manufactoring/manufactoring.component.ts | true | 200 | 927 | import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { Observable } from 'rxjs';
import { Formation } from 'src/app/models/Formation';
import { FormationService } from 'src/app/services/formation.service';
@Component({
selector: 'app-manufactoring',
templateUrl: './ma... | 7 |
AnsellMaximilian/nyla-game | 71afff0 | app/api/nylas/equip-trinket/route.ts | TypeScript | www.github.com/AnsellMaximilian/nyla-game/tree/main/app/api/nylas/equip-trinket/route.ts | https://raw.githubusercontent.com/AnsellMaximilian/nyla-game/71afff0/app/api/nylas/equip-trinket/route.ts | AnsellMaximilian/nyla-game 71afff0 app/api/nylas/equip-trinket/route.ts | true | 200 | 1,672 | import { TRINKETS } from "@/const/trinkets";
import { config } from "@/lib/appwrite";
import { databases } from "@/lib/appwriteNode";
import { decrypt } from "@/lib/session";
import { GrantRecord, PlayerNyla } from "@/type";
import { cookies } from "next/headers";
import { NextRequest, NextResponse } from "next/server"... | 1 |
code-guru2004/IntelliCraftAI_nextjs | fdbd79a | lib/database/mongoose.ts | TypeScript | www.github.com/code-guru2004/IntelliCraftAI_nextjs/tree/main/lib/database/mongoose.ts | https://raw.githubusercontent.com/code-guru2004/IntelliCraftAI_nextjs/fdbd79a/lib/database/mongoose.ts | code-guru2004/IntelliCraftAI_nextjs fdbd79a lib/database/mongoose.ts | true | 200 | 1,129 | // import mongoose from "mongoose"
// const connect = async()=>{
// const DBUrl = "mongodb+srv://nayanhetc61:nayan@clusterx12.ivs06.mongodb.net/?retryWrites=true&w=majority&appName=Clusterx12";
// mongoose.connect(DBUrl)
// .then(()=>console.log("DB connected Successfully"))
// .catch((e)=>console.log... | 3 |
danniel-contreras/multiple-database-connection | 1e13be4 | src/controllers/test.controller.ts | TypeScript | www.github.com/danniel-contreras/multiple-database-connection/tree/main/src/controllers/test.controller.ts | https://raw.githubusercontent.com/danniel-contreras/multiple-database-connection/1e13be4/src/controllers/test.controller.ts | danniel-contreras/multiple-database-connection 1e13be4 src/controllers/test.controller.ts | true | 200 | 2,706 | import { UserServices } from '../services/user.services';
import { Request, Response } from 'express';
import jwt, { Secret } from "jsonwebtoken"
import { encrypt,decrypt } from '../utils/bcrypt';
export const SECRET_KEY: Secret = 'your-secret-key-here';
/**
* It gets all users from the database
* @param {Request} ... | 5 |
Aung-myat-min/KinderGarten-Server | 0099275 | src/routes/test.ts | TypeScript | www.github.com/Aung-myat-min/KinderGarten-Server/tree/main/src/routes/test.ts | https://raw.githubusercontent.com/Aung-myat-min/KinderGarten-Server/0099275/src/routes/test.ts | Aung-myat-min/KinderGarten-Server 0099275 src/routes/test.ts | true | 200 | 3,691 | import express from "express";
import { GetTest, CreateTest, EditTest, DeleteTest } from "../models/test";
import { Subject, TestType, QuestionType } from "@prisma/client";
const testRoute = express.Router();
testRoute.use(express.urlencoded({ extended: true }));
testRoute.use(express.json());
// Route to get all tes... | 6 |
plus3-labs/o1js-merkle | a6eb7a9 | build/module/lib/alternatives/interfaces/update_only_tree.d.ts | TypeScript | www.github.com/plus3-labs/o1js-merkle/tree/main/build/module/lib/alternatives/interfaces/update_only_tree.d.ts | https://raw.githubusercontent.com/plus3-labs/o1js-merkle/a6eb7a9/build/module/lib/alternatives/interfaces/update_only_tree.d.ts | plus3-labs/o1js-merkle a6eb7a9 build/module/lib/alternatives/interfaces/update_only_tree.d.ts | true | 200 | 445 | import { Field } from 'o1js';
import { IMerkleTree } from './merkle_tree.js';
/**
* A Merkle tree that supports updates at arbitrary indices but not appending.
*/
export interface UpdateOnlyTree extends IMerkleTree {
/**
* Updates a leaf at a given index in the tree.
* @param leaf - The leaf value to be... | 2 |
hjb1694/discuss_knox | a2ee2a0 | src/stores/usePusherStore.ts | TypeScript | www.github.com/hjb1694/discuss_knox/tree/main/src/stores/usePusherStore.ts | https://raw.githubusercontent.com/hjb1694/discuss_knox/a2ee2a0/src/stores/usePusherStore.ts | hjb1694/discuss_knox a2ee2a0 src/stores/usePusherStore.ts | true | 200 | 1,394 | import { defineStore } from 'pinia';
import { reactive, computed } from 'vue';
import Pusher from 'pusher-js';
interface PusherInstance {
instance: Pusher | null,
channel: any
}
export const usePusherStore = defineStore('usePusherStore', () => {
const pusherInstance = reactive<PusherInstance>({
... | 4 |
loony-react/loony-web | 8b1be6d | packages/loony-types/src/doc.ts | TypeScript | www.github.com/loony-react/loony-web/tree/main/packages/loony-types/src/doc.ts | https://raw.githubusercontent.com/loony-react/loony-web/8b1be6d/packages/loony-types/src/doc.ts | loony-react/loony-web 8b1be6d packages/loony-types/src/doc.ts | true | 200 | 1,672 | // type Indexer = Record<string, string>
// export type JsonObject = Indexer
export type DocNode = {
uid: number
title: string
content: string
images: string
user_id: number
identity: number
theme: number
parent_id?: number
child?: DocNode[]
created_at: string
updated_at?: string
}
export type ... | 0 |
AnirupPat/MediShare | c631a3a | src/components/atoms/insight-pill/styles.ts | TypeScript | www.github.com/AnirupPat/MediShare/tree/main/src/components/atoms/insight-pill/styles.ts | https://raw.githubusercontent.com/AnirupPat/MediShare/c631a3a/src/components/atoms/insight-pill/styles.ts | AnirupPat/MediShare c631a3a src/components/atoms/insight-pill/styles.ts | true | 200 | 583 | import { StyleSheet } from 'react-native';
import { Colors } from '../../../commons/styles/colors';
import Utils from '../../../commons/utils/index';
export const Styles = StyleSheet.create({
insightPillContainer: {
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'row',
... | 3 |
datalowe/text-editor-angular | 77fec04 | src/app/util-functions/requestEmailInvite.ts | TypeScript | www.github.com/datalowe/text-editor-angular/tree/main/src/app/util-functions/requestEmailInvite.ts | https://raw.githubusercontent.com/datalowe/text-editor-angular/77fec04/src/app/util-functions/requestEmailInvite.ts | datalowe/text-editor-angular 77fec04 src/app/util-functions/requestEmailInvite.ts | true | 200 | 1,376 | // I was helped a lot by this SO thread:
// https://stackoverflow.com/questions/32545632/how-can-i-download-a-file-using-window-fetch
import { backendRootUrl } from '../global-variables';
import { InvalidEmailError, MissingTokenError, RequestFailedError } from './custom-errors';
import { getAPIToken } from './getAPITo... | 7 |
PaPazhao/leetcode-javascript | e79e833 | src/stack/20. 有效的括号.ts | TypeScript | www.github.com/PaPazhao/leetcode-javascript/tree/main/src/stack/20. 有效的括号.ts | https://raw.githubusercontent.com/PaPazhao/leetcode-javascript/e79e833/src/stack/20.%20%E6%9C%89%E6%95%88%E7%9A%84%E6%8B%AC%E5%8F%B7.ts | PaPazhao/leetcode-javascript e79e833 src/stack/20. 有效的括号.ts | true | 200 | 825 | // 20. 有效的括号
// 简单
// https://leetcode.cn/problems/valid-parentheses/description/
function isValid(s: string): boolean {
const leftSet = new Set('{[(')
const rightSet = new Set(')]}')
const stack: string[] = []
const isMatch = (left: string, right: string): boolean => {
if (left === '[' && right === ']') ... | 5 |
nicholasalim/jhipster-sample-application-Mono | 7dd1228 | src/test/javascript/spec/app/entities/tbl-user/tbl-user-detail.component.spec.ts | TypeScript | www.github.com/nicholasalim/jhipster-sample-application-Mono/tree/main/src/test/javascript/spec/app/entities/tbl-user/tbl-user-detail.component.spec.ts | https://raw.githubusercontent.com/nicholasalim/jhipster-sample-application-Mono/7dd1228/src/test/javascript/spec/app/entities/tbl-user/tbl-user-detail.component.spec.ts | nicholasalim/jhipster-sample-application-Mono 7dd1228 src/test/javascript/spec/app/entities/tbl-user/tbl-user-detail.component.spec.ts | true | 200 | 1,321 | import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ActivatedRoute } from '@angular/router';
import { of } from 'rxjs';
import { JhipsterMonolithicTestModule } from '../../../test.module';
import { TblUserDetailComponent } from 'app/entities/tbl-user/tbl-user-detail.component';
import { TblUser... | 6 |
ajgeiss0702/redclock.fun | 422bb81 | src/lib/server/quoteUtils.ts | TypeScript | www.github.com/ajgeiss0702/redclock.fun/tree/main/src/lib/server/quoteUtils.ts | https://raw.githubusercontent.com/ajgeiss0702/redclock.fun/422bb81/src/lib/server/quoteUtils.ts | ajgeiss0702/redclock.fun 422bb81 src/lib/server/quoteUtils.ts | true | 200 | 807 | import type {QuoteRequestMetadata} from "$lib/quoteSettings";
export async function updatePendingCount(kv: KVNamespace) {
if(!kv) throw new Error("Missing quotes kv!");
let count = 0;
// @ts-ignore because for some reason cursor cant be found even though its in the type definition
let {keys, list_com... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.