repo
stringlengths
5
106
file_url
stringlengths
78
301
file_path
stringlengths
4
211
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:56:49
2026-01-05 02:23:25
truncated
bool
2 classes
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/each-block/_config.js
packages/svelte/tests/sourcemaps/samples/each-block/_config.js
import { test } from '../../test'; export default test({ client: ['foo', 'bar', { str: 'bar', idxGenerated: 1, idxOriginal: 1 }] });
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/basic/_config.js
packages/svelte/tests/sourcemaps/samples/basic/_config.js
import { test } from '../../test'; export default test({ client: ['bar.baz'], server: ['bar.baz'] });
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/static-no-script/_config.js
packages/svelte/tests/sourcemaps/samples/static-no-script/_config.js
import { test } from '../../test'; export default test({ test({ assert, map_client }) { assert.deepEqual(map_client.sources, ['../../input.svelte']); // TODO do we need to set sourcesContent? We did it in Svelte 4, but why? // assert.deepEqual(js.map.sourcesContent, [ // fs.readFileSync(path.join(__dirname, ...
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/sourcemap-names/_config.js
packages/svelte/tests/sourcemaps/samples/sourcemap-names/_config.js
import MagicString from 'magic-string'; import { test } from '../../test'; import { magic_string_preprocessor_result, magic_string_replace_all } from '../../helpers.js'; export default test({ preprocess: [ { markup: ({ content, filename = '' }) => { const src = new MagicString(content); magic_string_repl...
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/preprocessed-script/_config.js
packages/svelte/tests/sourcemaps/samples/preprocessed-script/_config.js
import MagicString from 'magic-string'; import { test } from '../../test'; import { magic_string_preprocessor_result, magic_string_replace_all } from '../../helpers.js'; export default test({ preprocess: { script: ({ content, filename = '' }) => { const src = new MagicString(content); magic_string_replace_all...
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/external/_config.js
packages/svelte/tests/sourcemaps/samples/external/_config.js
import { test } from '../../test'; import { magic_string_bundle } from '../../helpers.js'; const COMMON = ':global(html) { height: 100%; }\n'; // TODO: removing '\n' breaks test // - _actual.svelte.map looks correct // - _actual.css.map adds reference to </style> on input.svelte // - Most probably caused by bug in cu...
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/attached-sourcemap/_config.js
packages/svelte/tests/sourcemaps/samples/attached-sourcemap/_config.js
/** @import { PreprocessorGroup, Preprocessor } from '../../../../src/compiler/public' */ import * as path from 'node:path'; import MagicString from 'magic-string'; import { test } from '../../test'; let indent_size = 4; let comment_multi = true; /** * * @param {'script' | 'style'} tag_name * @param {string} searc...
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/sourcemap-concat/_config.js
packages/svelte/tests/sourcemaps/samples/sourcemap-concat/_config.js
import MagicString from 'magic-string'; import { test } from '../../test'; import { magic_string_preprocessor_result } from '../../helpers.js'; export default test({ preprocess: [ { script: ({ content }) => { const src = new MagicString(content); src.prepend('console.log("Injected first line");\n'); ...
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/source-map-generator/_config.js
packages/svelte/tests/sourcemaps/samples/source-map-generator/_config.js
import MagicString from 'magic-string'; import { test } from '../../test'; import { SourceMapConsumer, SourceMapGenerator } from 'source-map'; import * as path from 'node:path'; export default test({ preprocess: { style: async ({ content, filename = '' }) => { const src = new MagicString(content); const idx =...
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/two-scripts/_config.js
packages/svelte/tests/sourcemaps/samples/two-scripts/_config.js
import { test } from '../../test'; export default test({ client: ['first', 'assertThisLine'] });
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/effects/_config.js
packages/svelte/tests/sourcemaps/samples/effects/_config.js
import { test } from '../../test'; export default test({ client: [ { str: '$effect.pre', strGenerated: '$.user_pre_effect' }, { str: '$effect', strGenerated: '$.user_effect' } ], server: [] });
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/script-after-comment/_config.js
packages/svelte/tests/sourcemaps/samples/script-after-comment/_config.js
import { test } from '../../test'; export default test({ client: ['assertThisLine'] });
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/binding-shorthand/_config.js
packages/svelte/tests/sourcemaps/samples/binding-shorthand/_config.js
import { test } from '../../test'; export default test({ skip: true, // No source map for binding in template because there's no loc property for it; skipped in Svelte 4, too client: [ 'potato', { str: 'potato', idxOriginal: 1, idxGenerated: 3 }, { str: 'potato', idxOriginal: 1, idxGenerated: 5 } ] });
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/sourcemap-sources/_config.js
packages/svelte/tests/sourcemaps/samples/sourcemap-sources/_config.js
import MagicString, { Bundle } from 'magic-string'; import * as path from 'node:path'; import { test } from '../../test'; /** * @param {Bundle} bundle * @param {string} filename * @param {string} source */ function add(bundle, filename, source) { bundle.addSource({ filename, content: new MagicString(source), ...
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/script/_config.js
packages/svelte/tests/sourcemaps/samples/script/_config.js
import { test } from '../../test'; export default test({ client: ['42'] });
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/decoded-sourcemap/_config.js
packages/svelte/tests/sourcemaps/samples/decoded-sourcemap/_config.js
import MagicString from 'magic-string'; import { test } from '../../test'; import { magic_string_preprocessor_result, magic_string_replace_all } from '../../helpers.js'; export default test({ preprocess: { markup: ({ content, filename = '' }) => { const src = new MagicString(content); magic_string_replace_all...
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/sourcemap-basename/_config.js
packages/svelte/tests/sourcemaps/samples/sourcemap-basename/_config.js
import { test } from '../../test'; import { magic_string_bundle } from '../../helpers.js'; export const component_filepath = 'src/input.svelte'; export const component_file_basename = 'input.svelte'; // as output by external tool for src/external_code.css (relative to src/input.svelte) export const external_relative...
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/preprocessed-no-map/_config.js
packages/svelte/tests/sourcemaps/samples/preprocessed-no-map/_config.js
import { test } from '../../test'; export default test({ preprocess: [ { style: ({ content }) => { // Modified without source map return { code: content + ' ' }; }, script: ({ content }) => { // Not modified return { code: content }; } } ], client: [], preprocessed: [ // markup (s...
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/preprocessed-markup/_config.js
packages/svelte/tests/sourcemaps/samples/preprocessed-markup/_config.js
import MagicString from 'magic-string'; import { test } from '../../test'; import { magic_string_preprocessor_result, magic_string_replace_all } from '../../helpers.js'; export default test({ preprocess: { markup: ({ content, filename = '' }) => { const src = new MagicString(content); magic_string_replace_all...
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/preprocessed-multiple/_config.js
packages/svelte/tests/sourcemaps/samples/preprocessed-multiple/_config.js
import MagicString from 'magic-string'; import { test } from '../../test'; import { magic_string_preprocessor_result, magic_string_replace_all } from '../../helpers.js'; export default test({ preprocess: { markup: ({ content, filename = '' }) => { const src = new MagicString(content); magic_string_replace_all...
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/typescript/_config.js
packages/svelte/tests/sourcemaps/samples/typescript/_config.js
import * as ts from 'typescript'; import { test } from '../../test'; export default test({ preprocess: [ { script: ({ content, filename }) => { const { outputText, sourceMapText } = ts.transpileModule(content, { fileName: filename, compilerOptions: { target: ts.ScriptTarget.ES2015, modu...
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/binding/_config.js
packages/svelte/tests/sourcemaps/samples/binding/_config.js
import { test } from '../../test'; export default test({ client: ['bar.baz'], server: ['bar.baz'] });
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/css-injected-map/_config.js
packages/svelte/tests/sourcemaps/samples/css-injected-map/_config.js
/** @import { Location } from 'locate-character' */ import MagicString from 'magic-string'; import { TraceMap, originalPositionFor } from '@jridgewell/trace-mapping'; import { test } from '../../test'; import { magic_string_preprocessor_result, magic_string_replace_all } from '../../helpers.js'; import { getLocator } f...
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
sveltejs/svelte
https://github.com/sveltejs/svelte/blob/b1f44c46c3336df55ee6ebe38225ad746841af70/packages/svelte/tests/sourcemaps/samples/markup/_config.js
packages/svelte/tests/sourcemaps/samples/markup/_config.js
import { test } from '../../test'; export default test({ skip: true, // TODO no source maps here; Svelte 4 added some for static templates due to https://github.com/sveltejs/svelte/issues/6092 client: [] });
javascript
MIT
b1f44c46c3336df55ee6ebe38225ad746841af70
2026-01-04T14:56:49.602508Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/scripts/deno.polyfill.js
scripts/deno.polyfill.js
import { createRequire } from 'node:module' import * as process from 'node:process' // prettier-ignore if (globalThis.Deno) { globalThis.require = createRequire(import.meta.url) globalThis.__filename = new URL(import.meta.url).pathname globalThis.__dirname = new URL('.', import.meta.url).pathname globalThis.mo...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/scripts/import-meta-url.polyfill.js
scripts/import-meta-url.polyfill.js
const import_meta_url = typeof document === 'undefined' ? new (require('url').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src) || new URL('main.js', document.baseURI).href
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/test/index.test.js
test/index.test.js
// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/test/deps.test.js
test/deps.test.js
// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/test/global.test.js
test/global.test.js
// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/test/util.test.js
test/util.test.js
// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/test/vendor.test.js
test/vendor.test.js
// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/test/cli.test.js
test/cli.test.js
// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/test/export.test.js
test/export.test.js
// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
true
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/test/extra.test.js
test/extra.test.js
// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/test/core.test.js
test/core.test.js
// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
true
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/test/all.test.js
test/all.test.js
// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/test/fixtures/js-project/script.js
test/fixtures/js-project/script.js
// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/test/smoke/deno.test.js
test/smoke/deno.test.js
// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/test/smoke/win32.test.js
test/smoke/win32.test.js
// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/test/smoke/bun.test.js
test/smoke/bun.test.js
// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/test/it/build-dcr.test.js
test/it/build-dcr.test.js
// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/test/it/build-npm.test.js
test/it/build-npm.test.js
// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/test/it/build-jsr.test.js
test/it/build-jsr.test.js
// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/build/core.js
build/core.js
"use strict"; import "./deno.js" import * as __module__ from "./core.cjs" const { $, Fail, ProcessOutput, ProcessPromise, bus, cd, chalk, defaults, kill, log, os, path, ps, quote, quotePowerShell, resolveDefaults, syncProcessCwd, useBash, usePowerShell, usePwsh, which, within...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/build/cli.js
build/cli.js
#!/usr/bin/env node "use strict"; import "./deno.js" import * as __module__ from "./cli.cjs" const { argv, injectGlobalRequire, isMain, main, normalizeExt, printUsage, transformMarkdown } = globalThis.Deno ? globalThis.require("./cli.cjs") : __module__ export { argv, injectGlobalRequire, isMain, m...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/build/index.js
build/index.js
"use strict"; import "./deno.js" import * as __module__ from "./index.cjs" const { MAML, VERSION, YAML, argv, dotenv, echo, expBackoff, fetch, fs, glob, globby, minimist, nothrow, parseArgv, question, quiet, retry, sleep, spinner, stdin, tempdir, tempfile, tmpdir, tmpfile...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/build/deno.js
build/deno.js
import { createRequire } from 'node:module' import * as process from 'node:process' // prettier-ignore if (globalThis.Deno) { globalThis.require = createRequire(import.meta.url) globalThis.__filename = new URL(import.meta.url).pathname globalThis.__dirname = new URL('.', import.meta.url).pathname globalThis.mo...
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/build/globals.js
build/globals.js
"use strict"; import "./deno.js" import * as __module__ from "./globals.cjs" const { } = globalThis.Deno ? globalThis.require("./globals.cjs") : __module__ export { }
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
google/zx
https://github.com/google/zx/blob/b175afdf07157458236e91685759abfd09977877/docs/.vitepress/theme/index.js
docs/.vitepress/theme/index.js
import DefaultTheme from 'vitepress/theme' import MyLayout from './MyLayout.vue' import './custom.css' export default { ...DefaultTheme, // override the Layout with a wrapper component that // injects the slots Layout: MyLayout, }
javascript
Apache-2.0
b175afdf07157458236e91685759abfd09977877
2026-01-04T14:58:17.290363Z
false
LeCoupa/awesome-cheatsheets
https://github.com/LeCoupa/awesome-cheatsheets/blob/8249479622d47f7b0ad6ba0f2258cb49e96cbd73/commitlint.config.js
commitlint.config.js
module.exports = {extends: ['@commitlint/config-conventional']}
javascript
MIT
8249479622d47f7b0ad6ba0f2258cb49e96cbd73
2026-01-04T14:58:12.677263Z
false
LeCoupa/awesome-cheatsheets
https://github.com/LeCoupa/awesome-cheatsheets/blob/8249479622d47f7b0ad6ba0f2258cb49e96cbd73/tools/elasticsearch.js
tools/elasticsearch.js
/* ******************************************************************************************* * ELASTICSEARCH * https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html * https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html * *****************************...
javascript
MIT
8249479622d47f7b0ad6ba0f2258cb49e96cbd73
2026-01-04T14:58:12.677263Z
false
LeCoupa/awesome-cheatsheets
https://github.com/LeCoupa/awesome-cheatsheets/blob/8249479622d47f7b0ad6ba0f2258cb49e96cbd73/tools/puppeteer.js
tools/puppeteer.js
/* ******************************************************************************************* * PUPPETEER * https://pptr.dev/ * ******************************************************************************************* */ // When you install Puppeteer, it downloads a recent version of Chromium (~170MB Mac, ~282M...
javascript
MIT
8249479622d47f7b0ad6ba0f2258cb49e96cbd73
2026-01-04T14:58:12.677263Z
true
LeCoupa/awesome-cheatsheets
https://github.com/LeCoupa/awesome-cheatsheets/blob/8249479622d47f7b0ad6ba0f2258cb49e96cbd73/languages/javascript.js
languages/javascript.js
/* ******************************************************************************************* * GLOBAL OBJECTS > OBJECT * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object * ******************************************************************************************* */ // Globa...
javascript
MIT
8249479622d47f7b0ad6ba0f2258cb49e96cbd73
2026-01-04T14:58:12.677263Z
false
LeCoupa/awesome-cheatsheets
https://github.com/LeCoupa/awesome-cheatsheets/blob/8249479622d47f7b0ad6ba0f2258cb49e96cbd73/backend/express.js
backend/express.js
/* ******************************************************************************************* * API * http://expressjs.com/en/api.html * ******************************************************************************************* */ `npm i express --save` or`yarn add -D express``(-D saves it as a dev dependency)` `y...
javascript
MIT
8249479622d47f7b0ad6ba0f2258cb49e96cbd73
2026-01-04T14:58:12.677263Z
false
LeCoupa/awesome-cheatsheets
https://github.com/LeCoupa/awesome-cheatsheets/blob/8249479622d47f7b0ad6ba0f2258cb49e96cbd73/backend/sails.js
backend/sails.js
/******************************************************************************************** * SAILS.JS CHEATSHEET * REFERENCE: https://sailsjs.com/documentation/reference * CONCEPTS: https://sailsjs.com/documentation/concepts * APP STRUCTURE: https://sailsjs.com/documentation/anatomy * * 1. APPLICATION * 2. BL...
javascript
MIT
8249479622d47f7b0ad6ba0f2258cb49e96cbd73
2026-01-04T14:58:12.677263Z
false
LeCoupa/awesome-cheatsheets
https://github.com/LeCoupa/awesome-cheatsheets/blob/8249479622d47f7b0ad6ba0f2258cb49e96cbd73/backend/moleculer.js
backend/moleculer.js
/* ******************************************************************************************* * MOLECULER MICROSERVICES FRAMEWORK - CORE CHEATSHEET * http://moleculer.services/0.12/docs/ * * Version: 0.12.x * ******************************************************************************************* */ /* *****...
javascript
MIT
8249479622d47f7b0ad6ba0f2258cb49e96cbd73
2026-01-04T14:58:12.677263Z
false
LeCoupa/awesome-cheatsheets
https://github.com/LeCoupa/awesome-cheatsheets/blob/8249479622d47f7b0ad6ba0f2258cb49e96cbd73/backend/node.js
backend/node.js
/* ******************************************************************************************* * SYNOPSIS * http://nodejs.org/api/synopsis.html * ******************************************************************************************* */ var http = require('http'); // An example of a web server written with No...
javascript
MIT
8249479622d47f7b0ad6ba0f2258cb49e96cbd73
2026-01-04T14:58:12.677263Z
true
LeCoupa/awesome-cheatsheets
https://github.com/LeCoupa/awesome-cheatsheets/blob/8249479622d47f7b0ad6ba0f2258cb49e96cbd73/backend/feathers.js
backend/feathers.js
/* ******************************************************************************************* * FEATHERS.JS CHEATSHEET * https://docs.feathersjs.com/api/readme.html * * 1. CORE: Feathers core functionality. * 2. TRANSPORT: Expose a Feathers application as an API server. * 3. CLIENT: More details on how to use F...
javascript
MIT
8249479622d47f7b0ad6ba0f2258cb49e96cbd73
2026-01-04T14:58:12.677263Z
false
LeCoupa/awesome-cheatsheets
https://github.com/LeCoupa/awesome-cheatsheets/blob/8249479622d47f7b0ad6ba0f2258cb49e96cbd73/backend/adonis.js
backend/adonis.js
/******************************************************************************************** * ADONIS CHEATSHEET * https://adonisjs.com/ ********************************************************************************************/ /***********************************************************************************...
javascript
MIT
8249479622d47f7b0ad6ba0f2258cb49e96cbd73
2026-01-04T14:58:12.677263Z
false
LeCoupa/awesome-cheatsheets
https://github.com/LeCoupa/awesome-cheatsheets/blob/8249479622d47f7b0ad6ba0f2258cb49e96cbd73/frontend/vue.js
frontend/vue.js
/* ******************************************************************************************* * GLOBAL CONFIG * Vue.config is an object containing Vue’s global configurations. * You can modify its properties listed below before bootstrapping your application. * https://vuejs.org/v2/api/#Global-Config * **********...
javascript
MIT
8249479622d47f7b0ad6ba0f2258cb49e96cbd73
2026-01-04T14:58:12.677263Z
true
LeCoupa/awesome-cheatsheets
https://github.com/LeCoupa/awesome-cheatsheets/blob/8249479622d47f7b0ad6ba0f2258cb49e96cbd73/frontend/angular.js
frontend/angular.js
/* ******************************************************************************************* * ANGULAR (2+) CHEATSHEET * BASED ON https://angular.io/guide/cheatsheet * DOCUMENTATION: https://angular.io/docs * STYLE GUIDE: https://angular.io/guide/styleguide * *****************************************************...
javascript
MIT
8249479622d47f7b0ad6ba0f2258cb49e96cbd73
2026-01-04T14:58:12.677263Z
false
LeCoupa/awesome-cheatsheets
https://github.com/LeCoupa/awesome-cheatsheets/blob/8249479622d47f7b0ad6ba0f2258cb49e96cbd73/frontend/react.js
frontend/react.js
/* ******************************************************************************************* * REACT.JS CHEATSHEET * DOCUMENTATION: https://reactjs.org/docs/ * FILE STRUCTURE: https://reactjs.org/docs/faq-structure.html * ******************************************************************************************* ...
javascript
MIT
8249479622d47f7b0ad6ba0f2258cb49e96cbd73
2026-01-04T14:58:12.677263Z
false
LeCoupa/awesome-cheatsheets
https://github.com/LeCoupa/awesome-cheatsheets/blob/8249479622d47f7b0ad6ba0f2258cb49e96cbd73/frontend/angularjs.js
frontend/angularjs.js
/* ******************************************************************************************* * ANGULARJS CHEATSHEET * API DOCUMENTATION: https://docs.angularjs.org/api * DEVELOPER GUIDE: https://docs.angularjs.org/guide * ERROR REFERENCE: https://docs.angularjs.org/error * ***************************************...
javascript
MIT
8249479622d47f7b0ad6ba0f2258cb49e96cbd73
2026-01-04T14:58:12.677263Z
false
LeCoupa/awesome-cheatsheets
https://github.com/LeCoupa/awesome-cheatsheets/blob/8249479622d47f7b0ad6ba0f2258cb49e96cbd73/frontend/ember.js
frontend/ember.js
/* * ----------------------- * Ember.js Cheatsheet * ----------------------- * * Docs: https://guides.emberjs.com/ * Quick start: https://guides.emberjs.com/current/getting-started/quick-start/ * * Table of contents * ------------------- * 01 | Installation * 02 | Ember CLI * 03 | Directory layo...
javascript
MIT
8249479622d47f7b0ad6ba0f2258cb49e96cbd73
2026-01-04T14:58:12.677263Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/ender.js
ender.js
$.ender({ moment: require('moment') })
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/moment.js
moment.js
//! moment.js //! version : 2.30.1 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com ;(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(fac...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
true
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/Gruntfile.js
Gruntfile.js
module.exports = function (grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), env: { sauceLabs: grunt.file.exists('.sauce-labs.creds') ? grunt.file.readJSON('.sauce-labs.creds') : {}, }, karma: { options: { ...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/package.js
package.js
var profile = { resourceTags: { ignore: function(filename, mid){ // only include moment/moment return mid != "moment/moment"; }, amd: function(filename, mid){ return /\.js$/.test(filename); } } };
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/scripts/locales.js
scripts/locales.js
var fs = require('fs'), path = require('path'), https = require('https'); var localeDir = path.join('src', 'locale'); var args = process.argv.slice(2); function help() { console.log(process.argv[1], '[list|mention|find-commenters] ARGS'); console.log(); console.log(' list show all authors...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/tasks/check_sauce_creds.js
tasks/check_sauce_creds.js
module.exports = function (grunt) { // Pull requests do not have secure variables enabled for security reasons. // Use this task before launching travis-sauce-browser task, so it would // exit early and won't try connecting to SauceLabs without credentials. grunt.registerTask('check-sauce-creds', functi...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/tasks/qtest.js
tasks/qtest.js
module.exports = function (grunt) { grunt.task.registerTask('qtest', 'run tests locally', function () { var done = this.async(), testrunner, tests; testrunner = require('node-qunit'); testrunner.options.log.assertions = false; testrunner.options.log.tests = f...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/tasks/nuget.js
tasks/nuget.js
module.exports = function (grunt) { // To set up on mac: // * brew install nuget # this fetches mono // * go to nuget.org, login, click on username (top right), copy api-key // from the bottom // * grunt nugetkey --key=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX // * grunt nuget-publish // //...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/tasks/bump_version.js
tasks/bump_version.js
module.exports = function (grunt) { grunt.registerTask('bump_version', function (version) { if (!version || version.split('.').length !== 3) { grunt.fail.fatal( 'malformed version. Use\n\n grunt bump_version:1.2.3' ); } grunt.config('string-replace...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/tasks/component.js
tasks/component.js
module.exports = function (grunt) { grunt.registerTask('component', function () { var config = JSON.parse(grunt.file.read('component.json')); config.files = grunt.file.expand('locale/*.js'); config.files.unshift('moment.js'); grunt.file.write( 'component.json', ...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/tasks/transpile.js
tasks/transpile.js
module.exports = function (grunt) { // var esperanto = require('esperanto'); var rollup = require('rollup').rollup; // var babel = require('rollup-plugin-babel'); var path = require('path'), Promise = require('es6-promise').Promise, TMP_DIR = 'build/tmp', headerCache = {}; f...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/tasks/update_index.js
tasks/update_index.js
module.exports = function (grunt) { grunt.config('copy.index-files', { expand: true, cwd: 'build/umd/', src: [ 'moment.js', 'locale/*.js', 'min/locales.js', 'min/moment-with-locales.js', 'min/tests.js', ], dest: '.',...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/benchmarks/isObjectEmpty.js
benchmarks/isObjectEmpty.js
var Benchmark = require('benchmark'), moment = require("./../moment.js"); var isObjectEmpty_getOwnPropertyNames = function(obj) { if (Object.getOwnPropertyNames) { return (Object.getOwnPropertyNames(obj).length === 0); } else { var k; for (k in obj) { if (obj.hasOwnPrope...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/benchmarks/fromDateUtc.js
benchmarks/fromDateUtc.js
var Benchmark = require('benchmark'), moment = require('./../moment.js'), base = new Date(); module.exports = { name: 'fromDateUtc', onComplete: function(){}, fn: function(){ moment.utc(base); }, async: true };
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/benchmarks/fromDate.js
benchmarks/fromDate.js
var Benchmark = require('benchmark'), moment = require('./../moment.js'), base = new Date(); module.exports = { name: 'fromDate', onComplete: function(){}, fn: function(){ moment(base); }, async: true };
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/benchmarks/compare.js
benchmarks/compare.js
var moment = require("./../moment.js"); var UNIT = 'date'; var NOW = Date.now(); var DIFF = -1 * 24 * 60 * 60 * 1e3 var THIS = moment(NOW); var INPUT = moment(NOW + DIFF); // For isBetween var FROM = moment(NOW + DIFF); var TO = moment(NOW + 2 * DIFF); function createTest(method) { return { fn: functio...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/benchmarks/subtract.js
benchmarks/subtract.js
var Benchmark = require('benchmark'), moment = require("./../moment.js"), base = moment('2013-05-25'); var unitsUnderTest = ["milliseconds", "seconds", "minutes", "hours", "days", "weeks", "months", "quarters", "years"]; var tests = unitsUnderTest.reduce(function (testsSoFar, unit) { testsSoFar["subtract "...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/benchmarks/clone.js
benchmarks/clone.js
var Benchmark = require('benchmark'), moment = require("./../moment.js"), base = moment('2013-05-25'); module.exports = { name: 'clone', onComplete: function(){}, fn: function(){base.clone();}, async: true };
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/benchmarks/makeDuration.js
benchmarks/makeDuration.js
var Benchmark = require('benchmark'), moment = require('./../moment.js'); module.exports = { name: 'makeDuration', onComplete: function(){}, fn: function(){ moment.duration(5, 'years'); }, async: true };
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/benchmarks/query.js
benchmarks/query.js
var Benchmark = require('benchmark'), moment = require("./../moment.js"), base = moment('2013-05-25'); module.exports = { name: 'clone', tests: { isBefore_true: { onComplete: function(){}, fn: function(){base.isBefore('2013-06-25');}, async: true }, ...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/benchmarks/endOf.js
benchmarks/endOf.js
var Benchmark = require('benchmark'), moment = require("./../moment.js"), base = moment('2013-05-25'); var unitsUnderTest = ["second", "minute", "hour", "date", "day", "isoWeek", "week", "month", "quarter", "year"]; var tests = unitsUnderTest.reduce(function (testsSoFar, unit) { testsSoFar["endOf " + unit]...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/benchmarks/zeroFill.js
benchmarks/zeroFill.js
var Benchmark = require('benchmark'); module.exports = { name: 'zeroFill', tests: { zeroFillMath: { setup: function() { var zeroFillMath = function(number, targetLength, forceSign) { var absNumber = '' + Math.abs(number), zerosToFill = targetLength - absNumber.length, ...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/benchmarks/set.js
benchmarks/set.js
var moment = require('./../moment.js') var base = moment('2013-05-25'); var value = 2; function createTest(unit) { return { fn: function () { base.set(unit, value); }, async: false }; } var units = ['second', 'minute', 'hour', 'date', 'day', 'isoWeek', 'week', 'month', 'quarter', 'year']; var...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/benchmarks/load-missing.js
benchmarks/load-missing.js
var Benchmark = require('benchmark'), moment = require("./../moment.js"); module.exports = { name: 'load missing locale', tests: [{ fn: function() { // falls back to en moment.locale('en-US'); }, async: true, }], };
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/benchmarks/startOf.js
benchmarks/startOf.js
var Benchmark = require('benchmark'), moment = require("./../moment.js"), base = moment('2013-05-25'); var unitsUnderTest = ["second", "minute", "hour", "date", "day", "isoWeek", "week", "month", "quarter", "year"]; var tests = unitsUnderTest.reduce(function (testsSoFar, unit) { testsSoFar["startOf " + uni...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/benchmarks/add.js
benchmarks/add.js
var Benchmark = require('benchmark'), moment = require("./../moment.js"), base = moment('2013-05-25'); var unitsUnderTest = ["milliseconds", "seconds", "minutes", "hours", "days", "weeks", "months", "quarters", "years"]; var tests = unitsUnderTest.reduce(function (testsSoFar, unit) { testsSoFar["add " + un...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/benchmarks/get.js
benchmarks/get.js
var moment = require('./../moment.js'); var base = moment('2013-05-25'); function createTest(unit) { return { fn: function () { base.get(unit); }, async: false }; } var units = ['second', 'minute', 'hour', 'date', 'day', 'isoWeek', 'week', 'month', 'quarter', 'year']; var tests = units.reduce...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/src/moment.js
src/moment.js
//! moment.js //! version : 2.30.1 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com import { hooks as moment, setHookCallback } from './lib/utils/hooks'; moment.version = '2.30.1'; import { min, max, now, isMoment, momentPrototype as fn, create...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/src/test/qunit.js
src/test/qunit.js
/*global QUnit:false*/ import moment from '../moment'; import { setupDeprecationHandler, teardownDeprecationHandler, } from './helpers/deprecation-handler'; export var test = QUnit.test, only = QUnit.only; export function module(name, lifecycle) { QUnit.module(name, { beforeEach: function () ...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/src/test/qunit-locale.js
src/test/qunit-locale.js
/*global QUnit:false*/ import moment from '../moment'; import { defineCommonLocaleTests } from './helpers/common-locale'; import { setupDeprecationHandler, teardownDeprecationHandler, } from './helpers/deprecation-handler'; import { test } from './qunit'; export function localeModule(name, lifecycle) { QU...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/src/test/helpers/deprecation-handler.js
src/test/helpers/deprecation-handler.js
import each from './each'; export function setupDeprecationHandler(test, moment, scope) { test._expectedDeprecations = null; test._observedDeprecations = null; test._oldSupress = moment.suppressDeprecationWarnings; moment.suppressDeprecationWarnings = true; test.expectedDeprecations = function () {...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/src/test/helpers/object-keys.js
src/test/helpers/object-keys.js
import hasOwnProp from './has-own-prop'; export default function objectKeys(obj) { if (Object.keys) { return Object.keys(obj); } else { // IE8 var res = [], i; for (i in obj) { if (hasOwnProp(obj, i)) { res.push(i); } }...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/src/test/helpers/each.js
src/test/helpers/each.js
function each(array, callback) { var i; for (i = 0; i < array.length; i++) { callback(array[i], i, array); } } export default each;
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/src/test/helpers/common-locale.js
src/test/helpers/common-locale.js
import { test } from '../qunit'; import eachOwnProp from './each-own-prop'; import moment from '../../moment'; export function defineCommonLocaleTests(locale, options) { test('lenient day of month ordinal parsing', function (assert) { var i, ordinalStr, testMoment; for (i = 1; i <= 31; ++i) { ...
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/src/test/helpers/has-own-prop.js
src/test/helpers/has-own-prop.js
export default function hasOwnProp(a, b) { return Object.prototype.hasOwnProperty.call(a, b); }
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false
moment/moment
https://github.com/moment/moment/blob/18aba135ab927ffe7f868ee09276979bed6993a6/src/test/helpers/each-own-prop.js
src/test/helpers/each-own-prop.js
import each from './each'; import objectKeys from './object-keys'; function eachOwnProp(object, callback) { each(objectKeys(object), callback); } export default eachOwnProp;
javascript
MIT
18aba135ab927ffe7f868ee09276979bed6993a6
2026-01-04T14:57:37.850382Z
false