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
angel-git/tarkov-stash
4ecb725
src-spt-mod/types/models/eft/common/tables/ICustomizationItem.d.ts
TypeScript
www.github.com/angel-git/tarkov-stash/tree/main/src-spt-mod/types/models/eft/common/tables/ICustomizationItem.d.ts
https://raw.githubusercontent.com/angel-git/tarkov-stash/4ecb725/src-spt-mod/types/models/eft/common/tables/ICustomizationItem.d.ts
angel-git/tarkov-stash 4ecb725 src-spt-mod/types/models/eft/common/tables/ICustomizationItem.d.ts
true
200
580
import { Ixyz } from '@spt/models/eft/common/Ixyz'; export interface ICustomizationItem { _id: string; _name: string; _parent: string; _type: string; _props: Props; _proto: string; } export interface Props { Name: string; ShortName: string; Description: string; Side: string[]; BodyPart: string; ...
3
aksuarda/seffafsandik-client
851019f
helpers/firebase.ts
TypeScript
www.github.com/aksuarda/seffafsandik-client/tree/main/helpers/firebase.ts
https://raw.githubusercontent.com/aksuarda/seffafsandik-client/851019f/helpers/firebase.ts
aksuarda/seffafsandik-client 851019f helpers/firebase.ts
true
200
2,501
import { useEffect } from "react"; import { initializeApp } from "firebase/app"; import { getFirestore } from "firebase/firestore"; import { AppCheck, initializeAppCheck, ReCaptchaEnterpriseProvider } from "firebase/app-check"; import { getAuth } from "firebase/auth"; import { getFunctions, httpsCallable } from "fireba...
4
sillsdev/languageforge-lexbox
f6b0ea5
frontend/src/lib/util/types.ts
TypeScript
www.github.com/sillsdev/languageforge-lexbox/tree/main/frontend/src/lib/util/types.ts
https://raw.githubusercontent.com/sillsdev/languageforge-lexbox/f6b0ea5/frontend/src/lib/util/types.ts
sillsdev/languageforge-lexbox f6b0ea5 frontend/src/lib/util/types.ts
true
200
727
import type { Primitive } from 'type-fest'; import type { Redirect } from '@sveltejs/kit'; export type PrimitiveRecord = Record<string, Primitive>; type IndexableObject<T = unknown> = unknown extends T ? PrimitiveRecord & object : T; export function isObject(v: unknown): v is IndexableObject { return v !== undefine...
2
Dabrowski98/wrenchworks-backend
a82e74b
src/modules/employee/dto/update-one-employee.args.ts
TypeScript
www.github.com/Dabrowski98/wrenchworks-backend/tree/main/src/modules/employee/dto/update-one-employee.args.ts
https://raw.githubusercontent.com/Dabrowski98/wrenchworks-backend/a82e74b/src/modules/employee/dto/update-one-employee.args.ts
Dabrowski98/wrenchworks-backend a82e74b src/modules/employee/dto/update-one-employee.args.ts
true
200
748
import { Field } from '@nestjs/graphql'; import { ArgsType } from '@nestjs/graphql'; import { EmployeeUpdateInput } from './employee-update.input'; import { Type } from 'class-transformer'; import { ValidateNested } from 'class-validator'; import { Prisma } from '@prisma/client'; import { EmployeeWhereUniqueInput } fro...
1
FlaviaPFonseca/siaweb
a93b6ee
src/app/pages/userSia/user-sia-list/user-sia-list-routing.module.ts
TypeScript
www.github.com/FlaviaPFonseca/siaweb/tree/main/src/app/pages/userSia/user-sia-list/user-sia-list-routing.module.ts
https://raw.githubusercontent.com/FlaviaPFonseca/siaweb/a93b6ee/src/app/pages/userSia/user-sia-list/user-sia-list-routing.module.ts
FlaviaPFonseca/siaweb a93b6ee src/app/pages/userSia/user-sia-list/user-sia-list-routing.module.ts
true
200
366
import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { UserSiaListComponent } from './user-sia-list.component'; const routes: Routes = [ {path:'', component: UserSiaListComponent} ]; @NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule]...
5
ayofimihan/Faucet
41a6236
services/sendEther.ts
TypeScript
www.github.com/ayofimihan/Faucet/tree/main/services/sendEther.ts
https://raw.githubusercontent.com/ayofimihan/Faucet/41a6236/services/sendEther.ts
ayofimihan/Faucet 41a6236 services/sendEther.ts
true
200
340
import axios from "axios"; import { Address } from "viem"; export interface SendEther { address: Address; amount: string; chain: string; } export const sendEther = async (data: SendEther) => { try { const response = await axios.post("/api/sendEth", data); return response.data; } catch (error) { ...
0
verida/data-connector-server
6e4e71c
src/utils.ts
TypeScript
www.github.com/verida/data-connector-server/tree/main/src/utils.ts
https://raw.githubusercontent.com/verida/data-connector-server/6e4e71c/src/utils.ts
verida/data-connector-server 6e4e71c src/utils.ts
true
200
15,408
import { Network as VeridaNetwork, IContext, ContextSession, IAccount } from '@verida/types' import { Client } from "@verida/client-ts" import { Credentials } from '@verida/verifiable-credentials' import Providers from "./providers" import fs from 'fs' import path from 'path' import serverconfig from './config' import ...
4
GuilhermeLisboa3/api-tool-backend
7833bf9
tests/module/tools/domain/use-cases/update-status-tool.spec.ts
TypeScript
www.github.com/GuilhermeLisboa3/api-tool-backend/tree/main/tests/module/tools/domain/use-cases/update-status-tool.spec.ts
https://raw.githubusercontent.com/GuilhermeLisboa3/api-tool-backend/7833bf9/tests/module/tools/domain/use-cases/update-status-tool.spec.ts
GuilhermeLisboa3/api-tool-backend 7833bf9 tests/module/tools/domain/use-cases/update-status-tool.spec.ts
true
200
2,277
import { NotFoundError } from '@/common/errors' import { type UpdateStatusTool, UpdateStatusToolUseCase } from '@/module/tools/domain/use-cases' import { toolsParams } from '@/tests/mocks' import { type UpdateToolRepository, type LoadToolByIdRepository } from '@/module/tools/domain/contracts/database/tools' import { m...
2
Backiscute/dispriv-ts
2948e2e
Source/Entities/User.ts
TypeScript
www.github.com/Backiscute/dispriv-ts/tree/main/Source/Entities/User.ts
https://raw.githubusercontent.com/Backiscute/dispriv-ts/2948e2e/Source/Entities/User.ts
Backiscute/dispriv-ts 2948e2e Source/Entities/User.ts
true
200
15,824
import { BaseEntity, Entity, PrimaryColumn, Column, ManyToOne, OneToMany, ManyToMany, JoinTable, OneToOne, BeforeInsert, AfterUpdate, } from "typeorm"; import { UserFlags } from "../Classes/Flags"; import { Message, MessageType } from "./Message"; import { Relation } from "./...
1
longbuibao/ticketing
eca7d39
ticket/src/routes/show.ts
TypeScript
www.github.com/longbuibao/ticketing/tree/main/ticket/src/routes/show.ts
https://raw.githubusercontent.com/longbuibao/ticketing/eca7d39/ticket/src/routes/show.ts
longbuibao/ticketing eca7d39 ticket/src/routes/show.ts
true
200
630
import express, { Request, Response } from 'express'; import { NotFoundError, requireAuth } from '@lbbticket/common'; import { Ticket } from '../models/Ticket'; const router = express.Router(); router.get('/api/tickets', async (req: Request, res: Response) => { const tickets = await Ticket.find({}); res.status(...
0
DEV-Pierre-ROMAN/youcode
f9c103d
app/courses/[courseId]/course.action.ts
TypeScript
www.github.com/DEV-Pierre-ROMAN/youcode/tree/main/app/courses/[courseId]/course.action.ts
https://raw.githubusercontent.com/DEV-Pierre-ROMAN/youcode/f9c103d/app/courses/%5BcourseId%5D/course.action.ts
DEV-Pierre-ROMAN/youcode f9c103d app/courses/[courseId]/course.action.ts
true
200
1,307
"use server"; import { authenticatedAction, ServerError } from "@/lib/action"; import prisma from "@/lib/prisma"; import { z } from "zod"; export const joinACourse = authenticatedAction .schema( z.object({ courseId: z.string(), }) ) .action(async ({ parsedInput, ctx }) => { const courseOnUser =...
5
lonesomeshark/protection
52ff74f
packages/core/test/keeper.kovan.test.ts
TypeScript
www.github.com/lonesomeshark/protection/tree/main/packages/core/test/keeper.kovan.test.ts
https://raw.githubusercontent.com/lonesomeshark/protection/52ff74f/packages/core/test/keeper.kovan.test.ts
lonesomeshark/protection 52ff74f packages/core/test/keeper.kovan.test.ts
true
200
2,932
import { expect } from 'chai'; import { ethers } from 'hardhat'; import chalk from 'chalk'; import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; import { Subscribers } from '../typechain/Subscribers'; import { Subscribers__factory } from '../typechain/factories/Subscribers__factory'; import { ILending...
4
bekir-kaplan/news_api_vue_spa
6117832
src/api/mappers/newsMapper.ts
TypeScript
www.github.com/bekir-kaplan/news_api_vue_spa/tree/main/src/api/mappers/newsMapper.ts
https://raw.githubusercontent.com/bekir-kaplan/news_api_vue_spa/6117832/src/api/mappers/newsMapper.ts
bekir-kaplan/news_api_vue_spa 6117832 src/api/mappers/newsMapper.ts
true
200
3,246
/** * News API Mappers * -------------------------- * This module provides functions to transform raw API responses * from the News API into structured, application-friendly formats. * * Features: * - `mapArticle`: Converts news articles into a structured format. * - `mapSource`: Maps news sources into a struct...
2
LeandroHernandez/PRP
2c36916
src/app/pages/plan/plan.component.ts
TypeScript
www.github.com/LeandroHernandez/PRP/tree/main/src/app/pages/plan/plan.component.ts
https://raw.githubusercontent.com/LeandroHernandez/PRP/2c36916/src/app/pages/plan/plan.component.ts
LeandroHernandez/PRP 2c36916 src/app/pages/plan/plan.component.ts
true
200
8,268
import {Component, OnDestroy, OnInit} from '@angular/core'; import {FormBuilder, FormGroup, Validators} from '@angular/forms'; import {Student} from '../../models/student/student.model'; import {RegisterService} from '../../services/register/register.service'; import {MatListOption} from '@angular/material/list'; impor...
1
thienhaflash/french-fast-track
18d8f8e
src/data/types.ts
TypeScript
www.github.com/thienhaflash/french-fast-track/tree/main/src/data/types.ts
https://raw.githubusercontent.com/thienhaflash/french-fast-track/18d8f8e/src/data/types.ts
thienhaflash/french-fast-track 18d8f8e src/data/types.ts
true
200
462
export interface Exercise { id: number; type: 'multiple-choice' | 'fill-in-blank' | 'listening' | 'speaking'; question: string; options?: string[]; answer: string; } export interface VocabularyItem { french: string; english: string; pronunciation: string; } export interface Lesson { id: number; da...
0
jannikwienecke/my-blog
2307416
src/lib/markdoc/frontmatter.schema.ts
TypeScript
www.github.com/jannikwienecke/my-blog/tree/main/src/lib/markdoc/frontmatter.schema.ts
https://raw.githubusercontent.com/jannikwienecke/my-blog/2307416/src/lib/markdoc/frontmatter.schema.ts
jannikwienecke/my-blog 2307416 src/lib/markdoc/frontmatter.schema.ts
true
200
1,867
import { z } from "zod"; const blogBase = z.object({ draft: z.boolean().default(false), title: z.string({ required_error: "Required frontmatter missing: title", invalid_type_error: "title must be a string", }), date: z.date({ required_error: "Required frontmatter missing: date", invalid_type_er...
2
Ssnnee/kolandela
69b39db
hooks/useLocalMigrations.ts
TypeScript
www.github.com/Ssnnee/kolandela/tree/main/hooks/useLocalMigrations.ts
https://raw.githubusercontent.com/Ssnnee/kolandela/69b39db/hooks/useLocalMigrations.ts
Ssnnee/kolandela 69b39db hooks/useLocalMigrations.ts
true
200
409
import { db, sqliteDB } from '@/db/initialize-drizzle'; import migrations from '@/drizzle/migrations'; import { useMigrations } from 'drizzle-orm/expo-sqlite/migrator'; import { useDrizzleStudio } from 'expo-drizzle-studio-plugin'; export function useLocalMigrations(){ const migrationsData = useMigrations(db, migra...
4
jonataspm/Angular-Ecommerce
4a8e92e
backend/src/database/database.ts
TypeScript
www.github.com/jonataspm/Angular-Ecommerce/tree/main/backend/src/database/database.ts
https://raw.githubusercontent.com/jonataspm/Angular-Ecommerce/4a8e92e/backend/src/database/database.ts
jonataspm/Angular-Ecommerce 4a8e92e backend/src/database/database.ts
true
200
405
import Product from "../models/product"; import User from "../models/user"; import { MongoClient, MongoClientOptions } from 'mongodb'; export default class Database { static async getLogin(email: string, password: string): Promise<User | null> { return null; } static async getAll...
5
Implex1v/NSCTool
4525c07
web/lib/auth.ts
TypeScript
www.github.com/Implex1v/NSCTool/tree/main/web/lib/auth.ts
https://raw.githubusercontent.com/Implex1v/NSCTool/4525c07/web/lib/auth.ts
Implex1v/NSCTool 4525c07 web/lib/auth.ts
true
200
369
/** * Types of auth required by a page. */ export enum AuthOption { Required, Optional, None } /** * Roles assigned to user by IdP. */ export enum Roles { User = "api-user", Admin = "api-admin" } /** * Type exported by a component to configure authentication for a page. */ export type PageAu...
0
DFE-Digital/Dfe.Academies.External
f6bfae6
Dfe.Academies.External.Web/CypressTests/cypress/e2e/deleteNewJAMApp.cy.ts
TypeScript
www.github.com/DFE-Digital/Dfe.Academies.External/tree/main/Dfe.Academies.External.Web/CypressTests/cypress/e2e/deleteNewJAMApp.cy.ts
https://raw.githubusercontent.com/DFE-Digital/Dfe.Academies.External/f6bfae6/Dfe.Academies.External.Web/CypressTests/cypress/e2e/deleteNewJAMApp.cy.ts
DFE-Digital/Dfe.Academies.External f6bfae6 Dfe.Academies.External.Web/CypressTests/cypress/e2e/deleteNewJAMApp.cy.ts
true
200
1,591
import cookieHeaderModal from '../page-objects/components/cookieHeaderModal' import home from '../page-objects/pages/home' import login from '../page-objects/pages/login' import yourApplications from '../page-objects/pages/yourApplications' import whatAreYouApplyingToDo from '../page-objects/pages/whatAreYouApplyingToD...
1
peterlqs/coupon-manager
022d887
src/app/api/furnitures/route.ts
TypeScript
www.github.com/peterlqs/coupon-manager/tree/main/src/app/api/furnitures/route.ts
https://raw.githubusercontent.com/peterlqs/coupon-manager/022d887/src/app/api/furnitures/route.ts
peterlqs/coupon-manager 022d887 src/app/api/furnitures/route.ts
true
200
2,063
import { NextResponse } from "next/server"; import { revalidatePath } from "next/cache"; import { z } from "zod"; import { createFurniture, deleteFurniture, updateFurniture, } from "@/lib/api/furnitures/mutations"; import { furnitureIdSchema, insertFurnitureParams, updateFurnitureParams } from "@/lib/db/...
4
nicolaskiprop/eth-snipping-bot
312bc82
src/streaming/index.ts
TypeScript
www.github.com/nicolaskiprop/eth-snipping-bot/tree/main/src/streaming/index.ts
https://raw.githubusercontent.com/nicolaskiprop/eth-snipping-bot/312bc82/src/streaming/index.ts
nicolaskiprop/eth-snipping-bot 312bc82 src/streaming/index.ts
true
200
1,156
import fs from "fs" import { ethers } from "ethers" // get abis instance const getABI = new ethers.utils.Interface(fs.readFileSync(`${__dirname}/../abis/uniswap.json`, `utf8`)); // check for method const findByMethodName = (name: string) => { return ["addLiquidity", "addLiquidityETH"].includes(name); } ...
5
GuilhermeKill/TrabalhoPOIII
d5914cc
backend/src/controller/AlertaConsultaController.ts
TypeScript
www.github.com/GuilhermeKill/TrabalhoPOIII/tree/main/backend/src/controller/AlertaConsultaController.ts
https://raw.githubusercontent.com/GuilhermeKill/TrabalhoPOIII/d5914cc/backend/src/controller/AlertaConsultaController.ts
GuilhermeKill/TrabalhoPOIII d5914cc backend/src/controller/AlertaConsultaController.ts
true
200
3,707
import { Request, Response } from "express"; import AlertaConsultaBaseService from "../service/AlertaConsultaDataBaseService"; class AlertaMedicamentoController { async getAlertas(req: Request, res: Response) { try { const alertaResponse = await AlertaConsultaBaseService.listDBAlertaConsultaPacient...
0
AmaurySanchez/chatBro
85284bb
src/app/services/chat-gpt.service.ts
TypeScript
www.github.com/AmaurySanchez/chatBro/tree/main/src/app/services/chat-gpt.service.ts
https://raw.githubusercontent.com/AmaurySanchez/chatBro/85284bb/src/app/services/chat-gpt.service.ts
AmaurySanchez/chatBro 85284bb src/app/services/chat-gpt.service.ts
true
200
727
// chat.service.ts import { Injectable } from '@angular/core'; import { HttpClient, HttpHeaders } from '@angular/common/http'; import { environment } from 'src/environments/environment'; @Injectable({ providedIn: 'root' }) export class ChatGptService { private baseUrl = 'https://api.openai.com/v1/chat/completions...
1
ayeletBinder/Client-side-recipe-project
89c25b1
src/app/components/register/register.component.ts
TypeScript
www.github.com/ayeletBinder/Client-side-recipe-project/tree/main/src/app/components/register/register.component.ts
https://raw.githubusercontent.com/ayeletBinder/Client-side-recipe-project/89c25b1/src/app/components/register/register.component.ts
ayeletBinder/Client-side-recipe-project 89c25b1 src/app/components/register/register.component.ts
true
200
1,834
import { Component, OnInit, inject } from '@angular/core'; import {FormGroup,FormArray,Validator,FormControl, Validators, FormBuilder, FormsModule, NgForm} from '@angular/forms' import { ActivatedRoute, Router } from '@angular/router'; import { NgModule } from '@angular/core'; import { ReactiveFormsModule } from '@angu...
2
roland31x/CelestialDefenders
0b90298
src/app/game/classes/defenders/models/apprentice.ts
TypeScript
www.github.com/roland31x/CelestialDefenders/tree/main/src/app/game/classes/defenders/models/apprentice.ts
https://raw.githubusercontent.com/roland31x/CelestialDefenders/0b90298/src/app/game/classes/defenders/models/apprentice.ts
roland31x/CelestialDefenders 0b90298 src/app/game/classes/defenders/models/apprentice.ts
true
200
2,029
import { Attacker } from "../../attackers/attacker"; import { DefenderModel } from "../defender"; import { DefenderUpgrade, ExtraDamage, HomingUpgrade } from "../defender-upgrades"; import { ExtraRange } from "../defender-upgrades"; import { ExtraAttackSpeed } from "../defender-upgrades"; import { Projectile } from ".....
4
swsalim/inanutshell
62a5e58
lib/utils.ts
TypeScript
www.github.com/swsalim/inanutshell/tree/main/lib/utils.ts
https://raw.githubusercontent.com/swsalim/inanutshell/62a5e58/lib/utils.ts
swsalim/inanutshell 62a5e58 lib/utils.ts
true
200
1,058
export function absoluteUrl(path: string) { return `${process.env.NEXT_PUBLIC_BASE_URL}${path}`; } export function slugify(text: string): string { return text .toLowerCase() // Convert to lowercase .trim() // Trim whitespace from both ends .replace(/[^a-z0-9 -]/g, '') // Remove all non-word chars ....
5
n1latac/nest_project
4c4ece0
backend/src/models/typeBrand.model.ts
TypeScript
www.github.com/n1latac/nest_project/tree/main/backend/src/models/typeBrand.model.ts
https://raw.githubusercontent.com/n1latac/nest_project/4c4ece0/backend/src/models/typeBrand.model.ts
n1latac/nest_project 4c4ece0 backend/src/models/typeBrand.model.ts
true
200
524
import { BelongsTo, Column, DataType, Model, Table, } from 'sequelize-typescript'; import { Type } from './type.model'; import { Brand } from './brand.model'; @Table({ tableName: 'type_brand' }) export class TypeBrand extends Model { @Column({ type: DataType.INTEGER, allowNull: true, }) type_id:...
0
jacl38/kiosk
e657d72
src/hooks/useUnsavedChanges.ts
TypeScript
www.github.com/jacl38/kiosk/tree/main/src/hooks/useUnsavedChanges.ts
https://raw.githubusercontent.com/jacl38/kiosk/e657d72/src/hooks/useUnsavedChanges.ts
jacl38/kiosk e657d72 src/hooks/useUnsavedChanges.ts
true
200
1,552
import { Router, useRouter } from "next/router"; import { useEffect, useState } from "react"; /** Hook used to warn user before going to a different page if there are unsaved changes */ export default function useUnsavedChanges() { const router = useRouter(); const [_unsaved, _setUnsaved] = useState(false); /** As...
1
codingandcoffeerighthand/events-bun
f4adcb3
event_svc/internal/app/service.ts
TypeScript
www.github.com/codingandcoffeerighthand/events-bun/tree/main/event_svc/internal/app/service.ts
https://raw.githubusercontent.com/codingandcoffeerighthand/events-bun/f4adcb3/event_svc/internal/app/service.ts
codingandcoffeerighthand/events-bun f4adcb3 event_svc/internal/app/service.ts
true
200
4,058
import { status, type handleUnaryCall, type sendUnaryData, type Server, type ServerUnaryCall, } from "@grpc/grpc-js"; import type * as proto from "@shared/proto/gen/event_service"; import type { EventUc } from "../uc/events/uc"; import { mapCreateEventParams, mapEventInfo, mapUpdateEventParams } from "./map"; expo...
2
dannyhines/fantasy-bot
39caba2
lambda/src/getBoxscores.ts
TypeScript
www.github.com/dannyhines/fantasy-bot/tree/main/lambda/src/getBoxscores.ts
https://raw.githubusercontent.com/dannyhines/fantasy-bot/39caba2/lambda/src/getBoxscores.ts
dannyhines/fantasy-bot 39caba2 lambda/src/getBoxscores.ts
true
200
2,377
import { BoxscoreResponse, Matchup, MatchupObj, Scoreboard } from "./types"; const fetch = require("node-fetch"); const leagueId = process.env.FF_LEAGUE_ID; const getBoxscores = async (seasonId: number, scoringPeriodId: number) => { const BASE_URL = `https://fantasy.espn.com/apis/v3/games/ffl/seasons/${seasonId}/`; ...
4
rodrigo-noschang/tic-tac-toe-socket
2fe70b1
src/services/connectionServices.ts
TypeScript
www.github.com/rodrigo-noschang/tic-tac-toe-socket/tree/main/src/services/connectionServices.ts
https://raw.githubusercontent.com/rodrigo-noschang/tic-tac-toe-socket/2fe70b1/src/services/connectionServices.ts
rodrigo-noschang/tic-tac-toe-socket 2fe70b1 src/services/connectionServices.ts
true
200
1,935
import { rooms, users } from "../database/data"; import { IUser, IRoom } from "../database/types"; import { roomNameToSnakeCase } from "./roomInfoServices"; const createRoomAndInsertFirstPlayer = (selectedRoom: IRoom | undefined, user: IUser, roomNameSnakeCase: string) => { selectedRoom = { roomName: user....
5
crypto-dump/zora-trial
fb7bd2b
jest.config.ts
TypeScript
www.github.com/crypto-dump/zora-trial/tree/main/jest.config.ts
https://raw.githubusercontent.com/crypto-dump/zora-trial/fb7bd2b/jest.config.ts
crypto-dump/zora-trial fb7bd2b jest.config.ts
true
200
357
const config = { roots: ['<rootDir>/src'], setupFilesAfterEnv: ['./jest.setup.ts'], testMatch: [ '**/__tests__/**/*.+(ts|tsx|js)', '**/?(*.)+(spec|test).+(ts|tsx|js)', ], transform: { '^.+\\.(ts|tsx)$': 'ts-jest', }, testEnvironment: 'jest-environment-jsdom', moduleDirectories: ['node_module...
1
steven-yn/js_data_structure
6aa8efe
section1_big'O/big_O_notation.ts
TypeScript
www.github.com/steven-yn/js_data_structure/tree/main/section1_big'O/big_O_notation.ts
https://raw.githubusercontent.com/steven-yn/js_data_structure/6aa8efe/section1_big%27O/big_O_notation.ts
steven-yn/js_data_structure 6aa8efe section1_big'O/big_O_notation.ts
true
200
800
// O(1) : 실행시간에 변화가 없다 const addUpToConstant = (n: number) => { return (n * (n + 1)) / 2; }; // O(n) : n 값이 커질수록 선형적으로 연산이 늘어난다. const addUpToLinear = (n: number) => { let total = 0; for (let i = 1; i <= n; i++) { total += i; } return total; }; // O(n) : 2n 이 아닌 n 임을 기억해야함. 전체적인 그림에서는 선형이다. const coun...
2
heddendorp/msc-thesis
8b97617
evaluation/src/setupBranches.ts
TypeScript
www.github.com/heddendorp/msc-thesis/tree/main/evaluation/src/setupBranches.ts
https://raw.githubusercontent.com/heddendorp/msc-thesis/8b97617/evaluation/src/setupBranches.ts
heddendorp/msc-thesis 8b97617 evaluation/src/setupBranches.ts
true
200
2,053
import * as dotenv from "dotenv"; dotenv.config(); import { execSync } from "child_process"; import { resolve } from "path"; import jetpack from "fs-jetpack"; // const branchPrefix = "flaky-evaluation-2"; const branchPrefix = "evaluation-assess-6"; const helperVersion = "latest"; const batchSize = 6; async function b...
0
maacosta/sp
82f9e1e
front/src/com/hooks/useProductosFetch.ts
TypeScript
www.github.com/maacosta/sp/tree/main/front/src/com/hooks/useProductosFetch.ts
https://raw.githubusercontent.com/maacosta/sp/82f9e1e/front/src/com/hooks/useProductosFetch.ts
maacosta/sp 82f9e1e front/src/com/hooks/useProductosFetch.ts
true
200
1,458
import React, { useEffect, useState } from "react"; import { useQuery } from "react-query"; import * as productosApi from "../../services/productos-api"; import { Producto } from "../../types/productos"; import { ApiResponse } from "../../types/apiData"; import moment from "moment"; export const useProductosFetch = (i...
5
eofoneta/veridianglow-backend
e0b735d
src/models/product.model.ts
TypeScript
www.github.com/eofoneta/veridianglow-backend/tree/main/src/models/product.model.ts
https://raw.githubusercontent.com/eofoneta/veridianglow-backend/e0b735d/src/models/product.model.ts
eofoneta/veridianglow-backend e0b735d src/models/product.model.ts
true
200
2,791
import mongoose, { Document, Model, Types } from "mongoose"; export interface IProduct extends Document { name: string; description: string; price: number; discountPrice: number; stock: number; weight: number; isOutOfStock: boolean; howToUse?: string; image: string; category: string; subCategory:...
4
CloudGeometry/cg-devx-wl-cnask
18ef73c
libs/shared/utils/src/lib/forms/set-server-errors.ts
TypeScript
www.github.com/CloudGeometry/cg-devx-wl-cnask/tree/main/libs/shared/utils/src/lib/forms/set-server-errors.ts
https://raw.githubusercontent.com/CloudGeometry/cg-devx-wl-cnask/18ef73c/libs/shared/utils/src/lib/forms/set-server-errors.ts
CloudGeometry/cg-devx-wl-cnask 18ef73c libs/shared/utils/src/lib/forms/set-server-errors.ts
true
200
705
import { ApolloError } from '@apollo/client'; import { useEffect } from 'react'; export function useSetServerErrors<T>( setError: ( fieldName: keyof T, error: { type: string; message: string } ) => void, error?: ApolloError ) { useEffect(() => { if (error?.graphQLErrors?.[0]?.extensions?.code === '...
2
JoeTheDave/advent-of-code
73fc2ae
solutions/aoc/2023/06/index.ts
TypeScript
www.github.com/JoeTheDave/advent-of-code/tree/main/solutions/aoc/2023/06/index.ts
https://raw.githubusercontent.com/JoeTheDave/advent-of-code/73fc2ae/solutions/aoc/2023/06/index.ts
JoeTheDave/advent-of-code 73fc2ae solutions/aoc/2023/06/index.ts
true
200
1,317
// Advent of Code | 2023 | Day 6 | Wait For It // https://adventofcode.com/2023/day/6 // https://adventofcode.com/2023/day/6/input import { testData, puzzleData } from './data' export const displayName = 'AOC | 2023 | Day 6 | Wait For It' export const complete = [true, true] const useTestData = false const data = u...
0
Ahmed-Osama-Mohammed/Prickle-co
b844cb4
src/app/Shared/modules/brand.module.ts
TypeScript
www.github.com/Ahmed-Osama-Mohammed/Prickle-co/tree/main/src/app/Shared/modules/brand.module.ts
https://raw.githubusercontent.com/Ahmed-Osama-Mohammed/Prickle-co/b844cb4/src/app/Shared/modules/brand.module.ts
Ahmed-Osama-Mohammed/Prickle-co b844cb4 src/app/Shared/modules/brand.module.ts
true
200
379
export interface Brand { name: string; establishedYear: number; address: string; street: string; phone: string; email: string; openTime: OpenTime; } export interface OpenTime { day1: string; time1: string; day2: string; ...
1
pedroduranc1/PhotoGrad
d258c85
api/Estudiante/update.ts
TypeScript
www.github.com/pedroduranc1/PhotoGrad/tree/main/api/Estudiante/update.ts
https://raw.githubusercontent.com/pedroduranc1/PhotoGrad/d258c85/api/Estudiante/update.ts
pedroduranc1/PhotoGrad d258c85 api/Estudiante/update.ts
true
200
728
import { COLLECTIONS } from "@/constants/coleccions.fb"; import { db } from "@/utils/firebase"; import { doc, updateDoc } from "firebase/firestore"; export default async function update(escuelaId:string, escuelaData:any) { try { // Referencia al documento que se va a actualizar const escuelaRef = d...
4
Andre309/Playwright
a878587
tests/POM/Modal.ts
TypeScript
www.github.com/Andre309/Playwright/tree/main/tests/POM/Modal.ts
https://raw.githubusercontent.com/Andre309/Playwright/a878587/tests/POM/Modal.ts
Andre309/Playwright a878587 tests/POM/Modal.ts
true
200
1,834
import { Locator, Page } from '@playwright/test'; export class Modal { readonly registerBtn: Locator; readonly firstNameInput: Locator; readonly lastNameInput: Locator; readonly emailInput: Locator; readonly passwordInput: Locator; readonly reEnterPasswordInput: Locator; readonly submitBtn: Loca...
5
HRM/VueFormGen
33c1bbd
packages/form-generator/vite.config.ts
TypeScript
www.github.com/HRM/VueFormGen/tree/main/packages/form-generator/vite.config.ts
https://raw.githubusercontent.com/HRM/VueFormGen/33c1bbd/packages/form-generator/vite.config.ts
HRM/VueFormGen 33c1bbd packages/form-generator/vite.config.ts
true
200
1,016
import { defineConfig } from "vite"; import { resolve } from "path"; import vue from "@vitejs/plugin-vue"; import dts from "vite-plugin-dts"; import autoprefixer from 'autoprefixer' // https://vite.dev/config/ export default defineConfig({ plugins: [vue(), dts({ tsconfigPath: "./tsconfig.app.json", rollupTypes: true...
6
AlcoholTobaccoCode/EmptyProjectForPackage-
6a94c55
src/main.ts
TypeScript
www.github.com/AlcoholTobaccoCode/EmptyProjectForPackage-/tree/main/src/main.ts
https://raw.githubusercontent.com/AlcoholTobaccoCode/EmptyProjectForPackage-/6a94c55/src/main.ts
AlcoholTobaccoCode/EmptyProjectForPackage- 6a94c55 src/main.ts
true
200
229
import { createApp } from 'vue' import './style.css' import App from './App.vue' import ElementPlus from 'element-plus' // import 'element-plus/dist/index.css' const app = createApp(App) app.use(ElementPlus) app.mount('#app')
2
ZsigmondViktorArpadRuander/20231108feladat
d33900d
feladat1/feladat1.ts
TypeScript
www.github.com/ZsigmondViktorArpadRuander/20231108feladat/tree/main/feladat1/feladat1.ts
https://raw.githubusercontent.com/ZsigmondViktorArpadRuander/20231108feladat/d33900d/feladat1/feladat1.ts
ZsigmondViktorArpadRuander/20231108feladat d33900d feladat1/feladat1.ts
true
200
4,960
/* TYPESCRIPT - Keszits alprogramot, ami... - Eldonti, hogy a parameterul kapott szam tombben van-e negativ szam - Egy parametrul kapott sugarbol megallapitja a kor keruletet es teruletet - Tuple-t alkalmazz - Kerulet: 2 * sugar * PI - Terulet: sugar * sugar * PI - Keszits interfac...
0
LefClem/yoga-app
c51cca6
front/src/app/components/me/me.component.spec.ts
TypeScript
www.github.com/LefClem/yoga-app/tree/main/front/src/app/components/me/me.component.spec.ts
https://raw.githubusercontent.com/LefClem/yoga-app/c51cca6/front/src/app/components/me/me.component.spec.ts
LefClem/yoga-app c51cca6 front/src/app/components/me/me.component.spec.ts
true
200
2,994
import { HttpClientModule } from '@angular/common/http'; import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing'; import { MatCardModule } from '@angular/material/card'; import { MatIconModule } from '@angular/material/icon'; import { MatSnackBarModule } from '@angular/material/snack-bar'; im...
1
Oliver-IV/OliFinance-ts
758575e
server/services/IncomeService.ts
TypeScript
www.github.com/Oliver-IV/OliFinance-ts/tree/main/server/services/IncomeService.ts
https://raw.githubusercontent.com/Oliver-IV/OliFinance-ts/758575e/server/services/IncomeService.ts
Oliver-IV/OliFinance-ts 758575e server/services/IncomeService.ts
true
200
2,610
import IncomeDTO from "../dtos/IncomeDTO"; import { RepositoryError } from "../errors/RepositoryError"; import { ServiceError } from "../errors/ServiceError"; import IIncomeRepository from "../interfaces/repository/IIncomeRepository"; import IUserRepository from "../interfaces/repository/IUserRepository"; import IIncom...
7
lopjf/thirdweb-engine
e174618
src/server/routes/relayer/index.ts
TypeScript
www.github.com/lopjf/thirdweb-engine/tree/main/src/server/routes/relayer/index.ts
https://raw.githubusercontent.com/lopjf/thirdweb-engine/e174618/src/server/routes/relayer/index.ts
lopjf/thirdweb-engine e174618 src/server/routes/relayer/index.ts
true
200
7,772
import { Static, Type } from "@sinclair/typebox"; import { ethers, utils } from "ethers"; import { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { ERC20PermitAbi, ERC2771ContextAbi, ForwarderAbi, ForwarderAbiEIP712ChainlessDomain, NativeMetaTransaction, } from "../....
3
yassinehamza1996/EBANKFRONT
cacc551
src/app/components/add-account/add-account.component.ts
TypeScript
www.github.com/yassinehamza1996/EBANKFRONT/tree/main/src/app/components/add-account/add-account.component.ts
https://raw.githubusercontent.com/yassinehamza1996/EBANKFRONT/cacc551/src/app/components/add-account/add-account.component.ts
yassinehamza1996/EBANKFRONT cacc551 src/app/components/add-account/add-account.component.ts
true
200
2,372
import {Component, OnInit} from '@angular/core'; import {FormBuilder, FormGroup, Validators} from "@angular/forms"; import {ActivatedRoute, Router} from "@angular/router"; import {AccountService} from "../../services/accounts/account.service"; import {SavingAccountCreationFormModel} from "../../models/saving-account-cr...
4
gravity-ui/charts
96d3ca4
src/types/chart/chart.ts
TypeScript
www.github.com/gravity-ui/charts/tree/main/src/types/chart/chart.ts
https://raw.githubusercontent.com/gravity-ui/charts/96d3ca4/src/types/chart/chart.ts
gravity-ui/charts 96d3ca4 src/types/chart/chart.ts
true
200
499
import type {MeaningfulAny} from '../misc'; import type {ChartTooltipRendererArgs} from './tooltip'; export interface ChartMargin { top: number; right: number; bottom: number; left: number; } export interface ChartOptions { margin?: Partial<ChartMargin>; events?: { click?: (data: {poi...
5
osmelsr97/smyplace-store
f1ae4e1
src/actions/order/place-order.ts
TypeScript
www.github.com/osmelsr97/smyplace-store/tree/main/src/actions/order/place-order.ts
https://raw.githubusercontent.com/osmelsr97/smyplace-store/f1ae4e1/src/actions/order/place-order.ts
osmelsr97/smyplace-store f1ae4e1 src/actions/order/place-order.ts
true
200
3,444
"use server"; import { auth } from "@/auth.config"; import prisma from "@/lib/prisma"; import type { Address, Size } from "@/interfaces"; interface ProductToOrder { productId: string; quantity: number; size: Size; } export const placeOrder = async ( productIds: ProductToOrder[], address: Address ) => { ...
6
AndreaNapoli08/Animal-House_Progetto-TW
d86afab
Api/src/utils/const.ts
TypeScript
www.github.com/AndreaNapoli08/Animal-House_Progetto-TW/tree/main/Api/src/utils/const.ts
https://raw.githubusercontent.com/AndreaNapoli08/Animal-House_Progetto-TW/d86afab/Api/src/utils/const.ts
AndreaNapoli08/Animal-House_Progetto-TW d86afab Api/src/utils/const.ts
true
200
376
export const constants = { expiresInToken: '4h', pwdMinLenght: 6, images: "../data/images", } // FASCE_ORARIE => ["10:00-11:00", "...", "19:00-20:00"] const orari = { start: 10, end: 20, step: 1 } export const FASCE_ORARIE = Array.from( { length: orari.end - orari.start }, (value, index: number) => `${index + ora...
0
poletela-na-mars/melody
60ae114
utils/getFavourites.ts
TypeScript
www.github.com/poletela-na-mars/melody/tree/main/utils/getFavourites.ts
https://raw.githubusercontent.com/poletela-na-mars/melody/60ae114/utils/getFavourites.ts
poletela-na-mars/melody 60ae114 utils/getFavourites.ts
true
200
1,001
import { Song } from '@/types'; export const getFavourites = (songs: Song[]): { favAuthor: string, favGenre: string, favMood: string } => { let favAuthor = '', favGenre = '', favMood = ''; let maxListenCounter = 0; const genresMap = new Map(); const moodsMap = new Map(); songs.forEach((song) => { if (song.lis...
2
rebustron/aztec
38fbd5c
yarn-project/cli/src/cmds/l1/update_l1_validators.ts
TypeScript
www.github.com/rebustron/aztec/tree/main/yarn-project/cli/src/cmds/l1/update_l1_validators.ts
https://raw.githubusercontent.com/rebustron/aztec/38fbd5c/yarn-project/cli/src/cmds/l1/update_l1_validators.ts
rebustron/aztec 38fbd5c yarn-project/cli/src/cmds/l1/update_l1_validators.ts
true
200
8,030
import { EthCheatCodes } from '@aztec/aztec.js'; import { type EthAddress } from '@aztec/circuits.js'; import { createEthereumChain, getL1ContractsConfigEnvVars, isAnvilTestChain } from '@aztec/ethereum'; import { type LogFn, type Logger } from '@aztec/foundation/log'; import { RollupAbi, TestERC20Abi } from '@aztec/l1...
1
manettifabrizio/42cursus_matcha
7980ea9
srcs/server/src/feature/block/use-case/find-by-user-to/query.ts
TypeScript
www.github.com/manettifabrizio/42cursus_matcha/tree/main/srcs/server/src/feature/block/use-case/find-by-user-to/query.ts
https://raw.githubusercontent.com/manettifabrizio/42cursus_matcha/7980ea9/srcs/server/src/feature/block/use-case/find-by-user-to/query.ts
manettifabrizio/42cursus_matcha 7980ea9 srcs/server/src/feature/block/use-case/find-by-user-to/query.ts
true
200
735
import type { DatabaseService } from "@/core/database/types"; import type { Block } from "../../entity"; // Type ------------------------------------------------------------------------ type QueryInput = Pick<Block, "id_user_to">; type QueryOutput = Omit<Block, "id_user_to">[]; // Function --------------------------...
3
Schmidt4win/FRONT-HEATMAP-ONU
4941942
src/mixins/ClienteApi.ts
TypeScript
www.github.com/Schmidt4win/FRONT-HEATMAP-ONU/tree/main/src/mixins/ClienteApi.ts
https://raw.githubusercontent.com/Schmidt4win/FRONT-HEATMAP-ONU/4941942/src/mixins/ClienteApi.ts
Schmidt4win/FRONT-HEATMAP-ONU 4941942 src/mixins/ClienteApi.ts
true
200
1,093
import ICliente from '../interfaces/ICliente'; export default class ClienteApi { async fetchClienteData(): Promise<ICliente[]> { try { const response = await fetch('http://localhost:3010/cadastroclientesget'); const data = await response.json(); return data; } catch (error) { console....
7
chau4w/SheCodeHack2023
e224d40
server/src/app/useCases/cofounder/cofounder.ts
TypeScript
www.github.com/chau4w/SheCodeHack2023/tree/main/server/src/app/useCases/cofounder/cofounder.ts
https://raw.githubusercontent.com/chau4w/SheCodeHack2023/e224d40/server/src/app/useCases/cofounder/cofounder.ts
chau4w/SheCodeHack2023 e224d40 server/src/app/useCases/cofounder/cofounder.ts
true
200
1,135
import { CofounderInterface } from "../../../types/cofounderInterface"; import { HttpStatus } from "../../../types/httpStatus"; import AppError from "../../../utils/appError"; import { CofounderDbInterface } from "../../repositories/cofounderDbRepository"; export const findCofounderById = ( id: string, dbRepositor...
4
inprodiwebstudio/inprodi-ui
f8c91a4
packages/inprodi-core/src/TextGroup/TextGroup.styles.ts
TypeScript
www.github.com/inprodiwebstudio/inprodi-ui/tree/main/packages/inprodi-core/src/TextGroup/TextGroup.styles.ts
https://raw.githubusercontent.com/inprodiwebstudio/inprodi-ui/f8c91a4/packages/inprodi-core/src/TextGroup/TextGroup.styles.ts
inprodiwebstudio/inprodi-ui f8c91a4 packages/inprodi-core/src/TextGroup/TextGroup.styles.ts
true
200
402
import { createStyles, DefaultMantineColor } from "@mantine/core"; const styles = createStyles((theme, { color } : { color ?: DefaultMantineColor } ) => { return { root : { "& svg" : { color : color ? theme.fn.variant({ variant : "filled", color }).background : theme.colorScheme === "dark" ? theme...
5
s-y-00/zkSMARTHealthCards
62b49c9
frontend/utilities/shc/parsers.ts
TypeScript
www.github.com/s-y-00/zkSMARTHealthCards/tree/main/frontend/utilities/shc/parsers.ts
https://raw.githubusercontent.com/s-y-00/zkSMARTHealthCards/62b49c9/frontend/utilities/shc/parsers.ts
s-y-00/zkSMARTHealthCards 62b49c9 frontend/utilities/shc/parsers.ts
true
200
3,875
const { keys } = require('./keys'); // const jsQR = require('jsqr'); // const PNG = require('pngjs').PNG; const zlib = require("zlib"); const axios = require("axios").default; import jose from "node-jose"; /** * Reads a PNG QR code from a file and returns the data as a string * @param {Buffer} fileBuffer Buffer of t...
6
resamsel/advent-of-code
c1049a9
src/2021/day10.ts
TypeScript
www.github.com/resamsel/advent-of-code/tree/main/src/2021/day10.ts
https://raw.githubusercontent.com/resamsel/advent-of-code/c1049a9/src/2021/day10.ts
resamsel/advent-of-code c1049a9 src/2021/day10.ts
true
200
2,774
import { List } from 'immutable'; import { sum } from '../util'; enum Type { OK, Incomplete, Corrupt } interface Result { type: Type; found: string; expected: string; // debugging info lineNumber: number; column: number; } export const parse = (input: string): List<string> => { return List(input.spli...
0
srforever/giro3d
d88ebc1
src/renderer/ColorMapAtlas.ts
TypeScript
www.github.com/srforever/giro3d/tree/main/src/renderer/ColorMapAtlas.ts
https://raw.githubusercontent.com/srforever/giro3d/d88ebc1/src/renderer/ColorMapAtlas.ts
srforever/giro3d d88ebc1 src/renderer/ColorMapAtlas.ts
true
200
4,306
import { NearestFilter, UnsignedByteType, type Texture, type WebGLRenderer, RGBAFormat, } from 'three'; import Rect from '../core/Rect'; import type ColorMap from '../core/layer/ColorMap'; import WebGLComposer from './composition/WebGLComposer'; /** * Combines color map textures into a single one....
2
boostcampwm-2022/web11-BOOSTPRESS
a84c508
backend/src/modules/article/db.command.service.ts
TypeScript
www.github.com/boostcampwm-2022/web11-BOOSTPRESS/tree/main/backend/src/modules/article/db.command.service.ts
https://raw.githubusercontent.com/boostcampwm-2022/web11-BOOSTPRESS/a84c508/backend/src/modules/article/db.command.service.ts
boostcampwm-2022/web11-BOOSTPRESS a84c508 backend/src/modules/article/db.command.service.ts
true
200
2,432
import { BadRequestException, ForbiddenException, Injectable, UnauthorizedException, } from '@nestjs/common'; import { User } from '@prisma/client'; import { parseMainImageURL } from 'src/utils'; import { PrismaService } from '../prisma/prisma.service'; import { ArticleCommandResponseDTO, UpsertDTO } fr...
1
Monsterleds/ifun_ssr_reactjs_nextjs
015fbe5
src/components/Loading/styles.ts
TypeScript
www.github.com/Monsterleds/ifun_ssr_reactjs_nextjs/tree/main/src/components/Loading/styles.ts
https://raw.githubusercontent.com/Monsterleds/ifun_ssr_reactjs_nextjs/015fbe5/src/components/Loading/styles.ts
Monsterleds/ifun_ssr_reactjs_nextjs 015fbe5 src/components/Loading/styles.ts
true
200
593
import styled from 'styled-components'; import { darken } from 'polished'; export const Container = styled.div` background-color: #f0f0f5; position: fixed; display: flex; align-items: center; justify-content: center; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 20; `; export const Conten...
3
evertonnasac/UC-QA-testes-software
d333e5f
src/APP/backend.ts
TypeScript
www.github.com/evertonnasac/UC-QA-testes-software/tree/main/src/APP/backend.ts
https://raw.githubusercontent.com/evertonnasac/UC-QA-testes-software/d333e5f/src/APP/backend.ts
evertonnasac/UC-QA-testes-software d333e5f src/APP/backend.ts
true
200
2,742
import {User,err,success,user1, user2, errLoginLocked, Attemps, validToken, errNewPasswordInvalid, errNewPasswordTokenInvalid, newPasswordSuccess} from "./types" //Simulando lista de usuários com mais de 3 tentativas de login falhadas const loginAttemps : Attemps[] = [] //Mock de usuarios simulando um banco de dado...
4
TopGunBuild/typed
983ac12
test/object.test.ts
TypeScript
www.github.com/TopGunBuild/typed/tree/main/test/object.test.ts
https://raw.githubusercontent.com/TopGunBuild/typed/983ac12/test/object.test.ts
TopGunBuild/typed 983ac12 test/object.test.ts
true
200
634
import { boolean, number, object, optional, string } from '../src/structs'; import { expectErr, expectOk } from './test-util'; const struct = object( { a: string('string test'), b: number(), c: optional(boolean()), }, 'test', ); it('returns ok if the input is an object', () => ...
6
AcrylicShrimp/devlog-backend
09abbd5
src/auth/auth.token.service.ts
TypeScript
www.github.com/AcrylicShrimp/devlog-backend/tree/main/src/auth/auth.token.service.ts
https://raw.githubusercontent.com/AcrylicShrimp/devlog-backend/09abbd5/src/auth/auth.token.service.ts
AcrylicShrimp/devlog-backend 09abbd5 src/auth/auth.token.service.ts
true
200
895
import { Injectable } from '@nestjs/common'; import { compare, hash } from 'bcrypt'; import { randomBytes, createHash } from 'crypto'; const TOKEN_BYTE = 128; const TOKEN_SHORT_BYTE = 32; const HASH_ROUND = 10; @Injectable() export class AuthTokenService { generate(): Promise<string> { return new Promise((resolve,...
5
felixmosh/babel-plugin-transform-react-remove-display-name
dbd40d1
src/index.ts
TypeScript
www.github.com/felixmosh/babel-plugin-transform-react-remove-display-name/tree/main/src/index.ts
https://raw.githubusercontent.com/felixmosh/babel-plugin-transform-react-remove-display-name/dbd40d1/src/index.ts
felixmosh/babel-plugin-transform-react-remove-display-name dbd40d1 src/index.ts
true
200
3,535
import type * as BabelCoreNamespace from '@babel/core'; import type { PluginObj } from '@babel/core'; import * as t from '@babel/types'; import { CallExpression } from '@babel/types'; import { isReactComponent } from './utils/isReactComponent'; export type Babel = typeof BabelCoreNamespace; const stateProp = 'ReactCom...
0
hank0982/design-gallery-backend
9e2897c
src/modules/rating/rating.controller.ts
TypeScript
www.github.com/hank0982/design-gallery-backend/tree/main/src/modules/rating/rating.controller.ts
https://raw.githubusercontent.com/hank0982/design-gallery-backend/9e2897c/src/modules/rating/rating.controller.ts
hank0982/design-gallery-backend 9e2897c src/modules/rating/rating.controller.ts
true
200
1,411
import { Controller, Get, Post, Body, Patch, Param, Delete, } from '@nestjs/common'; import { RatingService } from './rating.service'; import { CreateRatingDto } from './dtos/create-rating.dto'; import { UpdateRatingDto } from './dtos/update-rating.dto'; import { ApiTags } from '@nestjs/swagger'; import {...
2
briighter/palace
05679de
palace/src/app/shared/auth-nav/auth-nav.component.spec.ts
TypeScript
www.github.com/briighter/palace/tree/main/palace/src/app/shared/auth-nav/auth-nav.component.spec.ts
https://raw.githubusercontent.com/briighter/palace/05679de/palace/src/app/shared/auth-nav/auth-nav.component.spec.ts
briighter/palace 05679de palace/src/app/shared/auth-nav/auth-nav.component.spec.ts
true
200
704
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { IonicModule } from '@ionic/angular'; import { AuthNavComponent } from './auth-nav.component'; describe('AuthNavComponent', () => { let component: AuthNavComponent; let fixture: ComponentFixture<AuthNavComponent>; beforeEa...
1
TecH260/test
11a5674
app/axios/SetupRegion.ts
TypeScript
www.github.com/TecH260/test/tree/main/app/axios/SetupRegion.ts
https://raw.githubusercontent.com/TecH260/test/11a5674/app/axios/SetupRegion.ts
TecH260/test 11a5674 app/axios/SetupRegion.ts
true
200
403
export default function setupRegion(axios: any, store: any) { axios.interceptors.request.use( (config: any) => { try { const { region: { id }, } = store.getState(); if (id) { config.headers.region = `${id}`; } return config; } catch (e) { ...
7
track-change/future-of-conservation
45015ff
sanity/schemas/content/modules/Footnotes.ts
TypeScript
www.github.com/track-change/future-of-conservation/tree/main/sanity/schemas/content/modules/Footnotes.ts
https://raw.githubusercontent.com/track-change/future-of-conservation/45015ff/sanity/schemas/content/modules/Footnotes.ts
track-change/future-of-conservation 45015ff sanity/schemas/content/modules/Footnotes.ts
true
200
614
import { BsSuperscript } from "react-icons/bs/"; import { defineField, defineType } from "sanity"; export default defineType({ title: "Footnotes", name: "module_footnote", type: "object", icon: BsSuperscript, fields: [ defineField({ title: "Footnotes", name: "content", type: "array" as ...
3
Abrarkmr/belsoft
ae78006
Code/belsoft/src/app/shared/menu/menu.component.ts
TypeScript
www.github.com/Abrarkmr/belsoft/tree/main/Code/belsoft/src/app/shared/menu/menu.component.ts
https://raw.githubusercontent.com/Abrarkmr/belsoft/ae78006/Code/belsoft/src/app/shared/menu/menu.component.ts
Abrarkmr/belsoft ae78006 Code/belsoft/src/app/shared/menu/menu.component.ts
true
200
518
import { Component, OnInit, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; @Component({ selector: 'app-menu', templateUrl: './menu.component.html', styleUrls: ['./menu.component.scss'] }) export class MenuComponent implements OnInit { constructor( private router: Router, ) {...
4
SerkBlack88/node-webrest-server
62d0617
src/presentation/server.ts
TypeScript
www.github.com/SerkBlack88/node-webrest-server/tree/main/src/presentation/server.ts
https://raw.githubusercontent.com/SerkBlack88/node-webrest-server/62d0617/src/presentation/server.ts
SerkBlack88/node-webrest-server 62d0617 src/presentation/server.ts
true
200
1,286
import express, { Router } from 'express'; import path from 'path'; interface Options { port: number; routes: Router; public_path?: string; } export class Server { private app = express(); private readonly port: number; private readonly publicPath: string; private readonly routes: Router;...
6
EdreesAshab/learning
1f71672
src/app/app.config.ts
TypeScript
www.github.com/EdreesAshab/learning/tree/main/src/app/app.config.ts
https://raw.githubusercontent.com/EdreesAshab/learning/1f71672/src/app/app.config.ts
EdreesAshab/learning 1f71672 src/app/app.config.ts
true
200
759
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; import { provideRouter } from '@angular/router'; import { provideHttpClient } from '@angular/common/http'; import { provideAnimationsAsync } from '@angular/platform-browser/animations/async'; import { provideAnimations } from '@angular/plat...
2
alexkaiser34/MLStocks
85d08b4
src/frontend/src/types/ChartUI_Actions.d.ts
TypeScript
www.github.com/alexkaiser34/MLStocks/tree/main/src/frontend/src/types/ChartUI_Actions.d.ts
https://raw.githubusercontent.com/alexkaiser34/MLStocks/85d08b4/src/frontend/src/types/ChartUI_Actions.d.ts
alexkaiser34/MLStocks 85d08b4 src/frontend/src/types/ChartUI_Actions.d.ts
true
200
1,483
import React from "react"; import { CompanyProfileData, CompanyStockPrice, CompanyEarningsData, CompanyNewsData, CompanyBuyHoldData, CompanyMeasurements } from "./QueryHelperTypes"; export interface setTime { name: string, time: TimeOps, } export interface setPrice { name: string...
0
KlaudiuszKudla/Chat-frontend-public
011a1d9
src/app/modules/auth/store/auth.actions.ts
TypeScript
www.github.com/KlaudiuszKudla/Chat-frontend-public/tree/main/src/app/modules/auth/store/auth.actions.ts
https://raw.githubusercontent.com/KlaudiuszKudla/Chat-frontend-public/011a1d9/src/app/modules/auth/store/auth.actions.ts
KlaudiuszKudla/Chat-frontend-public 011a1d9 src/app/modules/auth/store/auth.actions.ts
true
200
1,826
import { createAction, props } from '@ngrx/store'; import { IUser, LoginData, RegisterData, } from '../../core/models/responseModel'; const LOGIN_TYPE = '[Auth] Login'; const LOGIN_SUCCESS_TYPE = '[Auth] Login Success'; const LOGIN_FAILURE_TYPE = '[Auth] Login Failure'; const AUTO_LOGIN_TYPE = '[Auth] Auto Logi...
3
AlejandroZuletaa/test
6c3a707
frontend/src/shared/components/organisms/table-user/table-user.component.ts
TypeScript
www.github.com/AlejandroZuletaa/test/tree/main/frontend/src/shared/components/organisms/table-user/table-user.component.ts
https://raw.githubusercontent.com/AlejandroZuletaa/test/6c3a707/frontend/src/shared/components/organisms/table-user/table-user.component.ts
AlejandroZuletaa/test 6c3a707 frontend/src/shared/components/organisms/table-user/table-user.component.ts
true
200
4,798
import { UpdateUserService } from '@services/update-user.service'; import { ModalControllerService } from '@services/modal-controller.service'; import { DeleteUserService } from '@services/delete-user.service'; import { CommonModule } from '@angular/common'; import { Component, OnDestroy, OnInit } from '@angular/core';...
7
voltiso/mono
d3eb180
packages/transactor/src/DocRef/_/applySchema.ts
TypeScript
www.github.com/voltiso/mono/tree/main/packages/transactor/src/DocRef/_/applySchema.ts
https://raw.githubusercontent.com/voltiso/mono/d3eb180/packages/transactor/src/DocRef/_/applySchema.ts
voltiso/mono d3eb180 packages/transactor/src/DocRef/_/applySchema.ts
true
200
1,585
// ⠀ⓥ 2024 🌩 🌩 ⠀ ⠀ // ⠀ 🌩 V͛o͛͛͛lt͛͛͛i͛͛͛͛so͛͛͛.com⠀ ⠀⠀⠀ import type { Schema } from '@voltiso/schemar' import { ValidationError } from '@voltiso/schemar' import { isDeleteIt, isPlainObject } from '@voltiso/util' import type { IntrinsicFields, IntrinsicFieldsSchema } from '~/schemas' import {...
1
ameerbadushaht/Angular_CartOrder
d0af9c1
src/app/app-routing.module.ts
TypeScript
www.github.com/ameerbadushaht/Angular_CartOrder/tree/main/src/app/app-routing.module.ts
https://raw.githubusercontent.com/ameerbadushaht/Angular_CartOrder/d0af9c1/src/app/app-routing.module.ts
ameerbadushaht/Angular_CartOrder d0af9c1 src/app/app-routing.module.ts
true
200
684
import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { UserComponent } from './components/user/user.component'; import { HomeComponent } from './components/home/home.component'; import { OrderPrintComponent } from './components/order-print/order-print.component'; impo...
4
neilanthonyte/next-react
ad7e61d
src/components/generic/TabbedNav/_tests/index.ctrl.ts
TypeScript
www.github.com/neilanthonyte/next-react/tree/main/src/components/generic/TabbedNav/_tests/index.ctrl.ts
https://raw.githubusercontent.com/neilanthonyte/next-react/ad7e61d/src/components/generic/TabbedNav/_tests/index.ctrl.ts
neilanthonyte/next-react ad7e61d src/components/generic/TabbedNav/_tests/index.ctrl.ts
true
200
1,507
import { toTestSelector } from "next-shared/src/helpers/toTestSelector"; import { BadgeCtrl } from "../../Badge/_tests/index.ctrl"; import { NotificationsCtrl } from "../../Notifications/_tests/index.ctrl"; export class TabbedNavCtrl { public tabbedNav: Selector; constructor(private selector: Selector, private t:...
5
Olsik123/PROJEKT_VOJ-BackupSystem
12b1043
WebAdmin/src/app/pages/config-page/config-page.component.ts
TypeScript
www.github.com/Olsik123/PROJEKT_VOJ-BackupSystem/tree/main/WebAdmin/src/app/pages/config-page/config-page.component.ts
https://raw.githubusercontent.com/Olsik123/PROJEKT_VOJ-BackupSystem/12b1043/WebAdmin/src/app/pages/config-page/config-page.component.ts
Olsik123/PROJEKT_VOJ-BackupSystem 12b1043 WebAdmin/src/app/pages/config-page/config-page.component.ts
true
200
794
import { Component, OnInit } from '@angular/core'; import {ConfigService} from "../../services/config.service"; import {Config} from "../../modules/config"; import {Router} from "@angular/router"; import {config, Observable} from "rxjs"; @Component({ selector: 'app-config-page', templateUrl: './config-page.compone...
6
Adalbert047/WebSite
6c10ccb
Curso Angular/clientes-app/src/app/app.component.ts
TypeScript
www.github.com/Adalbert047/WebSite/tree/main/Curso Angular/clientes-app/src/app/app.component.ts
https://raw.githubusercontent.com/Adalbert047/WebSite/6c10ccb/Curso%20Angular/clientes-app/src/app/app.component.ts
Adalbert047/WebSite 6c10ccb Curso Angular/clientes-app/src/app/app.component.ts
true
200
768
import { Component } from '@angular/core'; import { CommonModule } from '@angular/common'; import { RouterOutlet } from '@angular/router'; import { NavComponent } from './componentes/nav/nav.component'; import { FooterComponent } from './componentes/footer/footer.component'; import { DirectivaComponent } from './direct...
0
khoramparham/online-menu
a120211
src/category/category.service.ts
TypeScript
www.github.com/khoramparham/online-menu/tree/main/src/category/category.service.ts
https://raw.githubusercontent.com/khoramparham/online-menu/a120211/src/category/category.service.ts
khoramparham/online-menu a120211 src/category/category.service.ts
true
200
2,903
import { Injectable } from '@nestjs/common'; import { PrismaService } from 'src/prisma/prisma.service'; import { categoryNotFound, duplicatedNameException } from './exception'; import { AddCategorySubsetDto, CreateCategoryDto, updateCategoryDto, } from './dto'; @Injectable() export class CategoryService { ...
2
cyf2004/counterscale
be18e7f
packages/server/app/analytics/collect.ts
TypeScript
www.github.com/cyf2004/counterscale/tree/main/packages/server/app/analytics/collect.ts
https://raw.githubusercontent.com/cyf2004/counterscale/be18e7f/packages/server/app/analytics/collect.ts
cyf2004/counterscale be18e7f packages/server/app/analytics/collect.ts
true
200
6,141
import { UAParser } from "ua-parser-js"; import type { RequestInit } from "@cloudflare/workers-types"; import { maskBrowserVersion } from "~/lib/utils"; // Cookieless visitor/session tracking // Uses the approach described here: https://notes.normally.com/cookieless-unique-visitor-counts/ function getMidnightDate():...
7
geekfade/nestjs
ad44650
nestjs-demo(config)/src/configuration.ts
TypeScript
www.github.com/geekfade/nestjs/tree/main/nestjs-demo(config)/src/configuration.ts
https://raw.githubusercontent.com/geekfade/nestjs/ad44650/nestjs-demo%28config%29/src/configuration.ts
geekfade/nestjs ad44650 nestjs-demo(config)/src/configuration.ts
true
200
664
import { readFileSync } from 'fs'; import * as yaml from 'js-yaml'; import { join } from 'path'; import * as _ from 'lodash'; const YAML_COMMON_CONFIG_FILENAME = 'config.yaml'; const filePath = join(__dirname, '../config', YAML_COMMON_CONFIG_FILENAME); const envPath = join( __dirname, '../config', `config.${pro...
3
Juancho997/Design-Patterns-in-TypeScript
e06da18
Course/Design_patterns/Creational/Object_Pool/game-characters-pool.ts
TypeScript
www.github.com/Juancho997/Design-Patterns-in-TypeScript/tree/main/Course/Design_patterns/Creational/Object_Pool/game-characters-pool.ts
https://raw.githubusercontent.com/Juancho997/Design-Patterns-in-TypeScript/e06da18/Course/Design_patterns/Creational/Object_Pool/game-characters-pool.ts
Juancho997/Design-Patterns-in-TypeScript e06da18 Course/Design_patterns/Creational/Object_Pool/game-characters-pool.ts
true
200
1,484
import { GameCharacter } from "./game-character"; import { GameCharactersFactory } from "./game-characters-factory"; export class GameCharactersPool { private _warriorsPool: GameCharacter[] = []; private _magesPool: GameCharacter[] = []; static WARRIORS_POOL_SIZE = 30; static MAGES_POOL_SIZE = 20; ...
1
VadimBakunovich/fake-store
413633a
src/components/FormItems/index.ts
TypeScript
www.github.com/VadimBakunovich/fake-store/tree/main/src/components/FormItems/index.ts
https://raw.githubusercontent.com/VadimBakunovich/fake-store/413633a/src/components/FormItems/index.ts
VadimBakunovich/fake-store 413633a src/components/FormItems/index.ts
true
200
715
import styled from 'styled-components'; export default { Title: styled.h2` margin-bottom: 20px; `, Form: styled.form` padding-bottom: 10px; margin: 0 auto; max-width: 410px; display: flex; flex-direction: column; `, PassWrapper: styled.div` position: relative; `, Input: sty...
4
victor19pa/Food_Backend
7f695d6
src/controllers/VendorController.ts
TypeScript
www.github.com/victor19pa/Food_Backend/tree/main/src/controllers/VendorController.ts
https://raw.githubusercontent.com/victor19pa/Food_Backend/7f695d6/src/controllers/VendorController.ts
victor19pa/Food_Backend 7f695d6 src/controllers/VendorController.ts
true
200
4,426
import { Request, Response, NextFunction } from "express"; import { CreateFoodInputs, EditVendorInputs, VendorLoginInputs } from "../dto"; import { FindVendor } from "./AdminController"; import { GenerateSignature, ValidatePassword } from "../utility"; import { Food } from "../models"; export const VendorLogin = async...
6
pwrdrvr/microapps-app-release
09dd7d3
packages/app/src/store/store.ts
TypeScript
www.github.com/pwrdrvr/microapps-app-release/tree/main/packages/app/src/store/store.ts
https://raw.githubusercontent.com/pwrdrvr/microapps-app-release/09dd7d3/packages/app/src/store/store.ts
pwrdrvr/microapps-app-release 09dd7d3 packages/app/src/store/store.ts
true
200
1,492
import { Action, AnyAction, configureStore, ThunkAction, ThunkDispatch } from '@reduxjs/toolkit'; import { createWrapper } from 'next-redux-wrapper'; import rootReducer from './reducer'; export type RootState = ReturnType<typeof rootReducer>; /** * @param initialState The store's initial state (on the client side, t...
5
roman-s-dev/rxjs-interactive-guide
8a9a4c4
src/app/features/operator-list/operator-list.component.ts
TypeScript
www.github.com/roman-s-dev/rxjs-interactive-guide/tree/main/src/app/features/operator-list/operator-list.component.ts
https://raw.githubusercontent.com/roman-s-dev/rxjs-interactive-guide/8a9a4c4/src/app/features/operator-list/operator-list.component.ts
roman-s-dev/rxjs-interactive-guide 8a9a4c4 src/app/features/operator-list/operator-list.component.ts
true
200
470
import { Component } from '@angular/core'; import { OperatorNavigationService } from './components/operator-navigation/services/operator-navigation.service'; @Component({ selector: 'app-operator-list', templateUrl: './operator-list.component.html', styleUrls: ['./operator-list.component.scss'], }) export class O...
0
jordanamao/solace-battleship-app
ae3579e
battleship_frontend/src/controller-app/moverate.ts
TypeScript
www.github.com/jordanamao/solace-battleship-app/tree/main/battleship_frontend/src/controller-app/moverate.ts
https://raw.githubusercontent.com/jordanamao/solace-battleship-app/ae3579e/battleship_frontend/src/controller-app/moverate.ts
jordanamao/solace-battleship-app ae3579e battleship_frontend/src/controller-app/moverate.ts
true
200
849
import { EventAggregator } from "aurelia-event-aggregator"; import { InternalMoveResult } from "../common/events"; import { inject } from "aurelia-framework"; @inject(EventAggregator) export class moverate { private moveCount1: number; private moveRate1: number; private moveCount2: number; private moveRate2: ...
2
NaamuKim/mini-tracker
8c67afa
sdk/src/core/trackers/PageTransition.ts
TypeScript
www.github.com/NaamuKim/mini-tracker/tree/main/sdk/src/core/trackers/PageTransition.ts
https://raw.githubusercontent.com/NaamuKim/mini-tracker/8c67afa/sdk/src/core/trackers/PageTransition.ts
NaamuKim/mini-tracker 8c67afa sdk/src/core/trackers/PageTransition.ts
true
200
2,761
import EventDispatcher from "@/core/EventDispatcher"; import { getQuerySelector } from "@/utils/parsers/dom"; import { EVENT_KEYS } from "@/constants/event"; import AbstractStorage from "@/core/storage"; import { STORAGE_KEYS } from "@/constants/storage"; import HistoryMethodOverride, { HISTORY_REPLACE_PRIORITY, } fr...
7
khoathuc/asset
7abf976
models/vendor/vendor.ts
TypeScript
www.github.com/khoathuc/asset/tree/main/models/vendor/vendor.ts
https://raw.githubusercontent.com/khoathuc/asset/7abf976/models/vendor/vendor.ts
khoathuc/asset 7abf976 models/vendor/vendor.ts
true
200
332
import { Loader } from "./loader"; import { Reader } from "./reader"; import { Stat } from "./stat"; export class Vendor{ public static loader(){ return Loader; } public static reader(formData: FormData){ return new Reader(formData); } public static stat(){ return new Sta...
3
truong23/food-mine
b10bbd7
backend/src/routers/food.router.ts
TypeScript
www.github.com/truong23/food-mine/tree/main/backend/src/routers/food.router.ts
https://raw.githubusercontent.com/truong23/food-mine/b10bbd7/backend/src/routers/food.router.ts
truong23/food-mine b10bbd7 backend/src/routers/food.router.ts
true
200
1,935
import { Router } from 'express' import { sample_foods } from '../data'; import asyncHandler from 'express-async-handler' import { FoodModel } from '../models/food.model'; const router = Router() router.get("/seed", asyncHandler( async(req, res) => { const foodsCount = await FoodModel.countDocuments() ...
1
hyvor/hyvor-talk-wordpress-plugin
774882c
admin/src/api.ts
TypeScript
www.github.com/hyvor/hyvor-talk-wordpress-plugin/tree/main/admin/src/api.ts
https://raw.githubusercontent.com/hyvor/hyvor-talk-wordpress-plugin/774882c/admin/src/api.ts
hyvor/hyvor-talk-wordpress-plugin 774882c admin/src/api.ts
true
200
1,003
export function callApi( method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', endpoint: string, data?: Record<string, any>, onSuccess?: (response: any) => void, onError?: (error: any) => void ) { endpoint = endpoint.replace(/^\//, ''); endpoint = '/' + endpoint; const isJson = method...
4
rim31/typescriptMERN
516610b
backend/src/models/Playlist.ts
TypeScript
www.github.com/rim31/typescriptMERN/tree/main/backend/src/models/Playlist.ts
https://raw.githubusercontent.com/rim31/typescriptMERN/516610b/backend/src/models/Playlist.ts
rim31/typescriptMERN 516610b backend/src/models/Playlist.ts
true
200
2,031
import { Schema, model, Document } from 'mongoose'; import Song, { ISong } from './Song'; // schema : mongoose.Schema({example: String}) // example : // { // "title":"Test playlist 2", // "description": "1rst description", // "songs":[ // { "id": 1, "url": "https://www.youtube.com/watch?v=YQHsXMglC9A", "solution...
6
OscarCortesMedina/solana-counter
2aae0a8
tests/solana-counter.test.ts
TypeScript
www.github.com/OscarCortesMedina/solana-counter/tree/main/tests/solana-counter.test.ts
https://raw.githubusercontent.com/OscarCortesMedina/solana-counter/2aae0a8/tests/solana-counter.test.ts
OscarCortesMedina/solana-counter 2aae0a8 tests/solana-counter.test.ts
true
200
2,058
import * as anchor from "@project-serum/anchor"; import { Program } from "@project-serum/anchor"; import { SystemProgram } from "@solana/web3.js"; import { SolanaCounter } from "../target/types/solana_counter"; import { assert } from "chai"; describe("solana-counter", () => { // Configure the client to use the local...
5
irajwani/message-service
d0d4281
src/Server/User/user.controller.ts
TypeScript
www.github.com/irajwani/message-service/tree/main/src/Server/User/user.controller.ts
https://raw.githubusercontent.com/irajwani/message-service/d0d4281/src/Server/User/user.controller.ts
irajwani/message-service d0d4281 src/Server/User/user.controller.ts
true
200
1,879
import { Body, Controller, Get, HttpStatus, Param, Patch, Req, Res, UseGuards, } from '@nestjs/common'; import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'; import { Response } from 'express'; import { UserService } from './user.service'; import { JwtAuthGuard } from '../Auth/jwt.guard'; import {...
0
ilyasselharak/consultantBooking
7e52b23
src/config/connectDB.ts
TypeScript
www.github.com/ilyasselharak/consultantBooking/tree/main/src/config/connectDB.ts
https://raw.githubusercontent.com/ilyasselharak/consultantBooking/7e52b23/src/config/connectDB.ts
ilyasselharak/consultantBooking 7e52b23 src/config/connectDB.ts
true
200
544
import mongoose from "mongoose"; import dotenv from "dotenv"; dotenv.config(); const connectDB = async () => { try { if (!process.env.MONGODB_URI) { console.log("MONGODB_URI is not defined"); throw new Error("MONGODB_URI is not defined"); } const conn = await mongoose.connect(process.env.M...
2
gleysonabreu/typeweather
ba14ce6
src/app/api/v1/weather/[url]/route.ts
TypeScript
www.github.com/gleysonabreu/typeweather/tree/main/src/app/api/v1/weather/[url]/route.ts
https://raw.githubusercontent.com/gleysonabreu/typeweather/ba14ce6/src/app/api/v1/weather/%5Burl%5D/route.ts
gleysonabreu/typeweather ba14ce6 src/app/api/v1/weather/[url]/route.ts
true
200
3,002
import { NextResponse } from 'next/server'; import weatherConditions from '../../../../../../weather_conditions.json'; type Context = { params: { url: string; }; }; export async function GET(_request: Request, context: Context) { const TOTAL_FORECAST = 6; try { const response = await fetch( `ht...
7