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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
marpavlov2/earn-playing-bot | 2e7139d | src/index.ts | TypeScript | www.github.com/marpavlov2/earn-playing-bot/tree/main/src/index.ts | https://raw.githubusercontent.com/marpavlov2/earn-playing-bot/2e7139d/src/index.ts | marpavlov2/earn-playing-bot 2e7139d src/index.ts | true | 200 | 2,861 | import * as dotenv from "dotenv";
import * as qs from "qs";
import { Telegraf } from "telegraf";
import { beginCell } from "@ton/core";
import { toNano } from "ton-core";
dotenv.config();
const bot = new Telegraf(process.env.TG_BOT_TOKEN!);
bot.start((ctx) =>
ctx.reply("Welcome to earnplaying.org app!", {
... | 1 |
DevCloudFE/react-devui | 8e64f2e | packages/ui/src/utils/position/getVerticalSidePosition.ts | TypeScript | www.github.com/DevCloudFE/react-devui/tree/main/packages/ui/src/utils/position/getVerticalSidePosition.ts | https://raw.githubusercontent.com/DevCloudFE/react-devui/8e64f2e/packages/ui/src/utils/position/getVerticalSidePosition.ts | DevCloudFE/react-devui 8e64f2e packages/ui/src/utils/position/getVerticalSidePosition.ts | true | 200 | 3,546 | import { ROOT_DATA } from '../../components/root';
type DVerticalSidePlacement = 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right';
interface DVerticalSidePosition {
top: number;
left: number;
transformOrigin: string;
arrowPosition: React.CSSProperties;
}
export function getVertica... | 0 |
frnmichel/panStar | ed59233 | vite.config.ts | TypeScript | www.github.com/frnmichel/panStar/tree/main/vite.config.ts | https://raw.githubusercontent.com/frnmichel/panStar/ed59233/vite.config.ts | frnmichel/panStar ed59233 vite.config.ts | true | 200 | 488 | import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
// import react from '@vitejs/plugin-react';
// https://vitejs.dev/config/
export default defineConfig({
assetsInclude: ['**/*.mp4', '**/*.webm'],
server: {
// origin: 'https://panasonic.myvtex.com',
hmr: true,
proxy: {... | 6 |
bitafish/bitafish | 6bd3362 | apps/server/src/app.ts | TypeScript | www.github.com/bitafish/bitafish/tree/main/apps/server/src/app.ts | https://raw.githubusercontent.com/bitafish/bitafish/6bd3362/apps/server/src/app.ts | bitafish/bitafish 6bd3362 apps/server/src/app.ts | true | 200 | 658 | import express, { Application } from 'express';
import cors from 'cors';
import helmet from 'helmet';
import cookieParser from 'cookie-parser';
import routes from './routes/index';
import { HandleErrorWithLogger } from './utils/error/handler';
class App {
public app: Application;
constructor() {
this.app = e... | 2 |
AlexDing0707/phuonganhportfolio | 7d07ee7 | src/hooks/useTypedSuperpower.ts | TypeScript | www.github.com/AlexDing0707/phuonganhportfolio/tree/main/src/hooks/useTypedSuperpower.ts | https://raw.githubusercontent.com/AlexDing0707/phuonganhportfolio/7d07ee7/src/hooks/useTypedSuperpower.ts | AlexDing0707/phuonganhportfolio 7d07ee7 src/hooks/useTypedSuperpower.ts | true | 200 | 2,450 | import { useCallback, useEffect, useState } from 'react';
export enum TypePhase {
Typing,
Pausing,
Deleting,
}
const TYPING_INTERVAL_MIN = 80;
const TYPING_INTERVAL_MAX = 150;
const TYPING_PAUSE_MS = 2000;
const DELETING_INTERVAL = 50;
const DELETING_PAUSE_MS = 500;
const getRandomTypingInterval = () =>
Math... | 3 |
eeburgosz/Next-TodosApp | 76d9f64 | nextauth.d.ts | TypeScript | www.github.com/eeburgosz/Next-TodosApp/tree/main/nextauth.d.ts | https://raw.githubusercontent.com/eeburgosz/Next-TodosApp/76d9f64/nextauth.d.ts | eeburgosz/Next-TodosApp 76d9f64 nextauth.d.ts | true | 200 | 397 | // nextauth.d.ts
import { DefaultSession, DefaultUser } from "next-auth";
interface IUser extends DefaultUser {
/**
* Roles del usuario
*/
roles?: string[];
/**
* Agregar cualquier otro campo que tu manejas
*/
}
declare module "next-auth" {
interface User extends IUser {}
interface Session {
user?: Us... | 5 |
ayusudi/yisajapan | 292e844 | src/middleware.ts | TypeScript | www.github.com/ayusudi/yisajapan/tree/main/src/middleware.ts | https://raw.githubusercontent.com/ayusudi/yisajapan/292e844/src/middleware.ts | ayusudi/yisajapan 292e844 src/middleware.ts | true | 200 | 383 | import createMiddleware from 'next-intl/middleware';
export default createMiddleware({
// A list of all locales that are supported
locales: ['en', 'id'],
localePrefix: 'always',
localeDetection: false,
// Used when no locale matches
defaultLocale: 'en'
});
export const config = {
// Match only internati... | 1 |
joaofelima96/origamid-next | 9df8355 | src/app/cursos.ts | TypeScript | www.github.com/joaofelima96/origamid-next/tree/main/src/app/cursos.ts | https://raw.githubusercontent.com/joaofelima96/origamid-next/9df8355/src/app/cursos.ts | joaofelima96/origamid-next 9df8355 src/app/cursos.ts | true | 200 | 924 | export type Curso = {
id: number;
slug: string;
nome: string;
descricao: string;
total_aulas: number;
total_horas: number;
aulas: Aula[];
error?: string;
};
export type Aula = {
id: number;
slug: string;
nome: string;
descricao: string;
curso_id: number;
tempo: number;
ordem: number;
};
... | 0 |
Dmitriii-K/3sprint-1week | 4ab1824 | src/db/mongo-db.ts | TypeScript | www.github.com/Dmitriii-K/3sprint-1week/tree/main/src/db/mongo-db.ts | https://raw.githubusercontent.com/Dmitriii-K/3sprint-1week/4ab1824/src/db/mongo-db.ts | Dmitriii-K/3sprint-1week 4ab1824 src/db/mongo-db.ts | true | 200 | 2,684 | import { SETTINGS } from "../settings";
import { PostDbType} from "../input-output-types/posts-type";
import { CommentDBType } from "../input-output-types/comments-type";
import { BlogDbType } from "../input-output-types/blogs-type";
import { UserDBModel } from "../input-output-types/users-type";
import { Collection, D... | 6 |
BFG3000/learning-system | e80b8fb | client/src/app/features/exam-definition/exam-definition-complete-form/exam-definition-complete-form.component.ts | TypeScript | www.github.com/BFG3000/learning-system/tree/main/client/src/app/features/exam-definition/exam-definition-complete-form/exam-definition-complete-form.component.ts | https://raw.githubusercontent.com/BFG3000/learning-system/e80b8fb/client/src/app/features/exam-definition/exam-definition-complete-form/exam-definition-complete-form.component.ts | BFG3000/learning-system e80b8fb client/src/app/features/exam-definition/exam-definition-complete-form/exam-definition-complete-form.component.ts | true | 200 | 5,398 | import { CommonModule } from '@angular/common';
import { Component, inject } from '@angular/core';
import { FormArray, FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatFormField, MatFormFieldModule, MatLabel } from '... | 2 |
aidenlx/alx-bio | 346d8d0 | pipeline/module/bcftools/setGT.ts | TypeScript | www.github.com/aidenlx/alx-bio/tree/main/pipeline/module/bcftools/setGT.ts | https://raw.githubusercontent.com/aidenlx/alx-bio/346d8d0/pipeline/module/bcftools/setGT.ts | aidenlx/alx-bio 346d8d0 pipeline/module/bcftools/setGT.ts | true | 200 | 1,197 | import { checkDone } from "@/utils/check-done.ts";
import { $ } from "@/deps.ts";
export { required } from "./_common.ts";
/**
* @returns When no output filename is specified, for a CRAM file aln.cram, index file aln.cram.crai will be created; for a BAM file aln.bam, either aln.bam.bai or aln.bam.csi will be created... | 3 |
AsslyEva/sistema-reportes-ingetec | 3f94188 | src/app/components/system/administrador/agregar-empleados/editar-empleado/editar-empleado.component.ts | TypeScript | www.github.com/AsslyEva/sistema-reportes-ingetec/tree/main/src/app/components/system/administrador/agregar-empleados/editar-empleado/editar-empleado.component.ts | https://raw.githubusercontent.com/AsslyEva/sistema-reportes-ingetec/3f94188/src/app/components/system/administrador/agregar-empleados/editar-empleado/editar-empleado.component.ts | AsslyEva/sistema-reportes-ingetec 3f94188 src/app/components/system/administrador/agregar-empleados/editar-empleado/editar-empleado.component.ts | true | 200 | 2,494 | import { Component, EventEmitter, Inject, Output, OnInit } from '@angular/core';
import { FormControl, FormGroup, FormBuilder, Validators } from '@angular/forms';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { DetalleCuadrillaComponent } from 'src/app/components/shared/detalle-cuadri... | 5 |
TrustedTwin/TrustedTwin-js | c55b1eb | src/models/UserDefinitionAllOf.ts | TypeScript | www.github.com/TrustedTwin/TrustedTwin-js/tree/main/src/models/UserDefinitionAllOf.ts | https://raw.githubusercontent.com/TrustedTwin/TrustedTwin-js/c55b1eb/src/models/UserDefinitionAllOf.ts | TrustedTwin/TrustedTwin-js c55b1eb src/models/UserDefinitionAllOf.ts | true | 200 | 1,925 | /* tslint:disable */
/* eslint-disable */
/**
* Trusted Twin API
* TT API Gateway.
*
* The version of the OpenAPI document: 2.13.00
* Contact: hello@trustedtwin.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the c... | 0 |
gracielacaceres/SPRINGBOOT-ANGULAR | 5549299 | PROYECTS_4SEMESTRE_MOVILS-main/src/app/app-routing.module.ts | TypeScript | www.github.com/gracielacaceres/SPRINGBOOT-ANGULAR/tree/main/PROYECTS_4SEMESTRE_MOVILS-main/src/app/app-routing.module.ts | https://raw.githubusercontent.com/gracielacaceres/SPRINGBOOT-ANGULAR/5549299/PROYECTS_4SEMESTRE_MOVILS-main/src/app/app-routing.module.ts | gracielacaceres/SPRINGBOOT-ANGULAR 5549299 PROYECTS_4SEMESTRE_MOVILS-main/src/app/app-routing.module.ts | true | 200 | 1,274 | import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { UsuariosComponent } from './usuarios/usuarios.component';
import { DashboardComponent } from './dashboard/dashboard.component';
import { LoginComponent } from './login/login.component';
import { UserDashboardCompo... | 6 |
rachidlamouri/nuxt3 | 645696f | modules/nuxt-auth/runtime/server/api/v1/auth/forgotPassword.post.ts | TypeScript | www.github.com/rachidlamouri/nuxt3/tree/main/modules/nuxt-auth/runtime/server/api/v1/auth/forgotPassword.post.ts | https://raw.githubusercontent.com/rachidlamouri/nuxt3/645696f/modules/nuxt-auth/runtime/server/api/v1/auth/forgotPassword.post.ts | rachidlamouri/nuxt3 645696f modules/nuxt-auth/runtime/server/api/v1/auth/forgotPassword.post.ts | true | 200 | 3,332 | import crypto from 'crypto'
import sendEmail from '~/utils/Email'
import { mongoClient, ObjectId } from '~/utils/mongoClient'
// import {
// findByEmail,
// checkPassword,
// getSinedJwtToken,
// setAuthCookie,
// hasPasswordChanged,
// } from '~/server/controllers/v1/auth'
import AppError from '~/utils/AppEr... | 2 |
LuisEduNasc/react-redux-toolkit | be9129c | src/app/store.ts | TypeScript | www.github.com/LuisEduNasc/react-redux-toolkit/tree/main/src/app/store.ts | https://raw.githubusercontent.com/LuisEduNasc/react-redux-toolkit/be9129c/src/app/store.ts | LuisEduNasc/react-redux-toolkit be9129c src/app/store.ts | true | 200 | 468 | import { configureStore } from '@reduxjs/toolkit';
import counterReducer from 'features/counter/counterSlice';
import postsReducer from 'features/posts/postsSlice';
import usersReducer from 'features/users/usersSlice';
export const store = configureStore({
reducer: {
counter: counterReducer,
posts: postsRedu... | 5 |
Desbiens-Mickael/food_buddy | a825711 | src/app/layouts/layout-base/layout-base.component.spec.ts | TypeScript | www.github.com/Desbiens-Mickael/food_buddy/tree/main/src/app/layouts/layout-base/layout-base.component.spec.ts | https://raw.githubusercontent.com/Desbiens-Mickael/food_buddy/a825711/src/app/layouts/layout-base/layout-base.component.spec.ts | Desbiens-Mickael/food_buddy a825711 src/app/layouts/layout-base/layout-base.component.spec.ts | true | 200 | 639 | import { ComponentFixture, TestBed } from '@angular/core/testing';
import { LayoutBaseComponent } from './layout-base.component';
describe('LayoutBaseComponent', () => {
let component: LayoutBaseComponent;
let fixture: ComponentFixture<LayoutBaseComponent>;
beforeEach(async () => {
await TestBed.c... | 1 |
topulikeweb/typescript- | dcef8df | Control.ts | TypeScript | www.github.com/topulikeweb/typescript-/tree/main/Control.ts | https://raw.githubusercontent.com/topulikeweb/typescript-/dcef8df/Control.ts | topulikeweb/typescript- dcef8df Control.ts | true | 200 | 1,785 | // 游戏控制类
import Snake from "./Snake";
import Score from "./Score";
import Food from "./Food";
class Control {
snack: Snake
score: Score
food: Food
// 储存按键的方向
direction: string = "d"
// 判断蛇的存活
isLive: boolean = true
constructor() {
this.snack = new Snake()
this.score = new Score(10, 10)
th... | 0 |
r00dan/team8 | f1ac5ba | server/src/main.ts | TypeScript | www.github.com/r00dan/team8/tree/main/server/src/main.ts | https://raw.githubusercontent.com/r00dan/team8/f1ac5ba/server/src/main.ts | r00dan/team8 f1ac5ba server/src/main.ts | true | 200 | 472 | import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
const whiteList = ['http://localhost:3000/'];
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.enableCors({
origin(origin, callback) {
if (!origin || !whiteList.includes(origin)) {
... | 6 |
ryanpatk/superlinks-frontend | a1dc6cd | src/hooks/spaces-api.ts | TypeScript | www.github.com/ryanpatk/superlinks-frontend/tree/main/src/hooks/spaces-api.ts | https://raw.githubusercontent.com/ryanpatk/superlinks-frontend/a1dc6cd/src/hooks/spaces-api.ts | ryanpatk/superlinks-frontend a1dc6cd src/hooks/spaces-api.ts | true | 200 | 2,815 | import {
useQuery,
useQueryClient,
useMutation,
type UseQueryResult,
type UseMutationResult,
} from "@tanstack/react-query";
import { v4 as uuidv4 } from "uuid";
import axiosInstance from "../axios-instance";
export interface NewSpaceData {
name: string;
}
export interface SpaceResponse {
id: number;
created... | 2 |
ibnbalagy/books-rest-api | ad615ff | libs/shared/src/interceptors/serialize.interceptor.ts | TypeScript | www.github.com/ibnbalagy/books-rest-api/tree/main/libs/shared/src/interceptors/serialize.interceptor.ts | https://raw.githubusercontent.com/ibnbalagy/books-rest-api/ad615ff/libs/shared/src/interceptors/serialize.interceptor.ts | ibnbalagy/books-rest-api ad615ff libs/shared/src/interceptors/serialize.interceptor.ts | true | 200 | 804 | import { CallHandler, ExecutionContext, NestInterceptor, UseInterceptors } from "@nestjs/common"
import { plainToInstance } from "class-transformer"
import { Observable, map } from "rxjs"
export const Serialize = (dto: DtoClass) => UseInterceptors(new SerializeInterceptor(dto))
interface DtoClass {
new(...args: ... | 1 |
Jackwew/flame-w | 712b9ac | client/src/utility/parseTheme.ts | TypeScript | www.github.com/Jackwew/flame-w/tree/main/client/src/utility/parseTheme.ts | https://raw.githubusercontent.com/Jackwew/flame-w/712b9ac/client/src/utility/parseTheme.ts | Jackwew/flame-w 712b9ac client/src/utility/parseTheme.ts | true | 200 | 629 | import { ThemeColors } from '../interfaces';
// parse theme in PAB (primary;accent;background) format to theme colors object
export const parsePABToTheme = (themeStr: string): ThemeColors => {
const [primary, accent, background, primary_rgb, accent_rgb, background_rgb] =
themeStr.split(';');
return {
prim... | 5 |
luckyalani/Shinecoder | 57ac652 | src/app/customer/customer-view/customer-headings/invoices/zip-invoices/zip-invoices.component.spec.ts | TypeScript | www.github.com/luckyalani/Shinecoder/tree/main/src/app/customer/customer-view/customer-headings/invoices/zip-invoices/zip-invoices.component.spec.ts | https://raw.githubusercontent.com/luckyalani/Shinecoder/57ac652/src/app/customer/customer-view/customer-headings/invoices/zip-invoices/zip-invoices.component.spec.ts | luckyalani/Shinecoder 57ac652 src/app/customer/customer-view/customer-headings/invoices/zip-invoices/zip-invoices.component.spec.ts | true | 200 | 595 | import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ZipInvoicesComponent } from './zip-invoices.component';
describe('ZipInvoicesComponent', () => {
let component: ZipInvoicesComponent;
let fixture: ComponentFixture<ZipInvoicesComponent>;
beforeEach(() => {
TestBed.configureTestingM... | 0 |
UmaSYadav/angtut | 72776f8 | src/app/app.component.ts | TypeScript | www.github.com/UmaSYadav/angtut/tree/main/src/app/app.component.ts | https://raw.githubusercontent.com/UmaSYadav/angtut/72776f8/src/app/app.component.ts | UmaSYadav/angtut 72776f8 src/app/app.component.ts | true | 200 | 1,852 | import { Component } from '@angular/core';
import { UserdataService } from './userdata.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'Angular tutorials';
user= "Uma Shankar Yadav";
getChannel() {
... | 6 |
cd-dongzi/funblog | 4954489 | apps/server/src/modules/shared/shared.module.ts | TypeScript | www.github.com/cd-dongzi/funblog/tree/main/apps/server/src/modules/shared/shared.module.ts | https://raw.githubusercontent.com/cd-dongzi/funblog/4954489/apps/server/src/modules/shared/shared.module.ts | cd-dongzi/funblog 4954489 apps/server/src/modules/shared/shared.module.ts | true | 200 | 516 | import { Global, MiddlewareConsumer, Module, NestModule } from '@nestjs/common';
import { LoggerMiddleware } from 'src/middlewares/logger.middleware';
import { BcryptService } from './bcrypt.service';
import { LoggerService } from './logger.service';
@Global()
@Module({
providers: [BcryptService, LoggerService],
e... | 2 |
kenLovesToCode/boilerplate-nestjs_nextjs_trpc | 78ca240 | apps/server/src/trpc/trpc.router.ts | TypeScript | www.github.com/kenLovesToCode/boilerplate-nestjs_nextjs_trpc/tree/main/apps/server/src/trpc/trpc.router.ts | https://raw.githubusercontent.com/kenLovesToCode/boilerplate-nestjs_nextjs_trpc/78ca240/apps/server/src/trpc/trpc.router.ts | kenLovesToCode/boilerplate-nestjs_nextjs_trpc 78ca240 apps/server/src/trpc/trpc.router.ts | true | 200 | 752 | import { INestApplication, Injectable } from '@nestjs/common';
import { z } from 'zod';
import * as trpcExpress from '@trpc/server/adapters/express';
import { TrpcService } from './trpc.service';
@Injectable()
export class TrpcRouter {
constructor(private readonly trpcService: TrpcService) {}
appRouter = this.trp... | 5 |
felixlopz/next-clean-arc | d4f3c95 | src/infrastructure/services/transaction-manager.service.mock.ts | TypeScript | www.github.com/felixlopz/next-clean-arc/tree/main/src/infrastructure/services/transaction-manager.service.mock.ts | https://raw.githubusercontent.com/felixlopz/next-clean-arc/d4f3c95/src/infrastructure/services/transaction-manager.service.mock.ts | felixlopz/next-clean-arc d4f3c95 src/infrastructure/services/transaction-manager.service.mock.ts | true | 200 | 409 | import { ITransactionManagerService } from '@/src/application/services/transaction-manager.service.interface';
import { ITransaction } from '@/src/entities/models/transaction.interface';
export class MockTransactionManagerService
implements ITransactionManagerService
{
public startTransaction<T>(
clb: (tx: ITr... | 1 |
popping-official/popping-fe | f779133 | public/utils/types.ts | TypeScript | www.github.com/popping-official/popping-fe/tree/main/public/utils/types.ts | https://raw.githubusercontent.com/popping-official/popping-fe/f779133/public/utils/types.ts | popping-official/popping-fe f779133 public/utils/types.ts | true | 200 | 4,688 | export type user = {
isLogin: boolean;
nickname: string;
name: string;
isMale: boolean | null;
businessInfo: {
businessNumber: string;
startDate: string;
participantName: string;
//일반 user -> 빈 객체 반환
};
phoneNumber: string;
uuid: string;
createdAt: string;
isPopper: boolean;
isSoci... | 0 |
nimaytenzin/e_cams | 03efe41 | src/app/presentations/tenant/payments/tenant-payments.component.ts | TypeScript | www.github.com/nimaytenzin/e_cams/tree/main/src/app/presentations/tenant/payments/tenant-payments.component.ts | https://raw.githubusercontent.com/nimaytenzin/e_cams/03efe41/src/app/presentations/tenant/payments/tenant-payments.component.ts | nimaytenzin/e_cams 03efe41 src/app/presentations/tenant/payments/tenant-payments.component.ts | true | 200 | 1,230 | import { Component, OnInit } from '@angular/core';
import { TenantPendingPaymentComponent } from '../dashboard/components/tenant-pending-payments/tenant-pending-payments.component';
import { TenantPaymentPaidPaymentsComponent } from './components/tenant-payment-paid-payments/tenant-payment-paid-payments.component';
imp... | 6 |
mcrachel7/MuniTickets- | 47c31b6 | src/app/modules/FAQs/components/showimage/showimage.component.ts | TypeScript | www.github.com/mcrachel7/MuniTickets-/tree/main/src/app/modules/FAQs/components/showimage/showimage.component.ts | https://raw.githubusercontent.com/mcrachel7/MuniTickets-/47c31b6/src/app/modules/FAQs/components/showimage/showimage.component.ts | mcrachel7/MuniTickets- 47c31b6 src/app/modules/FAQs/components/showimage/showimage.component.ts | true | 200 | 2,122 | import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { FAQsService } from '../../services/faqs.service';
import { LoginService } from 'src/app/modules/auth/services/login/login.service';
import { MainContentService } from 'src/app/modules/home/se... | 2 |
haqueashraful/project-management-with-nextjs | 67ffe33 | src/features/auth/api/use-logout.ts | TypeScript | www.github.com/haqueashraful/project-management-with-nextjs/tree/main/src/features/auth/api/use-logout.ts | https://raw.githubusercontent.com/haqueashraful/project-management-with-nextjs/67ffe33/src/features/auth/api/use-logout.ts | haqueashraful/project-management-with-nextjs 67ffe33 src/features/auth/api/use-logout.ts | true | 200 | 1,181 | import { toast } from "sonner";
import { useRouter } from "next/navigation";
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { InferResponseType } from "hono";
import { client } from "@/lib/rpc"
type ResponseType = InferResponseType<typeof client.api.auth.logout['$post']>
export const use... | 5 |
mansaconseils/pulseplayer | a922eab | lib/api/config.ts | TypeScript | www.github.com/mansaconseils/pulseplayer/tree/main/lib/api/config.ts | https://raw.githubusercontent.com/mansaconseils/pulseplayer/a922eab/lib/api/config.ts | mansaconseils/pulseplayer a922eab lib/api/config.ts | true | 200 | 978 | import { ApiConfig } from "./types"
export const API_CONFIGS: Record<string, ApiConfig> = {
SPORTS_DATA: {
source: "sports_data",
baseUrl: "https://api.sportsdataapi.com/v1",
apiKey: process.env.SPORTS_DATA_API_KEY || "",
enabled: true,
refreshInterval: 60000, // 1 minute
},
WEATHER: {
so... | 1 |
iZemil/luca | 187ad5c | src/utils/common.ts | TypeScript | www.github.com/iZemil/luca/tree/main/src/utils/common.ts | https://raw.githubusercontent.com/iZemil/luca/187ad5c/src/utils/common.ts | iZemil/luca 187ad5c src/utils/common.ts | true | 200 | 1,332 | import chalk from 'chalk';
import { lstatSync } from 'fs';
import { log } from './log';
export function checkPath(path: string, isDir = false): boolean {
try {
const stat = lstatSync(path);
if (isDir) {
return stat.isDirectory();
}
return stat.isFile();
} catch {
... | 6 |
MITS1327/TRANSLATOR | 9853a75 | app/api/src/pootle/pootle.controller.ts | TypeScript | www.github.com/MITS1327/TRANSLATOR/tree/main/app/api/src/pootle/pootle.controller.ts | https://raw.githubusercontent.com/MITS1327/TRANSLATOR/9853a75/app/api/src/pootle/pootle.controller.ts | MITS1327/TRANSLATOR 9853a75 app/api/src/pootle/pootle.controller.ts | true | 200 | 849 | import { Body, Controller, HttpCode, HttpStatus, Param, Put } from '@nestjs/common';
import { ApiAcceptedResponse, ApiTags } from '@nestjs/swagger';
import { UpdateDictsDTO, UpdateDictsParams } from './common/pootle.dto';
import { PootleService } from './pootle.service';
@ApiTags('pootle')
@Controller({
version: 'p... | 0 |
2018shweta/Project_Management_System_Angular | 79024a5 | src/app/product.service.ts | TypeScript | www.github.com/2018shweta/Project_Management_System_Angular/tree/main/src/app/product.service.ts | https://raw.githubusercontent.com/2018shweta/Project_Management_System_Angular/79024a5/src/app/product.service.ts | 2018shweta/Project_Management_System_Angular 79024a5 src/app/product.service.ts | true | 200 | 545 | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class ProductService {
constructor(private http:HttpClient) { }
getAllProduct():Observable<any>{
console.log("allproducts api");
... | 5 |
viaacode/hetarchief-client | 9ddabc8 | src/modules/ie-objects/components/ObjectPlaceholder/ObjectPlaceholder.types.ts | TypeScript | www.github.com/viaacode/hetarchief-client/tree/main/src/modules/ie-objects/components/ObjectPlaceholder/ObjectPlaceholder.types.ts | https://raw.githubusercontent.com/viaacode/hetarchief-client/9ddabc8/src/modules/ie-objects/components/ObjectPlaceholder/ObjectPlaceholder.types.ts | viaacode/hetarchief-client 9ddabc8 src/modules/ie-objects/components/ObjectPlaceholder/ObjectPlaceholder.types.ts | true | 200 | 427 | import type { ReactNode } from 'react';
import type { DefaultComponentProps } from '@shared/types';
export interface ObjectPlaceholderProps extends DefaultComponentProps {
children?: ReactNode;
description?: ReactNode;
reasonTitle?: string;
reasonDescription?: ReactNode;
openModalButtonLabel?: string;
closeModa... | 2 |
Adeyossy/familymedicine | 9a8c6ab | src/app/auth/login/login.component.ts | TypeScript | www.github.com/Adeyossy/familymedicine/tree/main/src/app/auth/login/login.component.ts | https://raw.githubusercontent.com/Adeyossy/familymedicine/9a8c6ab/src/app/auth/login/login.component.ts | Adeyossy/familymedicine 9a8c6ab src/app/auth/login/login.component.ts | true | 200 | 2,012 | import { Component, OnInit } from '@angular/core';
import { FirebaseOptions } from 'firebase/app';
import { Auth, AuthError, User, signInWithEmailAndPassword } from 'firebase/auth';
import { AuthService } from 'src/app/services/auth.service';
import { Notification } from 'src/app/types/handbook_types';
@Component({
... | 1 |
joaosantosmedeiros/vendas-online-backend | 95afa58 | src/cart-product/dtos/return-cart-product-dto.ts | TypeScript | www.github.com/joaosantosmedeiros/vendas-online-backend/tree/main/src/cart-product/dtos/return-cart-product-dto.ts | https://raw.githubusercontent.com/joaosantosmedeiros/vendas-online-backend/95afa58/src/cart-product/dtos/return-cart-product-dto.ts | joaosantosmedeiros/vendas-online-backend 95afa58 src/cart-product/dtos/return-cart-product-dto.ts | true | 200 | 764 | import { ReturnCartDto } from 'src/cart/dtos/return-cart-dto';
import { ReturnProductDto } from 'src/product/dto/return-product-dto';
import { CartProduct } from '../entities/cart-product-entity';
export class ReturnCartProductDto {
id: number;
amount: number;
cartId: number;
cart?: ReturnCartDto;
productId:... | 6 |
thanhgit123/OJT_BE_E-learning | ee3657e | src/modules/user_role/user_role.service.ts | TypeScript | www.github.com/thanhgit123/OJT_BE_E-learning/tree/main/src/modules/user_role/user_role.service.ts | https://raw.githubusercontent.com/thanhgit123/OJT_BE_E-learning/ee3657e/src/modules/user_role/user_role.service.ts | thanhgit123/OJT_BE_E-learning ee3657e src/modules/user_role/user_role.service.ts | true | 200 | 665 | import { Injectable } from '@nestjs/common';
import { CreateUserRoleDto } from './dto/create-user_role.dto';
import { UpdateUserRoleDto } from './dto/update-user_role.dto';
@Injectable()
export class UserRoleService {
create(createUserRoleDto: CreateUserRoleDto) {
return 'This action adds a new userRole';
}
... | 0 |
NooranTarek/TaskManagement_Angular | 2fcf7d2 | src/app/app.component.ts | TypeScript | www.github.com/NooranTarek/TaskManagement_Angular/tree/main/src/app/app.component.ts | https://raw.githubusercontent.com/NooranTarek/TaskManagement_Angular/2fcf7d2/src/app/app.component.ts | NooranTarek/TaskManagement_Angular 2fcf7d2 src/app/app.component.ts | true | 200 | 489 | import { Component, OnInit } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { AuthService } from './services/auth.service';
@Component({
selector: 'app-root',
imports: [RouterOutlet],
templateUrl: './app.component.html',
styleUrl: './app.component.css'
})
export class AppComponent... | 5 |
Ramaera/rcgs_backend | f5ce1a7 | src/products/products.resolver.ts | TypeScript | www.github.com/Ramaera/rcgs_backend/tree/main/src/products/products.resolver.ts | https://raw.githubusercontent.com/Ramaera/rcgs_backend/f5ce1a7/src/products/products.resolver.ts | Ramaera/rcgs_backend f5ce1a7 src/products/products.resolver.ts | true | 200 | 1,859 | import { Resolver, Mutation, Query, Args, Context } from '@nestjs/graphql';
import { BatchEntity } from 'src/batch/entities/batch.entity';
import { GetRewardsearchInput } from './dto/Reward-code.input';
import { CreateProductInput } from './dto/create-product.input';
import { Product } from './entities/product.entity';... | 6 |
chdelucia/splitexpenses | dc81bc6 | src/app/expenses/shared/expenses.service.spec.ts | TypeScript | www.github.com/chdelucia/splitexpenses/tree/main/src/app/expenses/shared/expenses.service.spec.ts | https://raw.githubusercontent.com/chdelucia/splitexpenses/dc81bc6/src/app/expenses/shared/expenses.service.spec.ts | chdelucia/splitexpenses dc81bc6 src/app/expenses/shared/expenses.service.spec.ts | true | 200 | 6,524 | import { TestBed, tick } from '@angular/core/testing';
import { Store, StoreModule } from '@ngrx/store';
import { firstValueFrom, from, fromEvent, Observable, of } from 'rxjs';
import { ExpensesService } from './expenses.service';
import {
addExpense,
addExpenses,
removeExpense,
updateExpense,
} from '@state/ex... | 2 |
bitbybit-dev/bitbybit | 5a95284 | packages/dev/jscad/lib/api/services/jscad-extrusions.ts | TypeScript | www.github.com/bitbybit-dev/bitbybit/tree/main/packages/dev/jscad/lib/api/services/jscad-extrusions.ts | https://raw.githubusercontent.com/bitbybit-dev/bitbybit/5a95284/packages/dev/jscad/lib/api/services/jscad-extrusions.ts | bitbybit-dev/bitbybit 5a95284 packages/dev/jscad/lib/api/services/jscad-extrusions.ts | true | 200 | 2,569 | import { GeometryHelper } from "@bitbybit-dev/base";
import * as Inputs from "../inputs/jscad-inputs";
import { MathBitByBit } from "@bitbybit-dev/base";
import * as JSCAD from "@jscad/modeling";
/**
* Contains various functions for Solid extrusions from JSCAD library https://github.com/jscad/OpenJSCAD.org
* Thanks ... | 1 |
olika-ashley/kalo.org | f5f136a | kalo.org/src/app/api/create_bet/route.ts | TypeScript | www.github.com/olika-ashley/kalo.org/tree/main/kalo.org/src/app/api/create_bet/route.ts | https://raw.githubusercontent.com/olika-ashley/kalo.org/f5f136a/kalo.org/src/app/api/create_bet/route.ts | olika-ashley/kalo.org f5f136a kalo.org/src/app/api/create_bet/route.ts | true | 200 | 2,185 | import { db } from "@/utils/database";
import { NextResponse } from "next/server";
export async function POST(request: Request) {
try {
const data = await request.json()
console.log("bet data: ", data)
const user = await db.user.findFirst({
where: {
email: dat... | 0 |
SanazSyavashi/simple-library | 0282474 | components/Inputs/types/inputs.ts | TypeScript | www.github.com/SanazSyavashi/simple-library/tree/main/components/Inputs/types/inputs.ts | https://raw.githubusercontent.com/SanazSyavashi/simple-library/0282474/components/Inputs/types/inputs.ts | SanazSyavashi/simple-library 0282474 components/Inputs/types/inputs.ts | true | 200 | 2,053 | //NODE-MODULES
import React from 'react';
import { FieldError } from 'react-hook-form';
//---------------------------------------------------------------------------------
export type TDateRangePicker = {
from: string | null;
to: string | null;
} | null;
//----------------------------------------------------------... | 7 |
MarcPIster/League-Manager | 1e8cfea | Backend/src/middleware/authMiddleware.ts | TypeScript | www.github.com/MarcPIster/League-Manager/tree/main/Backend/src/middleware/authMiddleware.ts | https://raw.githubusercontent.com/MarcPIster/League-Manager/1e8cfea/Backend/src/middleware/authMiddleware.ts | MarcPIster/League-Manager 1e8cfea Backend/src/middleware/authMiddleware.ts | true | 200 | 3,135 | import { Request, Response, NextFunction } from 'express';
import jwt from 'jsonwebtoken';
import dotenv from 'dotenv';
dotenv.config();
const JWT_SECRET = process.env.JWT_SECRET || '';
// Extend Express Request interface to include user property
declare global {
namespace Express {
interface Request {
us... | 4 |
AdhamIbrahim0/WaddabhaAdmin | 882e879 | src/app/views/services/service-details/service-details.component.ts | TypeScript | www.github.com/AdhamIbrahim0/WaddabhaAdmin/tree/main/src/app/views/services/service-details/service-details.component.ts | https://raw.githubusercontent.com/AdhamIbrahim0/WaddabhaAdmin/882e879/src/app/views/services/service-details/service-details.component.ts | AdhamIbrahim0/WaddabhaAdmin 882e879 src/app/views/services/service-details/service-details.component.ts | true | 200 | 2,332 | import { Component, OnInit } from '@angular/core';
import { Service } from '../models/service';
import { ServicesService } from '../services-service/services.service';
import { ActivatedRoute, Router } from '@angular/router';
import { ButtonModule, CardModule } from '@coreui/angular';
import Swal from 'sweetalert2';
@... | 6 |
drali139/project | a0ada86 | src/app/figmap4/figmap4.page.spec.ts | TypeScript | www.github.com/drali139/project/tree/main/src/app/figmap4/figmap4.page.spec.ts | https://raw.githubusercontent.com/drali139/project/a0ada86/src/app/figmap4/figmap4.page.spec.ts | drali139/project a0ada86 src/app/figmap4/figmap4.page.spec.ts | true | 200 | 451 | import { ComponentFixture, TestBed } from '@angular/core/testing';
import { Figmap4Page } from './figmap4.page';
describe('Figmap4Page', () => {
let component: Figmap4Page;
let fixture: ComponentFixture<Figmap4Page>;
beforeEach(() => {
fixture = TestBed.createComponent(Figmap4Page);
component = fixture.... | 1 |
stahlgazer/TS-JS-DSA | b91da37 | linear_search.ts | TypeScript | www.github.com/stahlgazer/TS-JS-DSA/tree/main/linear_search.ts | https://raw.githubusercontent.com/stahlgazer/TS-JS-DSA/b91da37/linear_search.ts | stahlgazer/TS-JS-DSA b91da37 linear_search.ts | true | 200 | 738 | // find the needle in the haystack
function linear_search(haystack: number[], needle: number): boolean {
for (let i = 0; i < haystack.length; i++) {
if (haystack[i] === needle) {
return true; // Return true if the target element is found
}
}
return false; // Return false to indicate that the target ... | 5 |
espadondutravail/greajs | 7d64ced | src/dom_components/view/ComponentView.ts | TypeScript | www.github.com/espadondutravail/greajs/tree/main/src/dom_components/view/ComponentView.ts | https://raw.githubusercontent.com/espadondutravail/greajs/7d64ced/src/dom_components/view/ComponentView.ts | espadondutravail/greajs 7d64ced src/dom_components/view/ComponentView.ts | true | 200 | 15,615 | import { each, isBoolean, isEmpty, keys, result } from 'underscore';
import { CanvasSpotBuiltInTypes } from '../../canvas/model/CanvasSpot';
import FrameView from '../../canvas/view/FrameView';
import { DisableOptions, ExtractMethods, ObjectAny, View } from '../../common';
import { GetSetRuleOptions } from '../../css_c... | 2 |
Golo300/Kantinerado | d432b36 | angular-frontend/src/app/services/mealplan.service.spec.ts | TypeScript | www.github.com/Golo300/Kantinerado/tree/main/angular-frontend/src/app/services/mealplan.service.spec.ts | https://raw.githubusercontent.com/Golo300/Kantinerado/d432b36/angular-frontend/src/app/services/mealplan.service.spec.ts | Golo300/Kantinerado d432b36 angular-frontend/src/app/services/mealplan.service.spec.ts | true | 200 | 376 | import { TestBed } from '@angular/core/testing';
import { MealserviceService } from './mealplan.service';
describe('MealplanService', () => {
let service: MealserviceService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(MealserviceService);
});
it('should be create... | 0 |
Rubencito2002/portafolio-web | d81464e | src/app/app.component.ts | TypeScript | www.github.com/Rubencito2002/portafolio-web/tree/main/src/app/app.component.ts | https://raw.githubusercontent.com/Rubencito2002/portafolio-web/d81464e/src/app/app.component.ts | Rubencito2002/portafolio-web d81464e src/app/app.component.ts | true | 200 | 449 | import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { HomeComponent } from './home/home.component'; // Asegúrate de la ruta correcta
@Component({
selector: 'app-root',
standalone: true,
imports: [RouterOutlet, HomeComponent], // Agrega HomeComponent aquí
template... | 7 |
ercleh/trilis-api | 9e9dfd5 | src/reference/service/packageType.service.ts | TypeScript | www.github.com/ercleh/trilis-api/tree/main/src/reference/service/packageType.service.ts | https://raw.githubusercontent.com/ercleh/trilis-api/9e9dfd5/src/reference/service/packageType.service.ts | ercleh/trilis-api 9e9dfd5 src/reference/service/packageType.service.ts | true | 200 | 1,218 | /* eslint-disable prettier/prettier */
import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { getConnection, Repository} from 'typeorm';
import { PackageTypeCreateDto } from '../dto/packageType-create.dto';
import { PackageTypeDto } from '../dto/packageType.dto';
impor... | 5 |
rosmarinus-project/rosmarinus-universal | 9bc9e7b | packages/pack/import-map-generator/src/index.ts | TypeScript | www.github.com/rosmarinus-project/rosmarinus-universal/tree/main/packages/pack/import-map-generator/src/index.ts | https://raw.githubusercontent.com/rosmarinus-project/rosmarinus-universal/9bc9e7b/packages/pack/import-map-generator/src/index.ts | rosmarinus-project/rosmarinus-universal 9bc9e7b packages/pack/import-map-generator/src/index.ts | true | 200 | 5,594 | import { resolve, relative } from 'path';
import { esCompiler, pathUtils } from '@rosmarinus/compiler-kit';
import { readFile, existsSync, writeJSON, ensureFile } from 'fs-extra';
import type { Context, ExportItem } from './types';
export async function genExportMap(ctx: Context) {
const entryFileList = ctx.input;
... | 1 |
DepasqualeAndrea/Repositoryepicode | 2a7103b | Progetti Epicode/Angular/Esercizio-2/src/app/app.module.ts | TypeScript | www.github.com/DepasqualeAndrea/Repositoryepicode/tree/main/Progetti Epicode/Angular/Esercizio-2/src/app/app.module.ts | https://raw.githubusercontent.com/DepasqualeAndrea/Repositoryepicode/2a7103b/Progetti%20Epicode/Angular/Esercizio-2/src/app/app.module.ts | DepasqualeAndrea/Repositoryepicode 2a7103b Progetti Epicode/Angular/Esercizio-2/src/app/app.module.ts | true | 200 | 1,257 | import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { Route, RouterModule } from '@angular/router';
import { AppComponent } from './app.component';
import { HeaderComponent } from './components/header/header.component';
import { PostAttiviComponent } from './compo... | 2 |
rodriada000/Pantry-Planner | 4276072 | pantry-client/src/app/shared/services/layout-service.service.ts | TypeScript | www.github.com/rodriada000/Pantry-Planner/tree/main/pantry-client/src/app/shared/services/layout-service.service.ts | https://raw.githubusercontent.com/rodriada000/Pantry-Planner/4276072/pantry-client/src/app/shared/services/layout-service.service.ts | rodriada000/Pantry-Planner 4276072 pantry-client/src/app/shared/services/layout-service.service.ts | true | 200 | 665 | import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class LayoutService {
constructor() { }
public get height() {
return window.innerHeight;
}
public get width() {
return window.innerWidth;
}
public get isMobileScreen() {
return this.width <= 720;
}
... | 6 |
Carmel-Amarilio/Spotyfly-frontend | b41ef57 | src/store/store.ts | TypeScript | www.github.com/Carmel-Amarilio/Spotyfly-frontend/tree/main/src/store/store.ts | https://raw.githubusercontent.com/Carmel-Amarilio/Spotyfly-frontend/b41ef57/src/store/store.ts | Carmel-Amarilio/Spotyfly-frontend b41ef57 src/store/store.ts | true | 200 | 269 | import { createStore } from 'vuex';
import contact from './modules/contact.js'
import user from './modules/user.js'
const options = {
strict: true,
modules: {
// contact,
// user
}
}
const store = createStore(options)
export default store | 0 |
YahiaMohamad99/Routing | 3d5f6cc | src/app/app-routing.module.ts | TypeScript | www.github.com/YahiaMohamad99/Routing/tree/main/src/app/app-routing.module.ts | https://raw.githubusercontent.com/YahiaMohamad99/Routing/3d5f6cc/src/app/app-routing.module.ts | YahiaMohamad99/Routing 3d5f6cc src/app/app-routing.module.ts | true | 200 | 846 | import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HomeComponent } from './home/home.component';
import { ContactComponent } from './contact/contact.component';
import { PortofolioComponent } from './portofolio/portofolio.component';
import { AboutComponent } from... | 4 |
solankeejalin24/senior_design | 1961267 | CleverCollab/src/app/api/refine-task/route.ts | TypeScript | www.github.com/solankeejalin24/senior_design/tree/main/CleverCollab/src/app/api/refine-task/route.ts | https://raw.githubusercontent.com/solankeejalin24/senior_design/1961267/CleverCollab/src/app/api/refine-task/route.ts | solankeejalin24/senior_design 1961267 CleverCollab/src/app/api/refine-task/route.ts | true | 200 | 6,573 | import { NextRequest, NextResponse } from "next/server";
import OpenAI from "openai";
import { serverEnv } from "@/lib/env";
// Initialize OpenAI client
const openaiClient = new OpenAI({
apiKey: serverEnv.OPENAI_API_KEY || process.env.OPENAI_API_KEY,
});
export async function POST(req: NextRequest) {
try {
co... | 7 |
kevorik/ProductsAngular | 33fe5df | src/app/services/modal.service.ts | TypeScript | www.github.com/kevorik/ProductsAngular/tree/main/src/app/services/modal.service.ts | https://raw.githubusercontent.com/kevorik/ProductsAngular/33fe5df/src/app/services/modal.service.ts | kevorik/ProductsAngular 33fe5df src/app/services/modal.service.ts | true | 200 | 297 | import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class ModalService {
isVisible$ = new BehaviorSubject<boolean>(false)
open() {
this.isVisible$.next(true)
}
close() {
this.isVisible$.next(false)
}
}
| 5 |
gabaws/hero | c847b96 | src/repositories/EventRepository.ts | TypeScript | www.github.com/gabaws/hero/tree/main/src/repositories/EventRepository.ts | https://raw.githubusercontent.com/gabaws/hero/c847b96/src/repositories/EventRepository.ts | gabaws/hero c847b96 src/repositories/EventRepository.ts | true | 200 | 599 | import { Event } from "../entities/Events";
import { Location } from "../entities/Location";
import { User } from "../entities/User";
interface EventRepository {
add(event: Event): Promise<Event>;
findByLocationAndDate(
location: Location,
date: Date
): Promise<Event | undefined>;
findEventsByCity(city... | 4 |
bohdan-ryzhko/addax | 5c2f18c | frontend/src/redux/calendar/slice.ts | TypeScript | www.github.com/bohdan-ryzhko/addax/tree/main/frontend/src/redux/calendar/slice.ts | https://raw.githubusercontent.com/bohdan-ryzhko/addax/5c2f18c/frontend/src/redux/calendar/slice.ts | bohdan-ryzhko/addax 5c2f18c frontend/src/redux/calendar/slice.ts | true | 200 | 651 | import { createSlice, PayloadAction } from '@reduxjs/toolkit';
import { CalendarState } from '../../interfaces';
const initialState: CalendarState = {
selectedDay: null,
currentMonth: new Date(),
};
const calendarSlice = createSlice({
name: 'calendar',
initialState,
reducers: {
setSelectedDay(state, act... | 2 |
WhyNeet/dynamic-programming | 71ced88 | count-construct/index.ts | TypeScript | www.github.com/WhyNeet/dynamic-programming/tree/main/count-construct/index.ts | https://raw.githubusercontent.com/WhyNeet/dynamic-programming/71ced88/count-construct/index.ts | WhyNeet/dynamic-programming 71ced88 count-construct/index.ts | true | 200 | 510 | const target = "abcdef";
const wordBank = ["ab", "abc", "cd", "def", "abcd"];
/*
m = target.length
n = wordBank.length
O(n ^ m * m) time
O(m * m) space
*/
const countConstruct = (target: string, wordBank: string[]) => {
if (!target.length) return 1;
let ways = 0;
for (const word of wordBank) {
if (!tar... | 0 |
witchcraftjs/expressit | 227ffc5 | src/ast/handlers.ts | TypeScript | www.github.com/witchcraftjs/expressit/tree/main/src/ast/handlers.ts | https://raw.githubusercontent.com/witchcraftjs/expressit/227ffc5/src/ast/handlers.ts | witchcraftjs/expressit 227ffc5 src/ast/handlers.ts | true | 200 | 6,964 | /* eslint-disable @typescript-eslint/no-shadow */
import { createArrayNode } from "./createArrayNode.js"
import { createConditionNode } from "./createConditionNode.js"
import { createExpressionNode } from "./createExpressionNode.js"
import { createGroupNode } from "./createGroupNode.js"
import { createToken } from "./... | 6 |
CaioVinicius7/party-app | 3b3938f | src/modules/users/useCases/updateUserAvatar/UpdateUserAvatarUseCase.spec.ts | TypeScript | www.github.com/CaioVinicius7/party-app/tree/main/src/modules/users/useCases/updateUserAvatar/UpdateUserAvatarUseCase.spec.ts | https://raw.githubusercontent.com/CaioVinicius7/party-app/3b3938f/src/modules/users/useCases/updateUserAvatar/UpdateUserAvatarUseCase.spec.ts | CaioVinicius7/party-app 3b3938f src/modules/users/useCases/updateUserAvatar/UpdateUserAvatarUseCase.spec.ts | true | 200 | 3,319 | import { UsersRepository } from "@modules/users/infra/prisma/repositories/UsersRepository";
import { S3StorageProvider } from "@shared/container/providers/storageProvider/implementations/S3StorageProvider";
import { AppError } from "@shared/errors/AppError";
import { UpdateUserAvatarUseCase } from "./UpdateUserAvatarUs... | 3 |
jezes70/MovieApp | e9df031 | src/routes/page.ts | TypeScript | www.github.com/jezes70/MovieApp/tree/main/src/routes/page.ts | https://raw.githubusercontent.com/jezes70/MovieApp/e9df031/src/routes/page.ts | jezes70/MovieApp e9df031 src/routes/page.ts | true | 200 | 3,794 | import express, { NextFunction, Response, Request } from "express";
import { auth } from "../middleware/authorization";
import { MovieModel } from "../model/moviesModel";
import { UserModel } from "../model/userModel";
import { addMovieSchema, editMovieSchema, variables } from "../utils/utils";
import { v4 as uuidv4 } ... | 7 |
jdegand/rithm-express-intro-exercises | fa2383b | src/middleware/errorHandler.ts | TypeScript | www.github.com/jdegand/rithm-express-intro-exercises/tree/main/src/middleware/errorHandler.ts | https://raw.githubusercontent.com/jdegand/rithm-express-intro-exercises/fa2383b/src/middleware/errorHandler.ts | jdegand/rithm-express-intro-exercises fa2383b src/middleware/errorHandler.ts | true | 200 | 339 | import { NextFunction, Request, Response } from "express";
import { StatusError } from "../interfaces/statusError";
export function errorHandler(
error: StatusError,
req: Request,
res: Response,
next: NextFunction
) {
res
.status(error.status || 500)
.json({ status: error.status, message: error.messa... | 5 |
Chivan9406/node-webrest-server | 0193584 | src/domain/entities/todo.entity.ts | TypeScript | www.github.com/Chivan9406/node-webrest-server/tree/main/src/domain/entities/todo.entity.ts | https://raw.githubusercontent.com/Chivan9406/node-webrest-server/0193584/src/domain/entities/todo.entity.ts | Chivan9406/node-webrest-server 0193584 src/domain/entities/todo.entity.ts | true | 200 | 746 | export class TodoEntity {
constructor(
public id: number,
public text: string,
public completedAt?: Date | null,
) {
}
get isCompleted() {
return !!this.completedAt
}
public static fromObject(object: { [key: string]: any }) {
const {id, text... | 1 |
YiShanLee/webApplicationAndFramework | 3d6fb7d | TL3/src/app/shared/in-memory-data.service.ts | TypeScript | www.github.com/YiShanLee/webApplicationAndFramework/tree/main/TL3/src/app/shared/in-memory-data.service.ts | https://raw.githubusercontent.com/YiShanLee/webApplicationAndFramework/3d6fb7d/TL3/src/app/shared/in-memory-data.service.ts | YiShanLee/webApplicationAndFramework 3d6fb7d TL3/src/app/shared/in-memory-data.service.ts | true | 200 | 378 | import { Injectable } from '@angular/core';
import { InMemoryDbService } from 'angular-in-memory-web-api';
import { chapter, Terminology } from './terminology';
@Injectable({
providedIn: 'root'
})
export class InMemoryDataService implements InMemoryDbService {
createDb() {
const terminologies: Terminology[] = ... | 0 |
ValentinaPoblete/ProgramacionHibrida_EvU2 | 87aed92 | app-citas/src/app/servicios/manejo-citas.service.spec.ts | TypeScript | www.github.com/ValentinaPoblete/ProgramacionHibrida_EvU2/tree/main/app-citas/src/app/servicios/manejo-citas.service.spec.ts | https://raw.githubusercontent.com/ValentinaPoblete/ProgramacionHibrida_EvU2/87aed92/app-citas/src/app/servicios/manejo-citas.service.spec.ts | ValentinaPoblete/ProgramacionHibrida_EvU2 87aed92 app-citas/src/app/servicios/manejo-citas.service.spec.ts | true | 200 | 383 | import { TestBed } from '@angular/core/testing';
import { ManejoCitasService } from './manejo-citas.service';
describe('ManejoCitasService', () => {
let service: ManejoCitasService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(ManejoCitasService);
});
it('should be... | 3 |
VaraDeejay/MedicalConnect | a564991 | src/app/app-routing.module.ts | TypeScript | www.github.com/VaraDeejay/MedicalConnect/tree/main/src/app/app-routing.module.ts | https://raw.githubusercontent.com/VaraDeejay/MedicalConnect/a564991/src/app/app-routing.module.ts | VaraDeejay/MedicalConnect a564991 src/app/app-routing.module.ts | true | 200 | 1,650 | import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
const routes: Routes = [
{
path: 'home',
loadChildren: () => import('./home/home.module').then( m => m.HomePageModule)
},
{
path: '',
redirectTo: 'home',
pathMatch: 'full'
},... | 6 |
paanjoe/nukleus-backend | 243ada1 | src/services/entityuser.service.ts | TypeScript | www.github.com/paanjoe/nukleus-backend/tree/main/src/services/entityuser.service.ts | https://raw.githubusercontent.com/paanjoe/nukleus-backend/243ada1/src/services/entityuser.service.ts | paanjoe/nukleus-backend 243ada1 src/services/entityuser.service.ts | true | 200 | 1,331 | import { entity_user_entitytype_enum } from "@prisma/client";
import { _context } from "../utils/db.server";
function mapStringToEnum(value: string): entity_user_entitytype_enum {
switch (value) {
case "1":
return entity_user_entitytype_enum.Customer;
case "2":
return entity_user_entitytype_enum.... | 2 |
grantdever/CSV-crud-app | e90543c | frontend/src/app/upload-group/upload-group.service.ts | TypeScript | www.github.com/grantdever/CSV-crud-app/tree/main/frontend/src/app/upload-group/upload-group.service.ts | https://raw.githubusercontent.com/grantdever/CSV-crud-app/e90543c/frontend/src/app/upload-group/upload-group.service.ts | grantdever/CSV-crud-app e90543c frontend/src/app/upload-group/upload-group.service.ts | true | 200 | 557 | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class UploadGroupService {
//needs to match your post end point
postEndpoint = 'http://localhost:3000/group/create';
constructor(private httpClient: HttpClient) { }
... | 5 |
GabrielBursi/ecommerce | 4c09cf5 | backend/src/controllers/products/AddProducts.ts | TypeScript | www.github.com/GabrielBursi/ecommerce/tree/main/backend/src/controllers/products/AddProducts.ts | https://raw.githubusercontent.com/GabrielBursi/ecommerce/4c09cf5/backend/src/controllers/products/AddProducts.ts | GabrielBursi/ecommerce 4c09cf5 backend/src/controllers/products/AddProducts.ts | true | 200 | 1,652 | import { Locals, Request, Response } from "express";
import { StatusCodes } from "http-status-codes";
import * as yup from 'yup'
import { IProducts, Category } from "../../types";
import { ProductsProviders } from "../../database/providers";
import '../../shared/services/TraducoesYup'
import { validation } from "../..... | 1 |
RaziBN/AI-Resume-Builder | f897470 | src/lib/utils.ts | TypeScript | www.github.com/RaziBN/AI-Resume-Builder/tree/main/src/lib/utils.ts | https://raw.githubusercontent.com/RaziBN/AI-Resume-Builder/f897470/src/lib/utils.ts | RaziBN/AI-Resume-Builder f897470 src/lib/utils.ts | true | 200 | 590 | import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
export const formatDateToMonthYear = (date: Date): string => {
date = new Date(date);
const monthNames = [
"January",
"February",
"Marc... | 0 |
Kenzie-Academy-Brasil-Developers/react-entrega-template-hamburgueria-da-kenzie-2-jorge-rodrigo | e633d9a | src/components/Button/style.ts | TypeScript | www.github.com/Kenzie-Academy-Brasil-Developers/react-entrega-template-hamburgueria-da-kenzie-2-jorge-rodrigo/tree/main/src/components/Button/style.ts | https://raw.githubusercontent.com/Kenzie-Academy-Brasil-Developers/react-entrega-template-hamburgueria-da-kenzie-2-jorge-rodrigo/e633d9a/src/components/Button/style.ts | Kenzie-Academy-Brasil-Developers/react-entrega-template-hamburgueria-da-kenzie-2-jorge-rodrigo e633d9a src/components/Button/style.ts | true | 200 | 945 | import styled, { css } from "styled-components";
interface iButtonStyledProps{
colorBg: string
}
export const ButtonStyled = styled.button<iButtonStyledProps>`
margin: 10px auto;
width: 100%;
height: 50px;
border-radius: 8px;
font-size: 14px;
text-align: center;
${({colorBg}) => {
swit... | 3 |
carinabs8/react-bairesdev-class | 7d7371f | src/redux/reducers/newYorkReducer.ts | TypeScript | www.github.com/carinabs8/react-bairesdev-class/tree/main/src/redux/reducers/newYorkReducer.ts | https://raw.githubusercontent.com/carinabs8/react-bairesdev-class/7d7371f/src/redux/reducers/newYorkReducer.ts | carinabs8/react-bairesdev-class 7d7371f src/redux/reducers/newYorkReducer.ts | true | 200 | 521 | 'use-client';
import { createSlice } from '@reduxjs/toolkit';
import { StoryType } from '../../Types';
const initialState : StoryType = {
section: '',
title: '',
abstract: '',
des_facet: [],
multimedia: []
};
export const newYorkSlice = createSlice({
name: 'newYorkStory',
initialState,
reducers: {
... | 7 |
diegosilva-plank/SnapCat-Backend | b115536 | src/database/repositories/implementations/PostRepository/tests.ts | TypeScript | www.github.com/diegosilva-plank/SnapCat-Backend/tree/main/src/database/repositories/implementations/PostRepository/tests.ts | https://raw.githubusercontent.com/diegosilva-plank/SnapCat-Backend/b115536/src/database/repositories/implementations/PostRepository/tests.ts | diegosilva-plank/SnapCat-Backend b115536 src/database/repositories/implementations/PostRepository/tests.ts | true | 200 | 4,322 | import { v4 } from 'uuid'
import { Test } from '../../../../abstractions/Test/Test'
import { repositories } from '../..'
import { IPost } from '../../../../interfaces/IPost'
import { Describe } from '../../../../abstractions/Test/Describe'
const generatePost = (args?: { withTextContent?: boolean }) => {
const id =... | 4 |
JayPatel3009/JobApplicationTracker | c350158 | ClientApp/src/app/job-applications/job-application-form/job-application-form.component.ts | TypeScript | www.github.com/JayPatel3009/JobApplicationTracker/tree/main/ClientApp/src/app/job-applications/job-application-form/job-application-form.component.ts | https://raw.githubusercontent.com/JayPatel3009/JobApplicationTracker/c350158/ClientApp/src/app/job-applications/job-application-form/job-application-form.component.ts | JayPatel3009/JobApplicationTracker c350158 ClientApp/src/app/job-applications/job-application-form/job-application-form.component.ts | true | 200 | 2,724 | import { Component, Inject, OnInit } from '@angular/core';
import { JobApplicationService } from '../../shared/job-application.service';
import { NgForm } from '@angular/forms';
import { take } from 'rxjs';
import { ToastrService } from 'ngx-toastr';
import { JobApplicationStatus } from '../../shared/enums';
import { M... | 3 |
faelneves/unit-test-gpt | 730ad4f | projects/lodash/pad.test.ts | TypeScript | www.github.com/faelneves/unit-test-gpt/tree/main/projects/lodash/pad.test.ts | https://raw.githubusercontent.com/faelneves/unit-test-gpt/730ad4f/projects/lodash/pad.test.ts | faelneves/unit-test-gpt 730ad4f projects/lodash/pad.test.ts | true | 200 | 671 | import pad from './pad';
describe('pad', () => {
it('should pad the string with spaces on both sides', () => {
expect(pad('abc', 5)).toEqual(' abc ');
});
it('should pad the string with custom characters on both sides', () => {
expect(pad('abc', 8, '_-')).toEqual('_-abc_-_');
});
it('should return ... | 0 |
matheustrres/nlw-expert-node | 5d742f2 | src/http/routes/vote-on-poll.route.ts | TypeScript | www.github.com/matheustrres/nlw-expert-node/tree/main/src/http/routes/vote-on-poll.route.ts | https://raw.githubusercontent.com/matheustrres/nlw-expert-node/5d742f2/src/http/routes/vote-on-poll.route.ts | matheustrres/nlw-expert-node 5d742f2 src/http/routes/vote-on-poll.route.ts | true | 200 | 2,045 | import { randomUUID } from 'node:crypto';
import { votingPubSub } from '@/utils/voting-pub-sub';
import { type FastifyInstance } from 'fastify';
import { z } from 'zod';
import { prismaClient } from '@/lib/prisma';
import { redisClient } from '@/lib/redis';
export async function voteOnPollRoute(app: FastifyInstance)... | 5 |
Gerstep/gigabrain | 45b5068 | src/services/agent-service.ts | TypeScript | www.github.com/Gerstep/gigabrain/tree/main/src/services/agent-service.ts | https://raw.githubusercontent.com/Gerstep/gigabrain/45b5068/src/services/agent-service.ts | Gerstep/gigabrain 45b5068 src/services/agent-service.ts | true | 200 | 2,609 | /* eslint-disable no-console */
import {
createModel,
extractArray,
startAnswerAgent,
startExplainAgent,
startGoalAgent,
startQuizAgent,
startVerifyAgent,
} from "../utils/chain";
export async function startAgent(subject: string, topic: string) {
const completion = await startGoalAgent(createModel(), s... | 1 |
piotrsioch/smart-home.backend | 7ea741f | apps/sensors/src/app/application/sensors/light/queries/get-light-state/get-light-state.query.spec.ts | TypeScript | www.github.com/piotrsioch/smart-home.backend/tree/main/apps/sensors/src/app/application/sensors/light/queries/get-light-state/get-light-state.query.spec.ts | https://raw.githubusercontent.com/piotrsioch/smart-home.backend/7ea741f/apps/sensors/src/app/application/sensors/light/queries/get-light-state/get-light-state.query.spec.ts | piotrsioch/smart-home.backend 7ea741f apps/sensors/src/app/application/sensors/light/queries/get-light-state/get-light-state.query.spec.ts | true | 200 | 2,510 | import { ContextIdFactory } from '@nestjs/core';
import { Test, TestingModule } from '@nestjs/testing';
import { CqrsModule } from '@nestjs/cqrs';
import { RpcException } from '@nestjs/microservices';
import { v4 } from 'uuid';
import { ILightRepository, ISensorRepository } from '../../../contracts';
import { Persisten... | 4 |
AbiNJameS04/Angular_Codes | 8df1a14 | apiangularconnect/src/app/customer-product/customer-product.component.ts | TypeScript | www.github.com/AbiNJameS04/Angular_Codes/tree/main/apiangularconnect/src/app/customer-product/customer-product.component.ts | https://raw.githubusercontent.com/AbiNJameS04/Angular_Codes/8df1a14/apiangularconnect/src/app/customer-product/customer-product.component.ts | AbiNJameS04/Angular_Codes 8df1a14 apiangularconnect/src/app/customer-product/customer-product.component.ts | true | 200 | 3,094 | import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { CartService } from '../cart.service';
import { ProductService } from '../product.service';
@Component({
selector: 'app-customer-product',
templateUrl: './customer-product.component.html',
styleUrls: ['./customer... | 7 |
MernaBassem/charger-dashboard | 0d2ffea | src/Redux/Slices/locationSlice.ts | TypeScript | www.github.com/MernaBassem/charger-dashboard/tree/main/src/Redux/Slices/locationSlice.ts | https://raw.githubusercontent.com/MernaBassem/charger-dashboard/0d2ffea/src/Redux/Slices/locationSlice.ts | MernaBassem/charger-dashboard 0d2ffea src/Redux/Slices/locationSlice.ts | true | 200 | 722 | // src/redux/slices/locationSlice.ts
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
interface LocationState {
lng: number | null;
lat: number | null;
street: string;
city: string;
}
const initialState: LocationState = {
lng: null,
lat: null,
street: '',
city: '',
};
const locationSlic... | 3 |
Jor-ban/reactive-cache | d36c387 | dist/index.d.ts | TypeScript | www.github.com/Jor-ban/reactive-cache/tree/main/dist/index.d.ts | https://raw.githubusercontent.com/Jor-ban/reactive-cache/d36c387/dist/index.d.ts | Jor-ban/reactive-cache d36c387 dist/index.d.ts | true | 200 | 3,447 | import { BehaviorSubject, Observable } from "rxjs";
import { NamedBehaviorSubject } from "./named-behavior-subject";
import {ConstantReactiveCacheObservable} from "../src";
export interface ReactiveCacheObservableParameters<T> {
allowManualUpdate?: boolean
valueReachable?: boolean
onNext?: (v: T | typeof EMPTY_... | 0 |
actarian/cms-i18n-react | f0646d9 | src/generator/fs.ts | TypeScript | www.github.com/actarian/cms-i18n-react/tree/main/src/generator/fs.ts | https://raw.githubusercontent.com/actarian/cms-i18n-react/f0646d9/src/generator/fs.ts | actarian/cms-i18n-react f0646d9 src/generator/fs.ts | true | 200 | 2,794 | const path = require('path');
const pluralize = require('pluralize');
const fs = require('fs');
export async function awaitAll(array: any, callback: (item: any, index: number) => Promise<any>): Promise<any[]> {
const promises = array.map(callback);
return await Promise.all(promises);
}
export async function fsRea... | 7 |
devkbm/connect-angular15 | 4f35252 | src/app/system/menu/menu-group-grid.component.ts | TypeScript | www.github.com/devkbm/connect-angular15/tree/main/src/app/system/menu/menu-group-grid.component.ts | https://raw.githubusercontent.com/devkbm/connect-angular15/4f35252/src/app/system/menu/menu-group-grid.component.ts | devkbm/connect-angular15 4f35252 src/app/system/menu/menu-group-grid.component.ts | true | 200 | 3,178 | import { Component, OnInit, Output, EventEmitter } from '@angular/core';
import { AppAlarmService } from 'src/app/core/service/app-alarm.service';
import { AggridFunction } from 'src/app/core/grid/aggrid-function';
import { ResponseList } from 'src/app/core/model/response-list';
import { MenuService } from './menu.se... | 4 |
gnn06/gnn-react-time2task | d793a56 | src/data/slot-view.ts | TypeScript | www.github.com/gnn06/gnn-react-time2task/tree/main/src/data/slot-view.ts | https://raw.githubusercontent.com/gnn06/gnn-react-time2task/d793a56/src/data/slot-view.ts | gnn06/gnn-react-time2task d793a56 src/data/slot-view.ts | true | 200 | 3,426 | import { S } from "vite/dist/node/types.d-aGj9QkWt";
import { appendWithSpace } from "../utils/stringUtil";
import { getSlotIdCurrent, getSlotIdLevel, SLOTIDS_BY_LEVEL } from "./slot-id";
import { SlotPath } from "./slot-path";
export const DEFAULT_CONF = {
collapse: [
"this_month next_week",
"this_month fol... | 1 |
CodePrincessNastia/goit-typescript-hw-01 | cf97483 | src/generics/4.ts | TypeScript | www.github.com/CodePrincessNastia/goit-typescript-hw-01/tree/main/src/generics/4.ts | https://raw.githubusercontent.com/CodePrincessNastia/goit-typescript-hw-01/cf97483/src/generics/4.ts | CodePrincessNastia/goit-typescript-hw-01 cf97483 src/generics/4.ts | true | 200 | 386 | type User2 = {
name: string;
surname: string;
email: string;
password: string;
};
function createOrUpdateUser(initialValues: Partial<User2>): User2 {
const defaultUser: User2 = {
name: '',
surname: '',
email: '',
password: '',
}
return {...defaultUser, ...initialValues}
}
createOrUpda... | 5 |
connk95/Fitness-Tracker | 0e2e535 | src/redux/user/user.slice.ts | TypeScript | www.github.com/connk95/Fitness-Tracker/tree/main/src/redux/user/user.slice.ts | https://raw.githubusercontent.com/connk95/Fitness-Tracker/0e2e535/src/redux/user/user.slice.ts | connk95/Fitness-Tracker 0e2e535 src/redux/user/user.slice.ts | true | 200 | 2,142 | import { createSlice, PayloadAction } from "@reduxjs/toolkit";
import { User, UserState } from "./user.type";
import { fetchUser, fetchUsers } from "./user.actions";
import { addFriend } from "../activity/activity.action";
const initialState: UserState = {
allUsers: [],
user: <User>{},
error: "",
loading: fals... | 3 |
saifmohsen105/HelloFrameWork | ae2fcc1 | src/app/app.routes.ts | TypeScript | www.github.com/saifmohsen105/HelloFrameWork/tree/main/src/app/app.routes.ts | https://raw.githubusercontent.com/saifmohsen105/HelloFrameWork/ae2fcc1/src/app/app.routes.ts | saifmohsen105/HelloFrameWork ae2fcc1 src/app/app.routes.ts | true | 200 | 864 | import { ProtflioComponent } from './protflio/protflio.component';
import { Component } from '@angular/core';
import { Routes } from '@angular/router';
import { HomePageComponent } from './home-page/home-page.component';
import { AboutComponent } from './about/about.component';
import { ContactUsComponent } from './con... | 0 |
huytran72/TypeScript_Exe | 730ed17 | src/exercises/generic-types/1.reduce-solution.ts | TypeScript | www.github.com/huytran72/TypeScript_Exe/tree/main/src/exercises/generic-types/1.reduce-solution.ts | https://raw.githubusercontent.com/huytran72/TypeScript_Exe/730ed17/src/exercises/generic-types/1.reduce-solution.ts | huytran72/TypeScript_Exe 730ed17 src/exercises/generic-types/1.reduce-solution.ts | true | 200 | 390 | const array = [
{
name: "John",
},
{
name: "Steve",
},
{
name: 100,
},
];
const obj = array.reduce<Record<string, any>>((accum, item) => {
accum[item.name] = item;
return accum;
}, {});
console.log("file: 1.reduce-solution.ts:14 ~ obj ~ obj:", obj);
// const obj2 = {};
// obj2[1] = 10;
// c... | 7 |
TarasovDaniil/seqness | 640bf6c | src/chains.ts | TypeScript | www.github.com/TarasovDaniil/seqness/tree/main/src/chains.ts | https://raw.githubusercontent.com/TarasovDaniil/seqness/640bf6c/src/chains.ts | TarasovDaniil/seqness 640bf6c src/chains.ts | true | 200 | 4,230 | import { Unit } from './unit'
import { MayBe } from './interfaces/unit'
interface InnerChainsType {
[key: string]: Chain
}
type OneOrMany<T> = T | [T, ...T[]]
type TransformFn<T, D> = (value: T, ...args: any[]) => D
interface TransformType<T = any, D = any> {
operation: 'transform'
fn: TransformFn<T, D>
dep... | 4 |
PrashilLonakar/Angular__deep-dive__every-level | 2670909 | src/app/components/layouts/sidebar/sidebar.component.ts | TypeScript | www.github.com/PrashilLonakar/Angular__deep-dive__every-level/tree/main/src/app/components/layouts/sidebar/sidebar.component.ts | https://raw.githubusercontent.com/PrashilLonakar/Angular__deep-dive__every-level/2670909/src/app/components/layouts/sidebar/sidebar.component.ts | PrashilLonakar/Angular__deep-dive__every-level 2670909 src/app/components/layouts/sidebar/sidebar.component.ts | true | 200 | 721 | import { NestedTreeControl } from '@angular/cdk/tree';
import { Component } from '@angular/core';
import { MatTreeNestedDataSource } from '@angular/material/tree';
import { SidebarConstants } from '../../../core/constants/sidebar.constant';
const TREE_DATA: any = SidebarConstants.menus;
@Component({
selector: 'app-s... | 1 |
IgnacioSachetto/myapp2023 | a2cdc81 | src/app/header/header.component.ts | TypeScript | www.github.com/IgnacioSachetto/myapp2023/tree/main/src/app/header/header.component.ts | https://raw.githubusercontent.com/IgnacioSachetto/myapp2023/a2cdc81/src/app/header/header.component.ts | IgnacioSachetto/myapp2023 a2cdc81 src/app/header/header.component.ts | true | 200 | 476 | import { Component } from '@angular/core';
import { Router } from '@angular/router';
@Component({
selector: 'app-header',
templateUrl: './header.component.html',
styleUrls: ['./header.component.css']
})
export class HeaderComponent {
constructor(private router: Router) {} // Inyección de dependencia del Router... | 5 |
SamPH29/FSF-PT-WEST-OCTOBER-100724-main | 55ec690 | 01-Class-Content/08-TypeScript-and-OOP/01-Activities/20-Stu_Classes/Solved/src/index.ts | TypeScript | www.github.com/SamPH29/FSF-PT-WEST-OCTOBER-100724-main/tree/main/01-Class-Content/08-TypeScript-and-OOP/01-Activities/20-Stu_Classes/Solved/src/index.ts | https://raw.githubusercontent.com/SamPH29/FSF-PT-WEST-OCTOBER-100724-main/55ec690/01-Class-Content/08-TypeScript-and-OOP/01-Activities/20-Stu_Classes/Solved/src/index.ts | SamPH29/FSF-PT-WEST-OCTOBER-100724-main 55ec690 01-Class-Content/08-TypeScript-and-OOP/01-Activities/20-Stu_Classes/Solved/src/index.ts | true | 200 | 2,082 | // Define a class for blog posts
class BlogPost {
// Declare properties for the author's name, title, text, creation date, and comments
authorName: string;
title: string;
text: string;
createdOn: string;
comments: BlogComment[];
// Define a constructor to initialize a new blog post
constructor(
aut... | 3 |
mdyeasinhn/Blog-server | 0dc76c0 | src/utils/sendResponse.ts | TypeScript | www.github.com/mdyeasinhn/Blog-server/tree/main/src/utils/sendResponse.ts | https://raw.githubusercontent.com/mdyeasinhn/Blog-server/0dc76c0/src/utils/sendResponse.ts | mdyeasinhn/Blog-server 0dc76c0 src/utils/sendResponse.ts | true | 200 | 435 | import { Response } from 'express'
type TSuccessResponse<T> = {
success?: boolean
statusCode: number
message: string
token?: string
data?: T | T[] | null
}
const sendResponse = <T>(res: Response, data: TSuccessResponse<T>) => {
res.status(data.statusCode).send({
success: true,
statusCode: data.sta... | 0 |
Stumbleine/duck-mart-backend | b5901d0 | src/ducks/dto/duckDto.ts | TypeScript | www.github.com/Stumbleine/duck-mart-backend/tree/main/src/ducks/dto/duckDto.ts | https://raw.githubusercontent.com/Stumbleine/duck-mart-backend/b5901d0/src/ducks/dto/duckDto.ts | Stumbleine/duck-mart-backend b5901d0 src/ducks/dto/duckDto.ts | true | 200 | 489 | import { IsBoolean, IsEnum, IsNumber, IsOptional, Min } from 'class-validator';
import { PartialType } from '@nestjs/mapped-types';
import { DuckColor, DuckSize } from 'src/enums';
export class CreateDuckDto {
@IsEnum(DuckColor)
color: DuckColor;
@IsEnum(DuckSize)
size: DuckSize;
@IsNumber()
price: numbe... | 4 |
tiny-factories/mfe-api-demos | 56c4b13 | tailwind.config.ts | TypeScript | www.github.com/tiny-factories/mfe-api-demos/tree/main/tailwind.config.ts | https://raw.githubusercontent.com/tiny-factories/mfe-api-demos/56c4b13/tailwind.config.ts | tiny-factories/mfe-api-demos 56c4b13 tailwind.config.ts | true | 200 | 451 | import type { Config } from "tailwindcss";
const config: Config = {
content: [
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}",
"./app/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
extend: {
colors: {
background: "#F5F5F5",
gray: "#ACACAC",
},
... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.