repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
andreasbm/masonry-layout
https://github.com/andreasbm/masonry-layout/blob/a8a551324ca1917dc55d6b1ccb018c950187f42a/src/lib/index.ts
src/lib/index.ts
export * from "./masonry-layout";
typescript
MIT
a8a551324ca1917dc55d6b1ccb018c950187f42a
2026-01-05T04:59:38.086698Z
false
andreasbm/masonry-layout
https://github.com/andreasbm/masonry-layout/blob/a8a551324ca1917dc55d6b1ccb018c950187f42a/src/lib/masonry-layout.ts
src/lib/masonry-layout.ts
import { COL_COUNT_CSS_VAR_NAME, ColHeightMap, debounce, DEFAULT_COLS, DEFAULT_DEBOUNCE_MS, DEFAULT_GAP_PX, DEFAULT_MAX_COL_WIDTH, ELEMENT_NODE_TYPE, findSmallestColIndex, GAP_CSS_VAR_NAME, getColCount, getNumberAttribute } from "./masonry-helpers"; /** * Typings required for the resize observer. */ declare interfac...
typescript
MIT
a8a551324ca1917dc55d6b1ccb018c950187f42a
2026-01-05T04:59:38.086698Z
false
andreasbm/masonry-layout
https://github.com/andreasbm/masonry-layout/blob/a8a551324ca1917dc55d6b1ccb018c950187f42a/src/demo/index.ts
src/demo/index.ts
import { DEFAULT_COLS, DEFAULT_GAP_PX, DEFAULT_MAX_COL_WIDTH } from "../lib/masonry-helpers"; import { MasonryLayout } from "../lib"; import "../lib/masonry-layout"; const $masonry = document.querySelector<MasonryLayout>("#masonry")!; const INITIAL_ITEMS_COUNT = 100; const SHOW_IMAGES = INITIAL_ITEMS_COUNT <= 100; co...
typescript
MIT
a8a551324ca1917dc55d6b1ccb018c950187f42a
2026-01-05T04:59:38.086698Z
false
siloor/youtube.external.subtitle
https://github.com/siloor/youtube.external.subtitle/blob/9c159079cf284b6bc935340a79caf7df07d194db/src/youtube.external.subtitle.ts
src/youtube.external.subtitle.ts
import Subtitle from './subtitle'; import { init } from './init.service'; init(window); export default { Subtitle };
typescript
MIT
9c159079cf284b6bc935340a79caf7df07d194db
2026-01-05T04:59:40.406147Z
false
siloor/youtube.external.subtitle
https://github.com/siloor/youtube.external.subtitle/blob/9c159079cf284b6bc935340a79caf7df07d194db/src/init.service.test.ts
src/init.service.test.ts
import DIC, { Youtube } from './dic'; import Subtitle, { SubtitleElement } from './subtitle'; import InitService, { iframeApiScriptAdded, addIframeApiScript, grantIframeApiScript, iframeApiLoaded, waitFor, fullscreenChangeHandler, getFullscreenElement, getFullscreenSubtitle, getSubtitles, globalStyl...
typescript
MIT
9c159079cf284b6bc935340a79caf7df07d194db
2026-01-05T04:59:40.406147Z
false
siloor/youtube.external.subtitle
https://github.com/siloor/youtube.external.subtitle/blob/9c159079cf284b6bc935340a79caf7df07d194db/src/dic.ts
src/dic.ts
import InitService from './init.service'; declare global { interface Document { webkitFullscreenElement: Element; webkitCurrentFullScreenElement: Element; mozFullScreenElement: Element; msFullscreenElement: Element; } } declare global { interface Window { YT: Youtube; } } export interface...
typescript
MIT
9c159079cf284b6bc935340a79caf7df07d194db
2026-01-05T04:59:40.406147Z
false
siloor/youtube.external.subtitle
https://github.com/siloor/youtube.external.subtitle/blob/9c159079cf284b6bc935340a79caf7df07d194db/src/subtitle.test.ts
src/subtitle.test.ts
import DIC, { Youtube } from './dic'; import InitService from './init.service'; import Subtitle, { SubtitleElement, SubtitleFrame, State, getCacheName, getCacheNames, buildCache, getSubtitleFromCache, addQueryStringParameterToUrl, getIframeSrc, createSubtitleElement, isStateChanged, renderClassN...
typescript
MIT
9c159079cf284b6bc935340a79caf7df07d194db
2026-01-05T04:59:40.406147Z
false
siloor/youtube.external.subtitle
https://github.com/siloor/youtube.external.subtitle/blob/9c159079cf284b6bc935340a79caf7df07d194db/src/init.service.ts
src/init.service.ts
import DIC from './dic'; import Subtitle, { SubtitleElement } from './subtitle'; export const CSS = { ID: 'youtube-external-subtitle-style', CLASS: 'youtube-external-subtitle', FULLSCREEN: 'fullscreen', FULLSCREEN_IGNORE: 'fullscreen-ignore' }; export const iframeApiScriptAdded = (document: Document): boolean...
typescript
MIT
9c159079cf284b6bc935340a79caf7df07d194db
2026-01-05T04:59:40.406147Z
false
siloor/youtube.external.subtitle
https://github.com/siloor/youtube.external.subtitle/blob/9c159079cf284b6bc935340a79caf7df07d194db/src/dic.test.ts
src/dic.test.ts
import { Container, Youtube } from './dic'; import InitService from './init.service'; test('getWindow returns the correct window', () => { const container = new Container(); expect(container.getWindow()).toBe(null); const window = {} as Window; container.setWindow(window); expect(container.getWindow()).t...
typescript
MIT
9c159079cf284b6bc935340a79caf7df07d194db
2026-01-05T04:59:40.406147Z
false
siloor/youtube.external.subtitle
https://github.com/siloor/youtube.external.subtitle/blob/9c159079cf284b6bc935340a79caf7df07d194db/src/subtitle.ts
src/subtitle.ts
import DIC from './dic'; import { CSS } from './init.service'; type RenderMethod = (element: SubtitleElement, player: any, isFullscreenActive: boolean, text: string, controlsVisible: boolean) => void; export interface SubtitleElement extends HTMLDivElement { youtubeExternalSubtitle: Subtitle; } export interface Su...
typescript
MIT
9c159079cf284b6bc935340a79caf7df07d194db
2026-01-05T04:59:40.406147Z
false
siloor/youtube.external.subtitle
https://github.com/siloor/youtube.external.subtitle/blob/9c159079cf284b6bc935340a79caf7df07d194db/src/youtube.external.subtitle.test.ts
src/youtube.external.subtitle.test.ts
import YoutubeExternalSubtitle from './youtube.external.subtitle'; import Subtitle from './subtitle'; test('the main script returns the Subtitle class', () => { expect(YoutubeExternalSubtitle.Subtitle).toBe(Subtitle); });
typescript
MIT
9c159079cf284b6bc935340a79caf7df07d194db
2026-01-05T04:59:40.406147Z
false
ocfox/nixpkgs-tracker
https://github.com/ocfox/nixpkgs-tracker/blob/ef954010622c0c82815f73df21c59c18d2c798a6/src/utils.ts
src/utils.ts
export const branches = [ "staging-next", "master", "nixos-unstable-small", "nixpkgs-unstable", "nixos-unstable", ]; export function setToken(token: string) { localStorage.setItem("token", token); } function getToken() { return localStorage.getItem("token"); } export function hasToken(): boolean { re...
typescript
MIT
ef954010622c0c82815f73df21c59c18d2c798a6
2026-01-05T04:59:41.589163Z
false
ocfox/nixpkgs-tracker
https://github.com/ocfox/nixpkgs-tracker/blob/ef954010622c0c82815f73df21c59c18d2c798a6/src/scheme.ts
src/scheme.ts
export default function setupColorScheme(element: HTMLButtonElement) { let isDark = window.matchMedia("(prefers-color-scheme: dark)").matches; const setScheme = (scheme: boolean) => { isDark = scheme; document.body.style.backgroundColor = isDark ? "#333" : "#fff"; document.body.style.color = isDark ? "#...
typescript
MIT
ef954010622c0c82815f73df21c59c18d2c798a6
2026-01-05T04:59:41.589163Z
false
ocfox/nixpkgs-tracker
https://github.com/ocfox/nixpkgs-tracker/blob/ef954010622c0c82815f73df21c59c18d2c798a6/src/main.ts
src/main.ts
import "./style.css"; import setupColorScheme from "./scheme.ts"; import { branches, getMergeCommit, getPR, hasToken, isContain, setToken, type PR, } from "./utils.ts"; document.querySelector<HTMLDivElement>("#app")!.innerHTML = ` <div> <h1 id="title" >Nixpkgs-Tracker</h1> <p>Check if a PR is m...
typescript
MIT
ef954010622c0c82815f73df21c59c18d2c798a6
2026-01-05T04:59:41.589163Z
false
ocfox/nixpkgs-tracker
https://github.com/ocfox/nixpkgs-tracker/blob/ef954010622c0c82815f73df21c59c18d2c798a6/src/vite-env.d.ts
src/vite-env.d.ts
/// <reference types="vite/client" />
typescript
MIT
ef954010622c0c82815f73df21c59c18d2c798a6
2026-01-05T04:59:41.589163Z
false
zackradisic/node-soundcloud-downloader
https://github.com/zackradisic/node-soundcloud-downloader/blob/472d70c6dcc64c4f44897de6913734520b9fe1bd/index.d.ts
index.d.ts
import { SCDL as _scdl, create as _create } from './src/index' declare const scdl: _scdl export const create: typeof _create export default scdl
typescript
MIT
472d70c6dcc64c4f44897de6913734520b9fe1bd
2026-01-05T04:59:41.395622Z
false
zackradisic/node-soundcloud-downloader
https://github.com/zackradisic/node-soundcloud-downloader/blob/472d70c6dcc64c4f44897de6913734520b9fe1bd/src/download.ts
src/download.ts
/** @internal @packageDocumentation */ import { AxiosInstance } from 'axios' import m3u8stream from 'm3u8stream' import { handleRequestErrs, appendURL } from './util' import getInfo, { Transcoding } from './info' export const getMediaURL = async (url: string, clientID: string, axiosInstance: AxiosInstance): Promise<s...
typescript
MIT
472d70c6dcc64c4f44897de6913734520b9fe1bd
2026-01-05T04:59:41.395622Z
false
zackradisic/node-soundcloud-downloader
https://github.com/zackradisic/node-soundcloud-downloader/blob/472d70c6dcc64c4f44897de6913734520b9fe1bd/src/download-playlist.ts
src/download-playlist.ts
import { AxiosInstance } from 'axios' import { download } from './download' import { getSetInfo } from './info' export const downloadPlaylist = async (url: string, clientID: string, axiosInstance: AxiosInstance): Promise<[ReadableStream<any>[], String[]]> => { const info = await getSetInfo(url, clientID, axiosInstan...
typescript
MIT
472d70c6dcc64c4f44897de6913734520b9fe1bd
2026-01-05T04:59:41.395622Z
false
zackradisic/node-soundcloud-downloader
https://github.com/zackradisic/node-soundcloud-downloader/blob/472d70c6dcc64c4f44897de6913734520b9fe1bd/src/formats.ts
src/formats.ts
/** * Audio formats a track can be encoded in. */ enum FORMATS { MP3 = 'audio/mpeg', OPUS = 'audio/ogg; codecs="opus"' } /** @internal */ export const _FORMATS = { MP3: FORMATS.MP3, OPUS: FORMATS.OPUS } export default FORMATS
typescript
MIT
472d70c6dcc64c4f44897de6913734520b9fe1bd
2026-01-05T04:59:41.395622Z
false
zackradisic/node-soundcloud-downloader
https://github.com/zackradisic/node-soundcloud-downloader/blob/472d70c6dcc64c4f44897de6913734520b9fe1bd/src/util.ts
src/util.ts
/** @internal @packageDocumentation */ import { URL } from 'url' import { AxiosError } from 'axios' /* eslint-disable camelcase */ export interface PaginatedQuery<T> { collection: T[], total_results?: number, // is omitted if limit parameter is supplied next_href: string, query_urn: string } export const reso...
typescript
MIT
472d70c6dcc64c4f44897de6913734520b9fe1bd
2026-01-05T04:59:41.395622Z
false
zackradisic/node-soundcloud-downloader
https://github.com/zackradisic/node-soundcloud-downloader/blob/472d70c6dcc64c4f44897de6913734520b9fe1bd/src/likes.ts
src/likes.ts
import { AxiosInstance } from 'axios' import { TrackInfo } from './info' import { appendURL, kindMismatchError, PaginatedQuery } from './util' const baseURL = 'https://api-v2.soundcloud.com/users/' export interface Like { // eslint-disable-next-line camelcase created_at: string, kind: string, track: T...
typescript
MIT
472d70c6dcc64c4f44897de6913734520b9fe1bd
2026-01-05T04:59:41.395622Z
false
zackradisic/node-soundcloud-downloader
https://github.com/zackradisic/node-soundcloud-downloader/blob/472d70c6dcc64c4f44897de6913734520b9fe1bd/src/info.ts
src/info.ts
/* eslint-disable camelcase */ import { AxiosInstance } from 'axios' import { handleRequestErrs, appendURL, extractIDFromPersonalizedTrackURL } from './util' import STREAMING_PROTOCOLS from './protocols' import FORMATS from './formats' /** * A Soundcloud user */ export interface User { kind: string, avatar_url:...
typescript
MIT
472d70c6dcc64c4f44897de6913734520b9fe1bd
2026-01-05T04:59:41.395622Z
false
zackradisic/node-soundcloud-downloader
https://github.com/zackradisic/node-soundcloud-downloader/blob/472d70c6dcc64c4f44897de6913734520b9fe1bd/src/protocols.ts
src/protocols.ts
/** * Soundcloud streams tracks using these protocols. */ enum STREAMING_PROTOCOLS { HLS = 'hls', PROGRESSIVE = 'progressive' } /** @internal */ export const _PROTOCOLS = { HLS: STREAMING_PROTOCOLS.HLS, PROGRESSIVE: STREAMING_PROTOCOLS.PROGRESSIVE } export default STREAMING_PROTOCOLS
typescript
MIT
472d70c6dcc64c4f44897de6913734520b9fe1bd
2026-01-05T04:59:41.395622Z
false
zackradisic/node-soundcloud-downloader
https://github.com/zackradisic/node-soundcloud-downloader/blob/472d70c6dcc64c4f44897de6913734520b9fe1bd/src/filter-media.ts
src/filter-media.ts
import { Transcoding } from './info' import FORMATS from './formats' import STREAMING_PROTOCOLS from './protocols' export interface FilterPredicateObject { protocol?: STREAMING_PROTOCOLS, format?: FORMATS } /** @internal */ const filterMedia = (media: Transcoding[], predicateObj: FilterPredicateObject): Transcodi...
typescript
MIT
472d70c6dcc64c4f44897de6913734520b9fe1bd
2026-01-05T04:59:41.395622Z
false
zackradisic/node-soundcloud-downloader
https://github.com/zackradisic/node-soundcloud-downloader/blob/472d70c6dcc64c4f44897de6913734520b9fe1bd/src/url.ts
src/url.ts
import axios, { AxiosInstance } from 'axios' /** @internal @packageDocumentation */ const regexp = /^https?:\/\/(soundcloud\.com)\/(.*)$/ const mobileUrlRegex = /^https?:\/\/(m\.soundcloud\.com)\/(.*)$/ const firebaseUrlRegex = /^https?:\/\/(soundcloud\.app\.goo\.gl)\/(.*)$/ const firebaseRegexp = /https?:\/\/(www\...
typescript
MIT
472d70c6dcc64c4f44897de6913734520b9fe1bd
2026-01-05T04:59:41.395622Z
false
zackradisic/node-soundcloud-downloader
https://github.com/zackradisic/node-soundcloud-downloader/blob/472d70c6dcc64c4f44897de6913734520b9fe1bd/src/search.ts
src/search.ts
/* eslint-disable camelcase */ import { AxiosInstance } from 'axios' import { TrackInfo, User, SetInfo } from './info' import { appendURL, PaginatedQuery } from './util' /** @internal */ const baseURL = 'https://api-v2.soundcloud.com/search' export interface RelatedResponse<T> extends PaginatedQuery<T> { variant: s...
typescript
MIT
472d70c6dcc64c4f44897de6913734520b9fe1bd
2026-01-05T04:59:41.395622Z
false
zackradisic/node-soundcloud-downloader
https://github.com/zackradisic/node-soundcloud-downloader/blob/472d70c6dcc64c4f44897de6913734520b9fe1bd/src/user.ts
src/user.ts
import { AxiosInstance } from 'axios' import { User } from './info' import { appendURL, resolveURL } from './util' /** @internal */ export const getUser = async (url: string, clientID: string, axiosInstance: AxiosInstance): Promise<User> => { const u = appendURL(resolveURL, 'url', url, 'client_id', clientID) const...
typescript
MIT
472d70c6dcc64c4f44897de6913734520b9fe1bd
2026-01-05T04:59:41.395622Z
false
zackradisic/node-soundcloud-downloader
https://github.com/zackradisic/node-soundcloud-downloader/blob/472d70c6dcc64c4f44897de6913734520b9fe1bd/src/index.ts
src/index.ts
import sckey from 'soundcloud-key-fetch' import getInfo, { getSetInfo, Transcoding, getTrackInfoByID, TrackInfo, User } from './info' import filterMedia, { FilterPredicateObject } from './filter-media' import { download, fromMediaObj } from './download' import isValidURL, { convertFirebaseURL, isFirebaseURL, isPerson...
typescript
MIT
472d70c6dcc64c4f44897de6913734520b9fe1bd
2026-01-05T04:59:41.395622Z
false
zackradisic/node-soundcloud-downloader
https://github.com/zackradisic/node-soundcloud-downloader/blob/472d70c6dcc64c4f44897de6913734520b9fe1bd/src/download-url.ts
src/download-url.ts
/** @internal @packageDocumentation */ import { AxiosInstance } from 'axios' import m3u8stream from 'm3u8stream' import { handleRequestErrs, appendURL } from './util' const fromURL = async (url: string, clientID: string, axiosInstance: AxiosInstance): Promise<any | m3u8stream.Stream> => { try { const link = app...
typescript
MIT
472d70c6dcc64c4f44897de6913734520b9fe1bd
2026-01-05T04:59:41.395622Z
false
zackradisic/node-soundcloud-downloader
https://github.com/zackradisic/node-soundcloud-downloader/blob/472d70c6dcc64c4f44897de6913734520b9fe1bd/src/download-media.ts
src/download-media.ts
/** @internal @packageDocumentation */ import m3u8stream from 'm3u8stream' import STREAMING_PROTOCOLS from './protocols' import { handleRequestErrs, appendURL } from './util' import { Transcoding } from './info' import { AxiosInstance } from 'axios' const fromMedia = async (media: Transcoding, clientID: string, axios...
typescript
MIT
472d70c6dcc64c4f44897de6913734520b9fe1bd
2026-01-05T04:59:41.395622Z
false
inorganik/ngx-countUp
https://github.com/inorganik/ngx-countUp/blob/f1795243d8ce816efc81a21a3530acacbf7e8794/src/main.server.ts
src/main.server.ts
import { BootstrapContext, bootstrapApplication } from '@angular/platform-browser'; import { App } from './app/app'; import { config } from './app/app.config.server'; const bootstrap = (context: BootstrapContext) => bootstrapApplication(App, config, context); export default bootstrap;
typescript
MIT
f1795243d8ce816efc81a21a3530acacbf7e8794
2026-01-05T04:59:41.448070Z
false
inorganik/ngx-countUp
https://github.com/inorganik/ngx-countUp/blob/f1795243d8ce816efc81a21a3530acacbf7e8794/src/server.ts
src/server.ts
import { AngularNodeAppEngine, createNodeRequestHandler, isMainModule, writeResponseToNodeResponse, } from '@angular/ssr/node'; import express from 'express'; import { join } from 'node:path'; const browserDistFolder = join(import.meta.dirname, '../browser'); const app = express(); const angularApp = new Angu...
typescript
MIT
f1795243d8ce816efc81a21a3530acacbf7e8794
2026-01-05T04:59:41.448070Z
false
inorganik/ngx-countUp
https://github.com/inorganik/ngx-countUp/blob/f1795243d8ce816efc81a21a3530acacbf7e8794/src/main.ts
src/main.ts
import { bootstrapApplication } from '@angular/platform-browser'; import { appConfig } from './app/app.config'; import { App } from './app/app'; bootstrapApplication(App, appConfig) .catch((err) => console.error(err));
typescript
MIT
f1795243d8ce816efc81a21a3530acacbf7e8794
2026-01-05T04:59:41.448070Z
false
inorganik/ngx-countUp
https://github.com/inorganik/ngx-countUp/blob/f1795243d8ce816efc81a21a3530acacbf7e8794/src/app/app.config.ts
src/app/app.config.ts
import { ApplicationConfig, provideBrowserGlobalErrorListeners } from '@angular/core'; import { provideRouter } from '@angular/router'; import { provideClientHydration, withEventReplay } from '@angular/platform-browser'; import { routes } from './app.routes'; export const appConfig: ApplicationConfig = { providers:...
typescript
MIT
f1795243d8ce816efc81a21a3530acacbf7e8794
2026-01-05T04:59:41.448070Z
false
inorganik/ngx-countUp
https://github.com/inorganik/ngx-countUp/blob/f1795243d8ce816efc81a21a3530acacbf7e8794/src/app/debug-change-detection.component.ts
src/app/debug-change-detection.component.ts
import { Component, inject, NgZone } from '@angular/core'; @Component({ selector: 'app-debug-change-detection', template: '<p class="block">{{check()}} zone checks</p>', standalone: true, }) export class DebugChangeDetectionComponent { private zone = inject(NgZone); count = 0; check() { this.zone.runO...
typescript
MIT
f1795243d8ce816efc81a21a3530acacbf7e8794
2026-01-05T04:59:41.448070Z
false
inorganik/ngx-countUp
https://github.com/inorganik/ngx-countUp/blob/f1795243d8ce816efc81a21a3530acacbf7e8794/src/app/app.spec.ts
src/app/app.spec.ts
import { TestBed } from '@angular/core/testing'; import { App } from './app'; describe('App', () => { beforeEach(async () => { await TestBed.configureTestingModule({ imports: [App], }).compileComponents(); }); it('should create the app', () => { const fixture = TestBed.createComponent(App); ...
typescript
MIT
f1795243d8ce816efc81a21a3530acacbf7e8794
2026-01-05T04:59:41.448070Z
false
inorganik/ngx-countUp
https://github.com/inorganik/ngx-countUp/blob/f1795243d8ce816efc81a21a3530acacbf7e8794/src/app/app.config.server.ts
src/app/app.config.server.ts
import { mergeApplicationConfig, ApplicationConfig } from '@angular/core'; import { provideServerRendering, withRoutes } from '@angular/ssr'; import { appConfig } from './app.config'; import { serverRoutes } from './app.routes.server'; const serverConfig: ApplicationConfig = { providers: [ provideServerRendering...
typescript
MIT
f1795243d8ce816efc81a21a3530acacbf7e8794
2026-01-05T04:59:41.448070Z
false
inorganik/ngx-countUp
https://github.com/inorganik/ngx-countUp/blob/f1795243d8ce816efc81a21a3530acacbf7e8794/src/app/app.routes.ts
src/app/app.routes.ts
import { Routes } from '@angular/router'; export const routes: Routes = [];
typescript
MIT
f1795243d8ce816efc81a21a3530acacbf7e8794
2026-01-05T04:59:41.448070Z
false
inorganik/ngx-countUp
https://github.com/inorganik/ngx-countUp/blob/f1795243d8ce816efc81a21a3530acacbf7e8794/src/app/app.ts
src/app/app.ts
import { Component } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { CountUpOptions } from 'countup.js'; import { CountUpDirective } from 'ngx-countup'; import { DebugChangeDetectionComponent } from './debug-change-detection.component'; @Component({ selector: 'app-root', imports: [Cou...
typescript
MIT
f1795243d8ce816efc81a21a3530acacbf7e8794
2026-01-05T04:59:41.448070Z
false
inorganik/ngx-countUp
https://github.com/inorganik/ngx-countUp/blob/f1795243d8ce816efc81a21a3530acacbf7e8794/src/app/app.routes.server.ts
src/app/app.routes.server.ts
import { RenderMode, ServerRoute } from '@angular/ssr'; export const serverRoutes: ServerRoute[] = [ { path: '**', renderMode: RenderMode.Prerender } ];
typescript
MIT
f1795243d8ce816efc81a21a3530acacbf7e8794
2026-01-05T04:59:41.448070Z
false
inorganik/ngx-countUp
https://github.com/inorganik/ngx-countUp/blob/f1795243d8ce816efc81a21a3530acacbf7e8794/projects/ngx-countup/src/public-api.ts
projects/ngx-countup/src/public-api.ts
/* * Public API Surface of count-up */ export * from './lib/ngx-countup.directive';
typescript
MIT
f1795243d8ce816efc81a21a3530acacbf7e8794
2026-01-05T04:59:41.448070Z
false
inorganik/ngx-countUp
https://github.com/inorganik/ngx-countUp/blob/f1795243d8ce816efc81a21a3530acacbf7e8794/projects/ngx-countup/src/lib/ngx-countup.directive.spec.ts
projects/ngx-countup/src/lib/ngx-countup.directive.spec.ts
import { Component, PLATFORM_ID, signal } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { CountUpOptions } from 'countup.js'; import { beforeEach, describe, expect, it, vi } from 'vitest'; import { CountUpDirective } from './ngx-countup.directive'; @Component({ templ...
typescript
MIT
f1795243d8ce816efc81a21a3530acacbf7e8794
2026-01-05T04:59:41.448070Z
false
inorganik/ngx-countUp
https://github.com/inorganik/ngx-countUp/blob/f1795243d8ce816efc81a21a3530acacbf7e8794/projects/ngx-countup/src/lib/ngx-countup.directive.ts
projects/ngx-countup/src/lib/ngx-countup.directive.ts
import { isPlatformBrowser } from '@angular/common'; import { Directive, ElementRef, NgZone, OnChanges, PLATFORM_ID, SimpleChanges, inject, input, output, } from '@angular/core'; import { CountUp, CountUpOptions } from 'countup.js'; @Directive({ selector: '[countUp]', host: { '(click)': 'onCl...
typescript
MIT
f1795243d8ce816efc81a21a3530acacbf7e8794
2026-01-05T04:59:41.448070Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/uno.config.ts
uno.config.ts
import { defineConfig, presetAttributify, presetIcons, presetUno, transformerAttributifyJsx, transformerDirectives, } from 'unocss' import { presetScalpel } from 'unocss-preset-scalpel' import { FileSystemIconLoader } from '@iconify/utils/lib/loader/node-loaders' export default defineConfig({ shortcuts: ...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/vite.config.ts
vite.config.ts
import path from 'node:path' import { defineConfig } from 'vite' import Vue from '@vitejs/plugin-vue' import Pages from 'vite-plugin-pages' import AutoImport from 'unplugin-auto-import/vite' import Components from 'unplugin-vue-components/vite' import VueMacros from 'unplugin-vue-macros/vite' import Unocss from 'unocss...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/components.d.ts
src/components.d.ts
/* eslint-disable */ /* prettier-ignore */ // @ts-nocheck // Generated by unplugin-vue-components // Read more: https://github.com/vuejs/core/pull/3399 export {} declare module 'vue' { export interface GlobalComponents { AppContainer: typeof import('./components/AppContainer.vue')['default'] AppProvider: typ...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/global-types.d.ts
src/global-types.d.ts
import type { DialogProviderInst, MessageProviderInst } from 'naive-ui' import type { ComponentCustomOptions as _ComponentCustomOptions, ComponentCustomProperties as _ComponentCustomProperties, } from 'vue' export {} declare module 'vue' { interface HTMLAttributes { [key: string]: unknown } } declare gl...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/main.ts
src/main.ts
import 'uno.css' import '@/styles/index.scss' import { createApp } from 'vue' import { createPinia } from 'pinia' import App from './App.vue' import router from './router' import { setupI18n } from './utils' const app = createApp(App) async function setupApp() { await setupI18n(app) app.use(createPinia()) app....
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/auto-imports.d.ts
src/auto-imports.d.ts
/* eslint-disable */ /* prettier-ignore */ // @ts-nocheck // noinspection JSUnusedGlobalSymbols // Generated by unplugin-auto-import export {} declare global { const $: typeof import('vue/macros')['$'] const $$: typeof import('vue/macros')['$$'] const $computed: typeof import('vue/macros')['$computed'] const $c...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
true
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/composables/icon_style.ts
src/composables/icon_style.ts
import type { StyleValue } from 'vue' import type { IconStyle } from '@/types' export function useIconStyle() { const settingStore = useSettingStore() const iconStyle = computed(() => (settingStore.getSettingItem('iconStyle').value as IconStyle) as StyleValue) return { iconStyle, } }
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/composables/draggable.ts
src/composables/draggable.ts
export function useDrag() { const settingStore = useSettingStore() const disabled = ref(false) const draggableOptions = computed(() => ({ animation: 200, disabled: !settingStore.isSetting || disabled.value, ghostClass: 'ghost', forceFallback: true, delay: isSmScreen.value ? 0 : 100, fallb...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/composables/app.ts
src/composables/app.ts
import type { WebsitePreference } from '@/types' /* Dark */ export const isDark = useDark() export function toggleDark(event: MouseEvent) { // @ts-expect-error experimental API const isAppearanceTransition = document.startViewTransition && !window.matchMedia('(prefers-reduced-motion: reduce)').matches if (...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/composables/i18n.ts
src/composables/i18n.ts
import { i18n } from '@/utils' export function t(key: string | number) { return i18n.global.t(key) }
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/composables/theme.ts
src/composables/theme.ts
import type { Theme } from '@/types' import { theme } from '@/utils' type ThemeVar = keyof Theme type ThemeVars = { [K in keyof Theme]: Ref<string> } const settingsCache = loadSettings() const defaultTheme: string = settingsCache ? settingsCache.theme : theme.defaultKey function camelToCssVar(str: string) { return...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/stores/modal.ts
src/stores/modal.ts
import { getCommonProps } from '@/utils' export type ActionType = 'add' | 'update' export type ActionTarget = 'cate' | 'group' | 'site' const ACTION_NAME = { add: () => t('common.add'), update: () => t('common.edit'), } const TARGET_NAME = { cate: () => t('common.cate'), group: () => t('common.group'), site...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/stores/setting.ts
src/stores/setting.ts
import * as settingData from '@/utils/settings' import type { Settings } from '@/types' import { deepClone } from '@/utils' export type SettingKey = keyof Settings export function loadSettings(): Settings | undefined { const settings = localStorage.getItem('settings') return settings ? JSON.parse(settings) : unde...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/stores/site.ts
src/stores/site.ts
import { reqPostData } from '@/api' import preset from '@/preset.json' import globalPreset from '@/preset_global.json' import type { Category, Group, Site, WebsitePreference } from '@/types' import { deepClone, secretIdStorage } from '@/utils' function loadData(): Category[] | undefined { const data = localStorage.g...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/common.ts
src/utils/common.ts
import type { CommonProperties, TextGetter } from '@/types' export function deepClone<T>(obj: T): T { if (obj === null || typeof obj !== 'object') return obj let clone: any if (Array.isArray(obj)) clone = [] else clone = Object.create(null) for (const key of Object.keys(obj)) (clone as any)...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/i18n.ts
src/utils/i18n.ts
import type { App } from 'vue' import type { Locale } from 'vue-i18n' import { createI18n } from 'vue-i18n' export const i18n = createI18n({ legacy: false, locale: '', messages: {}, }) const localesMap = Object.fromEntries( Object.entries(import.meta.glob('../locales/*.yml')) .map(([path, loadLocale]) => ...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/favicon.ts
src/utils/favicon.ts
const FAVICON_API = import.meta.env.VITE_WITH_SERVER ? import.meta.env.VITE_FAVICON_API : 'https://api.iowen.cn/favicon' const siteToUrl: Map<string, string> = new Map() const sites: string[] = [ 'clougence.com', 'jd.com', 'taobao.com', 'pinduoduo.com', ] sites.forEach((e: string) => { siteToUrl.set(e, `/si...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/index.ts
src/utils/index.ts
export * from './favicon' export * from './common' export * from './settings' export * from './i18n' export * from './request' export * from './search-engine' export * from './symbol' export * from './storage'
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/storage.ts
src/utils/storage.ts
const SYNC_ID_KEY = '__sync_id__' export const secretIdStorage = { set(id: string) { localStorage.setItem(SYNC_ID_KEY, id) }, get() { return localStorage.getItem(SYNC_ID_KEY) }, remove() { localStorage.removeItem(SYNC_ID_KEY) }, }
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/symbol.ts
src/utils/symbol.ts
export const FAVICON_MAP_SYMBOL = Symbol('FAVICON_MAP')
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/request.ts
src/utils/request.ts
export function objToQuery(obj: { [key: string]: any }): string { const queryString = Object.keys(obj) .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`) .join('&') return queryString }
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/settings/icon_style.ts
src/utils/settings/icon_style.ts
import type { IconStyle, SettingItemChildren } from '@/types' import { SettingItem } from '@/types' const iconStyleList: SettingItemChildren<IconStyle> = [ { name: () => t('settings.iconStyle.vivid'), key: 'Vivid', value: {}, }, { name: () => t('settings.iconStyle.plain'), key: 'Plain', v...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/settings/link_strategy.ts
src/utils/settings/link_strategy.ts
import type { SettingItemChildren } from '@/types' import { SettingItem } from '@/types' const linkStrategyList: SettingItemChildren<string> = [ { name: () => t('settings.linkStrategy.currentTab'), key: 'currentTab', value: '_self' }, { name: () => t('settings.linkStrategy.newTab'), key: 'newTab', value: '_blank' ...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/settings/show_date.ts
src/utils/settings/show_date.ts
import { SettingItem, type SettingItemChildren } from '@/types' const showDateList: SettingItemChildren<boolean> = [ { name: () => t('settings.common.show'), key: 'Show', value: true }, { name: () => t('settings.common.hide'), key: 'Hide', value: false }, ] export const showDate = new SettingItem({ name: () => ...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/settings/language.ts
src/utils/settings/language.ts
import type { Language, SettingItemChildren } from '@/types' import { SettingItem } from '@/types' const languageList: SettingItemChildren<Language> = [ { name: () => t('settings.language.system'), key: 'System', value: 'System' }, { name: () => '简体中文', key: 'zh-CN', value: 'zh-CN' }, { name: () => 'English', ke...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/settings/search.ts
src/utils/settings/search.ts
import type { Search, SettingItemChildren } from '@/types' import { SettingItem } from '@/types' const searchList: SettingItemChildren<Search> = [ { name: () => t('settings.searchEngine.bing'), key: 'Bing', value: { url: 'https://www.bing.com/search', wd: 'q', favicon: '/svg/bing.svg', s: 'bi' }, }, ...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/settings/show_time.ts
src/utils/settings/show_time.ts
import { SettingItem, type SettingItemChildren } from '@/types' const showTimeList: SettingItemChildren<boolean> = [ { name: () => t('settings.common.show'), key: 'Show', value: true }, { name: () => t('settings.common.hide'), key: 'Hide', value: false }, ] export const showTime = new SettingItem({ name: () => ...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/settings/website_preference.ts
src/utils/settings/website_preference.ts
import type { SettingItemChildren, WebsitePreference } from '@/types' import { SettingItem } from '@/types' const websitePreferenceList: SettingItemChildren<WebsitePreference> = [ { name: () => t('settings.sitePreference.auto'), key: 'Auto', value: 'Auto' }, { name: () => t('settings.sitePreference.chineseMainland...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/settings/show_footer.ts
src/utils/settings/show_footer.ts
import { SettingItem, type SettingItemChildren } from '@/types' const showFooterList: SettingItemChildren<boolean> = [ { name: () => t('settings.common.show'), key: 'Show', value: true }, { name: () => t('settings.common.hide'), key: 'Hide', value: false }, ] export const showFooter = new SettingItem({ name: ()...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/settings/index.ts
src/utils/settings/index.ts
export * from './theme' export * from './search' export * from './icon_style' export * from './show_lunar' export * from './website_preference' export * from './show_footer' export * from './show_time' export * from './show_date' export * from './show_second' export * from './language' export * from './tag_mode' export...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/settings/theme.ts
src/utils/settings/theme.ts
import type { SettingItemChildren, Theme } from '@/types' import { SettingItem } from '@/types' const themeChildren: SettingItemChildren<Theme> = [ { name: () => t('settings.theme.earlySpring'), key: 'EarlySpring', value: { primaryC: '#87a8a4', primaryLightC: '#a0c7c2', primaryDarkC: '#...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/settings/show_lunar.ts
src/utils/settings/show_lunar.ts
import { SettingItem, type SettingItemChildren } from '@/types' const showLunarList: SettingItemChildren<boolean> = [ { name: () => t('settings.common.show'), key: 'Show', value: true }, { name: () => t('settings.common.hide'), key: 'Hide', value: false }, ] export const showLunar = new SettingItem({ name: () =...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/settings/show_second.ts
src/utils/settings/show_second.ts
import { SettingItem, type SettingItemChildren } from '@/types' const showSecondList: SettingItemChildren<boolean> = [ { name: () => t('settings.common.show'), key: 'Show', value: true }, { name: () => t('settings.common.hide'), key: 'Hide', value: false }, ] export const showSecond = new SettingItem({ name: ()...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/settings/tag_mode.ts
src/utils/settings/tag_mode.ts
import type { SettingItemChildren, TagMode } from '@/types' import { SettingItem } from '@/types' const tagModeList: SettingItemChildren<TagMode> = [ { name: () => t('settings.tagMode.concise'), key: 'Concise', value: 'Concise' }, { name: () => t('settings.tagMode.full'), key: 'Full', value: 'Full' }, ] export co...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/search-engine/eng-sogou.ts
src/utils/search-engine/eng-sogou.ts
import fetchJsonp from 'fetch-jsonp' import { objToQuery } from '../request' function target(wd: string) { return `https://www.sogou.com/web?query=${encodeURIComponent(wd)}` } function complete(wd: string, callback: Function) { const url = `https://wap.sogou.com/web/sugg/${encodeURIComponent(wd)}` const query =...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/search-engine/eng-baidu.ts
src/utils/search-engine/eng-baidu.ts
import fetchJsonp from 'fetch-jsonp' import { objToQuery } from '../request' function target(wd: string) { return `https://www.baidu.com/s?wd=${encodeURIComponent(wd)}` } function complete(wd: string, callback: Function) { const query = objToQuery({ prod: 'wise', wd }) fetchJsonp(`https://www.baidu.com/sugrec?$...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/search-engine/eng-wikipedia.ts
src/utils/search-engine/eng-wikipedia.ts
import fetchJsonp from 'fetch-jsonp' import { objToQuery } from '../request' function target(wd: string) { return `https://zh.wikipedia.org/w/index.php?search=${encodeURIComponent(wd)}` } function complete(wd: string, callback: Function) { const query = objToQuery({ action: 'opensearch', format: 'json', ...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/search-engine/eng-google.ts
src/utils/search-engine/eng-google.ts
import fetchJsonp from 'fetch-jsonp' import { objToQuery } from '../request' function target(wd: string) { return `https://www.google.com/search?q=${encodeURIComponent(wd)}` } function complete(wd: string, callback: any) { const query = objToQuery({ client: 'psy-ab', hl: 'zh-CN', q: wd }) fetchJsonp(`https://su...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/search-engine/index.ts
src/utils/search-engine/index.ts
import engBaidu from './eng-baidu' import engGoogle from './eng-google' import engBing from './eng-bing' import engWikipedia from './eng-wikipedia' import engSogou from './eng-sogou' const ENGINES = { Baidu: engBaidu, Google: engGoogle, Bing: engBing, Wikipedia: engWikipedia, Sogou: engSogou, } export type ...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/utils/search-engine/eng-bing.ts
src/utils/search-engine/eng-bing.ts
import fetchJsonp from 'fetch-jsonp' import { objToQuery } from '../request' function target(wd: string) { return `https://www.bing.com/search?mkt=zh-cn&q=${encodeURIComponent(wd)}` } function complete(wd: string, callback: Function) { const query = objToQuery({ type: 'cb', q: wd }) fetchJsonp(`https://api.bing...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/api/index.ts
src/api/index.ts
import ky from 'ky' const api = ky.extend({ prefixUrl: import.meta.env.VITE_API_BASE, }) export function reqPostData(data: { id?: string; secretId?: string; data: any }) { return api.post('sync', { json: data }).json() } export function reqGetData(id: string) { return api.get(`sync/${id}`).json() }
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/types/common.ts
src/types/common.ts
export type CommonProperties<T, U> = { [K in Extract<keyof T, keyof U>]: T[K] | U[K]; }
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/types/setting.ts
src/types/setting.ts
import type * as settingData from '@/utils/settings' export type TextGetter = () => string export class SettingItem<T> { name: TextGetter key: string children: SettingItemChildren<T> defaultKey: string value: T constructor(options: { name: TextGetter key: string children: SettingItemChildren<...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/types/site.ts
src/types/site.ts
export interface Site { id: number name: string url: string favicon?: string desc?: string } export interface Group { id: number name: string siteList: Site[] } export interface Category { id: number name: string groupList: Group[] }
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/types/index.ts
src/types/index.ts
export * from './setting' export * from './site' export * from './common'
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/src/router/index.ts
src/router/index.ts
import { createRouter, createWebHistory } from 'vue-router' import routes from 'virtual:generated-pages' const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), routes, }) export default router
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/server/src/env.d.ts
server/src/env.d.ts
declare namespace NodeJS { interface ProcessEnv { NODE_ENV: 'development' | 'production' FAVICON_API: 'google' | '0x3' FAVICON_SIZE: string DATA_ID_SALT: string PORT: string } }
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/server/src/index.ts
server/src/index.ts
import path from 'node:path' import { fileURLToPath } from 'node:url' import Koa from 'koa' import { koaBody } from 'koa-body' import koaStatic from 'koa-static' import dotenv from 'dotenv' import { router } from './router' import { exceptionInterceptor, faviconInterceptor } from './middleware' const __filename = file...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/server/src/middleware/favicon.ts
server/src/middleware/favicon.ts
import path from 'node:path' import fs from 'node:fs' import { fileURLToPath } from 'node:url' import type { Context, Next } from 'koa' import ky from 'ky' import { checkFileExist } from '../utils' const __filename = fileURLToPath(import.meta.url) const __dirname = path.dirname(__filename) export function faviconInte...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/server/src/middleware/index.ts
server/src/middleware/index.ts
export * from './favicon' export * from './exception'
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/server/src/middleware/exception.ts
server/src/middleware/exception.ts
import type { Context, Next } from 'koa' import { R } from '../utils' export function exceptionInterceptor() { return async (ctx: Context, next: Next) => { try { await next() } catch (e) { ctx.body = R.fail(e.message || 'unknown error') } } }
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/server/src/utils/index.ts
server/src/utils/index.ts
import { promises as fs } from 'node:fs' import crypto from 'node:crypto' export async function checkFileExist(filePath: string) { try { await fs.access(filePath) return true } catch (error) { return false } } export function encryptId(id: string) { const SALT = 'SALT' return crypto.createHash...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
auwen/moon-web-start
https://github.com/auwen/moon-web-start/blob/3838664e65daf5da4744bf78a5408db093da5718/server/src/router/index.ts
server/src/router/index.ts
import { promises as fs } from 'node:fs' import path from 'node:path' import { fileURLToPath } from 'node:url' import Router from 'koa-router' import { R, checkFileExist, encryptId } from '../utils' const __filename = fileURLToPath(import.meta.url) const __dirname = path.dirname(__filename) const ID_REG = /^\w{5,64}$...
typescript
MIT
3838664e65daf5da4744bf78a5408db093da5718
2026-01-05T04:59:42.281611Z
false
microsoft/vscode-github-triage-actions
https://github.com/microsoft/vscode-github-triage-actions/blob/5e5f89b56270c343b86cd79cb988698d64bd7908/review-reminder/ReviewReminder.ts
review-reminder/ReviewReminder.ts
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *---------------------------------------------------------------...
typescript
MIT
5e5f89b56270c343b86cd79cb988698d64bd7908
2026-01-05T04:59:42.811460Z
false
microsoft/vscode-github-triage-actions
https://github.com/microsoft/vscode-github-triage-actions/blob/5e5f89b56270c343b86cd79cb988698d64bd7908/review-reminder/index.ts
review-reminder/index.ts
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information. *-------------------------------------------------------------------...
typescript
MIT
5e5f89b56270c343b86cd79cb988698d64bd7908
2026-01-05T04:59:42.811460Z
false
microsoft/vscode-github-triage-actions
https://github.com/microsoft/vscode-github-triage-actions/blob/5e5f89b56270c343b86cd79cb988698d64bd7908/triage/index.ts
triage/index.ts
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information. *-------------------------------------------------------------------...
typescript
MIT
5e5f89b56270c343b86cd79cb988698d64bd7908
2026-01-05T04:59:42.811460Z
false
microsoft/vscode-github-triage-actions
https://github.com/microsoft/vscode-github-triage-actions/blob/5e5f89b56270c343b86cd79cb988698d64bd7908/python-triage-info-needed/index.ts
python-triage-info-needed/index.ts
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. import { context } from '@actions/github'; import { OctoKitIssue } from '../api/octokit'; import { Action } from '../common/Action'; import { getRequiredInput } from '../common/utils'; class TriageInfoNeeded extends Action...
typescript
MIT
5e5f89b56270c343b86cd79cb988698d64bd7908
2026-01-05T04:59:42.811460Z
false