sha256
stringlengths
64
64
language
stringclasses
25 values
size
int32
1
210k
lines
int32
1
9.41k
content
stringlengths
1
200k
6bb3e46964e9c4946049ae6e81bff1ccc3757be567b531609f61e77c40bc5693
JavaScript
3,361
134
'use strict'; const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; const ESCAPE_RE...
25a423eaf41f8dc6bc40cb28189a24e2d63b990ed72c824940bed55d0264ea6d
JavaScript
3,387
121
"use strict"; var Buffer = require("buffer").Buffer, Transform = require("stream").Transform; // == Exports ================================================================== module.exports = function(iconv) { // Additional Public API. iconv.encodeStream = function encodeStream(encoding, options) { ...
403a63ab9e6304a1c00443d7891a22eb1ef8357729d36a224d8f9ea393f5e93a
JavaScript
3,408
179
/** * negotiator * Copyright(c) 2012 Isaac Z. Schlueter * Copyright(c) 2014 Federico Romero * Copyright(c) 2014-2015 Douglas Christopher Wilson * MIT Licensed */ 'use strict'; /** * Module exports. * @public */ module.exports = preferredLanguages; module.exports.preferredLanguages = preferredLanguages; /**...
a31c9e6310d1f41e1bf4bedb48e2a6a404f725b1dcb6c00e69bcfd3c3c1cabb4
JavaScript
3,410
99
describe('#toBeResolvedTo', function() { it('passes if the promise is resolved to the expected value', function() { const matchersUtil = new privateUnderTest.MatchersUtil(); const matcher = privateUnderTest.asyncMatchers.toBeResolvedTo(matchersUtil); const actual = Promise.resolve({ foo: 42 }); retur...
9fd966ca2bb5b5235797a9dd08554d00f56630b65e0493650d0a5b9b941bb18f
JavaScript
3,418
87
describe('toBe', function() { it('passes with no message when actual === expected', function() { const matchersUtil = new privateUnderTest.MatchersUtil(); const matcher = privateUnderTest.matchers.toBe(matchersUtil); const result = matcher.compare(1, 1); expect(result.pass).toBe(true); }); it('pa...
7257cbcb8ab7b6d48f2042e8c2d726f4bd583bd35c4c86410d0130837f2e023d
JavaScript
3,425
133
getJasmineRequireObj().StackTrace = function(j$, private$) { 'use strict'; function StackTrace(error) { let lines = error.stack.split('\n'); const extractResult = extractMessage(error.message, lines); if (extractResult) { this.message = extractResult.message; lines = extractResult.remaind...
3a106ab116ac3c6f385d5265e166b8e1abddbb54aabe6d3685c74fed3fc32e9d
JavaScript
3,428
123
describe('The jasmine namespace', function() { it('includes all expected properties', function() { const actualKeys = new Set(Object.keys(jasmineUnderTest)); // toEqual doesn't generate diffs for set comparisons. Check this way // instead so we get readable failure output. expect(setDifference(expecte...
472088f65943e0f4f215e07ae128a4a7fe971325f23ae8870b09317dda912a85
JavaScript
3,452
124
getJasmineRequireObj().toBeRejectedWithError = function(j$, private$) { 'use strict'; /** * Expect a promise to be rejected with a value matched to the expected * @function * @async * @name async-matchers#toBeRejectedWithError * @since 3.5.0 * @param {Error} [expected] - `Error` constructor the o...
fd50ffbfefbc4ee196887cef70a298a80d70c58095110796a3f5f2000eb9b3b7
JavaScript
3,463
113
getJasmineHtmlRequireObj().SummaryTreeView = function(j$, private$) { 'use strict'; const { createDom, noExpectations } = private$.htmlReporterUtils; class SummaryTreeView { #urlBuilder; #filterSpecs; constructor(urlBuilder, filterSpecs) { this.#urlBuilder = urlBuilder; this.#filterSpec...
0b09645f3817469ba5d8b7047a54db6dd431586a2c670ea8d8c31c7880f1ef08
JavaScript
3,469
162
/*! * bytes * Copyright(c) 2012-2014 TJ Holowaychuk * Copyright(c) 2015 Jed Watson * MIT Licensed */ 'use strict'; /** * Module exports. * @public */ module.exports = bytes; module.exports.format = format; module.exports.parse = parse; /** * Module variables. * @private */ var formatThousandsRegExp = /\...
35421dc78d3c1b608922427bbd6e524518168621ff1a44919fc591ca297e813c
JavaScript
3,506
184
/** * negotiator * Copyright(c) 2012 Isaac Z. Schlueter * Copyright(c) 2014 Federico Romero * Copyright(c) 2014-2015 Douglas Christopher Wilson * MIT Licensed */ 'use strict'; /** * Module exports. * @public */ module.exports = preferredEncodings; module.exports.preferredEncodings = preferredEncodings; /**...
8afef584062e2c4a2008f8d193c5c17c34d964714916fa7ffbb36233e77fa76d
JavaScript
3,537
115
describe('toHaveSpyInteractions', function() { it('passes when there are spy interactions', function() { let matcher = privateUnderTest.matchers.toHaveSpyInteractions(); let spyObj = jasmineUnderTest .getEnv() .createSpyObj('NewClass', ['spyA', 'spyB']); spyObj.spyA(); let result = match...
5ac240a7f88ad5aa79115fddd7a82e2ef33025a50a378f94f4d53bcd52dff728
JavaScript
3,539
116
var path = require('path') var github = require('github-from-package') var home = require('os').homedir var crypto = require('crypto') var expandTemplate = require('expand-template')() function getDownloadUrl (opts) { var pkgName = opts.pkg.name.replace(/^@\w+\//, '') return expandTemplate(urlTemplate(opts), { ...
b3d1320c6169ffaa2596b08e48529eb526945089a569326cb898cdc50dad654b
JavaScript
3,539
99
module.exports = simpleGet const concat = require('simple-concat') const decompressResponse = require('decompress-response') // excluded from browser build const http = require('http') const https = require('https') const once = require('once') const querystring = require('querystring') const url = require('url') con...
bba45f602f9ec9d7e9e56049bcce00d9729acbe0b0b8b901f5b78933178fa028
JavaScript
3,562
137
const fs = require('fs'); const sass = require('sass'); const glob = require('glob'); const ejs = require('ejs'); const cssUrlEmbed = require('css-url-embed'); function buildDistribution() { compileSass(); embedCssAssets(); concatFiles(); } function embedCssAssets() { const cssPath = 'lib/jasmine-core/jasmine...
d8e1e03e6b3df304856951f35a794cbca21ee52d27ec82a3ef423f400391203a
JavaScript
3,574
8
/* * jQuery Navgoco Menus Plugin v0.2.1 (2014-04-11) * https://github.com/tefra/navgoco * * Copyright (c) 2014 Chris T (@tefra) * BSD - https://github.com/tefra/navgoco/blob/master/LICENSE-BSD */ !function(a){"use strict";var b=function(b,c,d){return this.el=b,this.$el=a(b),this.options=c,this.uuid=this.$el.attr(...
821d285e38d169367c2a789c33bbb8dca45842b485ae8ca7802221b7d177529b
JavaScript
3,659
130
var path = require('path') var fs = require('fs') var get = require('simple-get') var pump = require('pump') var tfs = require('tar-fs') var noop = Object.assign({ http: function () {}, silly: function () {} }, require('noop-logger')) var zlib = require('zlib') var util = require('./util') var error = require('./er...
0a3ccbaa63d6b12ffada6bd0b0fed6f2b2643049e37611758b8d8084cf732049
JavaScript
3,661
127
describe('Default Spy Strategy (Integration)', function() { let env; beforeEach(function() { env = new privateUnderTest.Env(); env.configure({ random: false }); }); afterEach(function() { env.cleanup_(); }); it('allows defining a default spy strategy', async function() { env.describe('sui...
8cfccaac306beb650d60c7f069ae0f4b39d648f1e3914696b18c133ab33e6419
JavaScript
3,663
188
/*! * mime-types * Copyright(c) 2014 Jonathan Ong * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */ 'use strict' /** * Module dependencies. * @private */ var db = require('mime-db') var extname = require('path').extname /** * Module variables. * @private */ var EXTRACT_TYPE_REGEXP = /^\s*...
b0314432e091ecc1f7095ac5f49c6705d5fb559b0c3fd22e2d750ef59e76fa24
JavaScript
3,686
196
/*! * on-finished * Copyright(c) 2013 Jonathan Ong * Copyright(c) 2014 Douglas Christopher Wilson * MIT Licensed */ 'use strict' /** * Module exports. * @public */ module.exports = onFinished module.exports.isFinished = isFinished /** * Module dependencies. * @private */ var first = require('ee-first') ...
1ac4ef3965dab61962f34d75be793a5ee36c7e57869b03773ee7ab56438fe355
JavaScript
3,691
140
getJasmineRequireObj().ExceptionFormatter = function(j$, private$) { 'use strict'; const ignoredProperties = [ 'name', 'message', 'stack', 'fileName', 'sourceURL', 'line', 'lineNumber', 'column', 'description', 'jasmineMessage', 'errors' ]; function ExceptionFormatt...
3a6960a56ce064192d7ccfe4645c92745ebfc6cdbbce29dc10350ebafa8ab022
JavaScript
3,693
115
'use strict' var objectAssign = require('object-assign') module.exports = function () { return ThemeSetProto.newThemeSet() } var ThemeSetProto = {} ThemeSetProto.baseTheme = require('./base-theme.js') ThemeSetProto.newTheme = function (parent, theme) { if (!theme) { theme = parent parent = this.baseThem...
a0345baae7b34784668fc38596d0a24babbf360dff5b9ff1441bf1215a0129e6
JavaScript
3,714
90
// https://github.com/ghiculescu/jekyll-table-of-contents // this library modified by fastai to: // - update the location.href with the correct anchor when a toc item is clicked on (function($){ $.fn.toc = function(options) { var defaults = { noBackToTopLinks: false, title: '', minimumHeaders: 3...
7028cca95b2f124345bd5b816e0d8184e7b7d208fe0aa76eb38df43e8644fd03
JavaScript
3,715
116
'use strict'; const codes = {}; function createErrorType(code, message, Base) { if (!Base) { Base = Error } function getMessage (arg1, arg2, arg3) { if (typeof message === 'string') { return message } else { return message(arg1, arg2, arg3) } } class NodeError extends Base { ...
80e30c51d0f9d70b3fc068b122331f04f45c7c8f80a587cec95006d955f03327
JavaScript
3,730
107
'use strict'; describe('PerformanceView', function() { it('shows specs ordered by execution time', function() { const stateBuilder = new privateUnderTest.ResultsStateBuilder(); stateBuilder.suiteStarted({}); stateBuilder.specDone({ fullName: 'spec A', duration: 2 }); stateBuilder.suit...
542ba0c81ed2852ba147751019da69d6942ee113b5229d2960049bbbb2d2fdd3
JavaScript
3,768
130
getJasmineHtmlRequireObj().Banner = function(j$, private$) { 'use strict'; const { createDom } = private$.htmlReporterUtils; class Banner { #navigateWithNewParam; constructor(navigateWithNewParam) { this.#navigateWithNewParam = navigateWithNewParam; this.rootEl = createDom( 'div', ...
0f29494d467c4b2b1f1086766a4d8f987ebdf85c6805e78c304a4e4b582663a9
JavaScript
3,781
131
describe('CompleteOnFirstErrorSkipPolicy', function() { describe('#skipTo', function() { describe('Before anything has errored', function() { it('returns the next index', function() { const policy = new privateUnderTest.CompleteOnFirstErrorSkipPolicy( arrayOfArbitraryFns(4), 4 ...
23a006c50b0527c8615ba8c35df5f0c09f5d90620e4d233869589eea87d3da3f
JavaScript
3,802
97
getJasmineRequireObj().ParallelReportDispatcher = function(j$, private$) { 'use strict'; /** * @class ParallelReportDispatcher * @implements Reporter * @classdesc A report dispatcher packaged for convenient use from outside jasmine-core. * * This is intended to help packages like `jasmine` (the Jasm...
c294cbd99cf5db146da186e3a5022ad40e29895fed4766f5998c85d1870de0b5
JavaScript
3,844
139
'use strict'; const stringWidth = require('string-width'); const chalk = require('chalk'); const widestLine = require('widest-line'); const cliBoxes = require('cli-boxes'); const camelCase = require('camelcase'); const ansiAlign = require('ansi-align'); const termSize = require('term-size'); const getObject = detail =...
ace40f43e54971b69b405346104c886868c8548095580a378c54057a78ac7a2e
JavaScript
3,846
142
var url = require('url') var base64 = require('./base64') var decodeBase64 = base64.decodeBase64 var encodeBase64 = base64.encodeBase64 var tokenKey = ':_authToken' var legacyTokenKey = ':_auth' var userKey = ':username' var passwordKey = ':_password' module.exports = function () { var checkUrl var options if ...
513ddf1f408b0ab7f0ccbb78491fb3a36c6e24a3fd00bb4ae0486e2e4cd645d7
JavaScript
3,877
127
var path = require('path') var github = require('github-from-package') var home = require('os').homedir var crypto = require('crypto') var expandTemplate = require('expand-template')() function getDownloadUrl (opts) { var pkgName = opts.pkg.name.replace(/^@\w+\//, '') return expandTemplate(urlTemplate(opts), { ...
61a96c9ad70f888cf3cdcb511118d150447ea3f14f7b7ba776a0e1cd70084dd7
JavaScript
3,894
181
/*! * body-parser * Copyright(c) 2014-2015 Douglas Christopher Wilson * MIT Licensed */ 'use strict' /** * Module dependencies. * @private */ var createError = require('http-errors') var getBody = require('raw-body') var iconv = require('iconv-lite') var onFinished = require('on-finished') var zlib = require(...
829eadd8a1a441d25be0cb93b00e16a0d0c20fd294db95d8f2ed87e6954b7182
JavaScript
3,932
150
'use strict' exports.byteLength = byteLength exports.toByteArray = toByteArray exports.fromByteArray = fromByteArray var lookup = [] var revLookup = [] var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' for (var i = 0, len = ...
503e6773f58a9fd05ac87be76b8fa88848dbc9800f09154f5191a6768bb687f8
JavaScript
3,938
165
'use strict'; const { Duplex } = require('stream'); /** * Emits the `'close'` event on a stream. * * @param {stream.Duplex} The stream. * @private */ function emitClose(stream) { stream.emit('close'); } /** * The listener of the `'end'` event. * * @private */ function duplexOnEnd() { if (!this.destroyed...
df0dbeaddd66465687a5b4c4ec28bdade1343e416cabefce7048565584571a2a
JavaScript
3,966
105
'use strict' function isArguments (thingy) { return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee') } var types = { '*': {label: 'any', check: function () { return true }}, A: {label: 'array', check: function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }}, S:...
4e39c62882fb815c8fe1931171e604470f3892ea5b517da69f26f3931a6514d4
JavaScript
3,977
143
const net = require('net'); const express = require('express'); const app = express(); const server = require('http').createServer(app); const io = require("socket.io")(server);//const io = require('socket.io').listen(server); const SerialPort = require("serialport"); const Readline = require('@serialport/parser-rea...
19362d0185d17d04b21cfe06129d33cc0d6684c4b4614dfcf5a979d0c797bf8c
JavaScript
3,996
166
getJasmineHtmlRequireObj().FailuresView = function(j$, private$) { 'use strict'; const { createDom } = private$.htmlReporterUtils; class FailuresView { #urlBuilder; #failureEls; #showing; constructor(urlBuilder) { this.#urlBuilder = urlBuilder; this.#failureEls = []; this.#sho...
84f07eea79feae4381f6b02ac863cb5eb603bef54c2e749a7887baabaa36d2a1
JavaScript
4,000
130
const path = require("path"); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const CssMinimizerPlugin = require("css-minimizer-webpack-plugin"); const HtmlWebpackPlugin = require("html-webpack-plugin"); // Assume production by default so that development is opt-in. const isProduction = process.env.NO...
fd17d6a92dd9ba004c85f8e364b2771af10d012a83766437447dbae63879fa6b
JavaScript
4,015
131
// Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modi...
7b3aa39bea0be25117f6d08ed828fd04bd10b7f2d556c4cfef51fcfa76be4370
JavaScript
4,037
198
/*! * cookie * Copyright(c) 2012-2014 Roman Shtylman * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */ 'use strict'; /** * Module exports. * @public */ exports.parse = parse; exports.serialize = serialize; /** * Module variables. * @private */ var decode = decodeURIComponent; var encode =...
7bd09bf0cdea7802036eb3969212a674b22b01b20530dd3fef292746edb0f0bb
JavaScript
4,061
151
describe('Custom Async Matchers (Integration)', function() { let env; beforeEach(function() { env = new privateUnderTest.Env(); env.configure({ random: false }); }); afterEach(function() { env.cleanup_(); }); it('passes the spec if the custom async matcher passes', async function() { env....
71123c36b57be519914997581b5abf5d0c0ea4b8a67bae29c0643194480bfbc7
JavaScript
4,071
120
describe('toHaveBeenCalledWith', function() { it('passes when the actual was called with matching parameters', function() { const matchersUtil = { contains: jasmine.createSpy('delegated-contains').and.returnValue(true), equals: jasmine.createSpy('delegated-equals').and.returnValue(true), pp: pri...
7cfd008fe13488830adfe6953df6916a6e5350acdbd03275901bbf302affd8ea
JavaScript
4,076
202
/*! * cookie * Copyright(c) 2012-2014 Roman Shtylman * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */ 'use strict'; /** * Module exports. * @public */ exports.parse = parse; exports.serialize = serialize; /** * Module variables. * @private */ var decode = decodeURIComponent; var encode =...
b9ccc2e42e309e1f35e056d82544685f73556ee2f71e594f900d4846442f6255
JavaScript
4,124
163
// Note: since nyc uses this module to output coverage, any lines // that are in the direct sync flow of nyc's outputCoverage are // ignored, since we can never get coverage for them. var assert = require('assert') var signals = require('./signals.js') var isWin = /^win/i.test(process.platform) var EE = require('event...
d3f197d370760ddd8753c1355b4bdb585a787f1baa92bb8ed217f170c138b594
JavaScript
4,139
163
'use strict'; const wrapAnsi16 = (fn, offset) => (...args) => { const code = fn(...args); return `\u001B[${code + offset}m`; }; const wrapAnsi256 = (fn, offset) => (...args) => { const code = fn(...args); return `\u001B[${38 + offset};5;${code}m`; }; const wrapAnsi16m = (fn, offset) => (...args) => { const rgb ...
955489d45ded1b7e0f26b01ac6a1dc0e017766ec920098234ec80584598274c4
JavaScript
4,149
216
/*! * express * Copyright(c) 2009-2013 TJ Holowaychuk * Copyright(c) 2013 Roman Shtylman * Copyright(c) 2014-2015 Douglas Christopher Wilson * MIT Licensed */ 'use strict'; /** * Module dependencies. * @private */ var debug = require('debug')('express:router:route'); var flatten = require('array-flatten'); ...
9ee749edd691cdb33f5867376ac29bd018afd09fa9b125b17aa2622ddd37aa62
JavaScript
4,156
146
var path = require('path') var fs = require('fs') var get = require('simple-get') var pump = require('pump') var tfs = require('tar-fs') var noop = Object.assign({ http: function () {}, silly: function () {} }, require('noop-logger')) var zlib = require('zlib') var util = require('./util') var error = require('./er...
c32ee9fd9dfd0ad0448a8a9eb70725d672a42f430bb715480c8d0ccdc42b95d6
JavaScript
4,158
138
describe('toHaveSize', function() { 'use strict'; it('passes for an array whose length matches', function() { const matcher = privateUnderTest.matchers.toHaveSize(); const result = matcher.compare([1, 2], 2); expect(result.pass).toBe(true); }); it('fails for an array whose length does not match',...
addc4644c765f855776989db5e0efe7ce98cce9eac43eec287e5757fd68a5149
JavaScript
4,193
119
describe('Custom Spy Strategies (Integration)', function() { let env; beforeEach(function() { env = new privateUnderTest.Env(); env.configure({ random: false }); }); afterEach(function() { env.cleanup_(); }); it('allows adding more strategies local to a suite', async function() { const pl...
346033597378d23e59068d120d6257f7cd85ae88c40b1f85c3329cece0d119c4
JavaScript
4,197
127
'use strict'; function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } var codes = {}; function createErrorType(code, message, Base) { if (!Base) { Base = Error; } function getMes...
09e97d64adf780fbea96f7405e00d445caa9615d1dd5d96ebf7b1fce6b29c2b4
JavaScript
4,204
115
describe('SetContaining', function() { it('matches any actual set to an empty set', function() { const actualSet = new Set(['foo', 'bar']); const containing = new privateUnderTest.SetContaining(new Set()); expect(containing.asymmetricMatch(actualSet)).toBe(true); }); it('matches when all the values ...
5733f654e511732616b481ab712f1dd06b1143fe3dfdf5660e6a6717420e3221
JavaScript
4,208
178
var parse = require('../'); var test = require('tape'); test('flag boolean default false', function (t) { var argv = parse(['moo'], { boolean: ['t', 'verbose'], default: { verbose: false, t: false } }); t.deepEqual(argv, { verbose: false, t: false, _: ['moo'] ...
c3584d8812b48bb670cd038403f957d6f0afd864ebeb03514ee1df9ef34391b6
JavaScript
4,231
145
try { var session = window.sessionStorage || {}; } catch (e) { var session = {}; } window.addEventListener("DOMContentLoaded", () => { const allTabs = document.querySelectorAll('.sphinx-tabs-tab'); const tabLists = document.querySelectorAll('[role="tablist"]'); allTabs.forEach(tab => { tab.addEventListe...
1b936a5b42c937e87b814133fa0d8492c7e808f9b510362abbf1f8ed64710023
JavaScript
4,234
159
getJasmineRequireObj().RunableResources = function(j$, private$) { 'use strict'; class RunableResources { constructor(options) { this.byRunableId_ = {}; this.getCurrentRunableId_ = options.getCurrentRunableId; this.globalErrors_ = options.globalErrors; this.spyFactory = new private$.Sp...
529b285703d29b8ab31ead64bd1f64146bac12147cc09ceb4b25f0db87a12c96
JavaScript
4,275
167
'use strict' const fs = require('fs') const path = require('path') /* istanbul ignore next */ const LCHOWN = fs.lchown ? 'lchown' : 'chown' /* istanbul ignore next */ const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync' /* istanbul ignore next */ const needEISDIRHandled = fs.lchown && !process.version.matc...
480a2c7377252c14a11bca4d3a49dfa16ea540a998fa637fae0189aee1b89113
JavaScript
4,289
123
/* Compatability shim for jQuery and underscores.js. * * Copyright Sphinx contributors * Released under the two clause BSD licence */ /** * small helper function to urldecode strings * * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parame...
87aadac5b3cc8081b570a243c17c575c195c4ae642e98834495291fa626ed9d6
JavaScript
4,293
150
/*! * @description Recursive object extending * @author Viacheslav Lotsmanov <lotsmanov89@gmail.com> * @license MIT * * The MIT License (MIT) * * Copyright (c) 2013-2018 Viacheslav Lotsmanov * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated docu...
2992c09df91826a8d33e3b48b645ee77e457adcf7c712d776a814e1e2c448b43
JavaScript
4,322
149
/* * Base JavaScript utilities for all Sphinx HTML documentation. */ "use strict"; const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ "TEXTAREA", "INPUT", "SELECT", "BUTTON", ]); const _ready = (callback) => { if (document.readyState !== "loading") { callback(); } else { document.addEventListene...
6b2524c2723cc6e06cbf056e0b2861d50ba8fdd082ece13378bfb45d7a090528
JavaScript
4,332
150
/* * Base JavaScript utilities for all Sphinx HTML documentation. */ "use strict"; const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ "TEXTAREA", "INPUT", "SELECT", "BUTTON", ]); const _ready = (callback) => { if (document.readyState !== "loading") { callback(); } else { document.addEventListene...
fb9ab024d828ab95c3435fd886ed9e96318a10fb672f6e597c45fd1791291b21
JavaScript
4,336
157
getJasmineRequireObj().StackClearer = function(j$, private$) { 'use strict'; const maxInlineCallCount = 10; // 25ms gives a good balance of speed and UI responsiveness when running // jasmine-core's own tests in Safari 18. The exact value isn't critical. const safariYieldIntervalMs = 25; function browserQ...
1d6919a70598b8faf4502a2dc8dd3bfb152dbfa2cdcb994d5a2ba3054fb110f2
JavaScript
4,370
149
var net = require('net'), spawn = require('child_process').spawn, event = require('events').EventEmitter; function Port(options){ if (!(this instanceof Port)) return new Port(options); this.setOptions(options); } Port.prototype = Object.create(event.prototype); Port.prototype.setOptions = function(options){ ...
159b0e1f2fbbb1c5b10c63a0685e3360e11060a65ddeaefecadbbb2e548f21e9
JavaScript
4,375
170
'use strict'; const stringify = require('./lib/stringify'); const compile = require('./lib/compile'); const expand = require('./lib/expand'); const parse = require('./lib/parse'); /** * Expand the given pattern or create a regex-compatible string. * * ```js * const braces = require('braces'); * console.log(brace...
42ce43b31867e2e76aaba1fcd37f3302cb5e8baa3a31675ebc6bbc8767e7ed43
JavaScript
4,388
142
describe('MismatchTree', function() { describe('#add', function() { describe('When the path is empty', function() { it('flags the root node as mismatched', function() { const tree = new privateUnderTest.MismatchTree(); tree.add(new privateUnderTest.ObjectPath([])); expect(tree.isMism...
d8d1c1d6c387ab67c3f28d78fd0b20b9becd69442db9d3efe110ca464b509c8a
JavaScript
4,394
202
/** * This is the common logic for both the Node.js and web browser * implementations of `debug()`. * * Expose `debug()` as the module. */ exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; exports.coerce = coerce; exports.disable = disable; exports.enable = enable; exports.enab...
6bad3e83c4a8f113cfc40ef2757ecbc727e67c5e16ea8447cdc6e12af2b1554a
JavaScript
4,396
184
'use strict'; /** * Class representing an event. * * @private */ class Event { /** * Create a new `Event`. * * @param {String} type The name of the event * @param {Object} target A reference to the target to which the event was * dispatched */ constructor(type, target) { this.target =...
c3d976062b770b4a88c91d244557bbe9a828b55dc2de1f9ac85c2d5e909389c4
JavaScript
4,399
139
// Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modi...
45368bfe11080c4504b7804602015d93873303c5b13d5710af6c42e9abc35b4a
JavaScript
4,412
138
/** * @preserve * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) * * @author <a href="mailto:jensyt@gmail.com">Jens Taylor</a> * @see http://github.com/homebrewing/brauhaus-diff * @author <a href="mailto:gary.court@gmail.com">Gary Court</a> * @see http://github.com/garycourt/murmurhash-...
6c360c37e9dc1d14f41e35efdc66b707a56f069e24414307c76e74c7bd505702
JavaScript
4,415
177
"use strict"; /** * Module dependencies. */ var tty = require('tty'); var util = require('util'); /** * This is the Node.js implementation of `debug()`. */ exports.init = init; exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; /** * Col...
bb3b16b2289678ee1a73da3dcf4499ef5f150f135612a4c36a18b4d3d9f5714e
JavaScript
4,415
155
const fs = require('node:fs'); const path = require('node:path'); const os = require('node:os'); const child_process = require('node:child_process'); describe('npm package', function() { beforeAll(function() { const packOutput = child_process.execSync('npm pack', { encoding: 'utf8', stdio: ['pipe', '...
366f20fffb876e969ae4c11a4ff19a43bca656eaccabf647afb348602f17fc62
JavaScript
4,421
160
'use strict'; const net = require('net'); class TimeoutError extends Error { constructor(threshold, event) { super(`Timeout awaiting '${event}' for ${threshold}ms`); this.name = 'TimeoutError'; this.code = 'ETIMEDOUT'; this.event = event; } } const reentry = Symbol('reentry'); const noop = () => {}; modul...
41521e81e12549e883a68fee6c9530c06e72df2ac293eda9abe9fa96a2449ce0
JavaScript
4,441
118
describe('ExpectationFilterChain', function() { describe('#addFilter', function() { it('returns a new filter chain with the added filter', function() { const first = jasmine.createSpy('first'); const second = jasmine.createSpy('second'); const orig = new privateUnderTest.ExpectationFilterChain({...
62e99d2d2b35b08df788f855f735c70eed58722f43059b50b97dfb950aafdfce
JavaScript
4,448
179
'use strict'; const path = require('path'); const WIN_SLASH = '\\\\/'; const WIN_NO_SLASH = `[^${WIN_SLASH}]`; /** * Posix glob regex */ const DOT_LITERAL = '\\.'; const PLUS_LITERAL = '\\+'; const QMARK_LITERAL = '\\?'; const SLASH_LITERAL = '\\/'; const ONE_CHAR = '(?=.)'; const QMARK = '[^/]'; const END_ANCHOR ...
cbfef84ddda0caea27b76c6d03ac84f008353d4f177b95c92428f874f9b8ba90
JavaScript
4,462
123
class exp_SceneManager { scene = null; // Results results = { userName: userName, // User name startDatetime: [], // Measurement start time endDatetime: [], // Measurement...
4a2e466dd234a5b75e76f95e6aacd5df9f9818727409804f80ffe18b0907d101
JavaScript
4,465
152
'use strict' module.exports = { "aliceblue": [240, 248, 255], "antiquewhite": [250, 235, 215], "aqua": [0, 255, 255], "aquamarine": [127, 255, 212], "azure": [240, 255, 255], "beige": [245, 245, 220], "bisque": [255, 228, 196], "black": [0, 0, 0], "blanchedalmond": [255, 235, 205], "blue": [0, 0, 255], "blu...
12d5ede3177c07962e462baf1facbad4c011417e4ccebf770ecb76d4a6b0438c
JavaScript
4,499
143
// POST dictionary-style data from JavaScript to Django function post(path, params, method='post') { // Function to ask for parameters of new episode // first create a hidden form: let form = document.getElementById('request'); form.method = method; form.action = path; // Pass all parameters nee...
112794905f562466485347a14dbaaa0f84dbed97b86c40b4a1268b26901281f5
JavaScript
4,514
162
describe('Support for parallel execution', function() { let env; beforeEach(function() { env = new privateUnderTest.Env(); }); afterEach(function() { env.cleanup_(); }); it('removes specs and suites from previous batches', async function() { env.describe('a suite', function() { env.it('...
6f8dac195a9a083aa5af489b16266eb3d15bad4c1e45c283ff2eb51c301d42e7
JavaScript
4,530
116
'use strict'; { const SelectBox = { cache: {}, init: function(id) { const box = document.getElementById(id); SelectBox.cache[id] = []; const cache = SelectBox.cache[id]; for (const node of box.options) { cache.push({value: node.value, t...
768d6407e86ba974e7b8a0e79625e76a932b1f2503207c87f871fcf98be21b1e
JavaScript
4,570
210
/*! * serve-static * Copyright(c) 2010 Sencha Inc. * Copyright(c) 2011 TJ Holowaychuk * Copyright(c) 2014-2016 Douglas Christopher Wilson * MIT Licensed */ 'use strict' /** * Module dependencies. * @private */ var encodeUrl = require('encodeurl') var escapeHtml = require('escape-html') var parseUrl = requir...
3bc311563b7fc5e80fcab2f8629774bf3cb6b30202000df36dff8e695a9023b7
JavaScript
4,598
192
/* * This script contains the language-specific data used by searchtools.js, * namely the list of stopwords, stemmer, scorer and splitter. */ var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their...
3e54acabcc5365e3489039a478d7d64cf1e245dfc7b3f0a1229b67af7499cbb2
JavaScript
4,606
197
var parse = require('../'); var test = require('tape'); test('parse args', function (t) { t.deepEqual( parse([ '--no-moo' ]), { moo : false, _ : [] }, 'no' ); t.deepEqual( parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), { v : ['a','b','c'], _ : [] }, 'multi' ...
2cc9e61e214526e29cac2df0a45db7b26299df5d40278f556ff1cef6e6be6b67
JavaScript
4,609
182
getJasmineRequireObj().SpyStrategy = function(j$, private$) { 'use strict'; /** * @interface SpyStrategy */ function SpyStrategy(options) { options = options || {}; /** * Get the identifying information for the spy. * @name SpyStrategy#identity * @since 3.0.0 * @member * @...
2d9525124e683f866d99ab719764ddf758eb5685561b46c7f370da02cbaa0d89
JavaScript
4,617
131
describe('toHaveBeenCalledBefore', function() { it('throws an exception when the actual is not a spy', function() { const matcher = privateUnderTest.matchers.toHaveBeenCalledBefore({ pp: privateUnderTest.makePrettyPrinter() }); const fn = function() {}; const spy = new privateUnderTest.Env().cre...
4cda764e7c9ec3e806d57fa42ff653d2293f31d6829d3d65363a822bd90137bc
JavaScript
4,671
98
getJasmineRequireObj().reporterEvents = function(j$, private$) { 'use strict'; /** * Used to tell Jasmine what optional or uncommonly implemented features * the reporter supports. If not specified, the defaults described in * {@link ReporterCapabilities} will apply. * @name Reporter#reporterCapabilitie...
f237adcb52849de7c128f57e0468b52353c529a6c8341810477c0e7144359559
JavaScript
4,685
263
/** * Module dependencies. */ const tty = require('tty'); const util = require('util'); /** * This is the Node.js implementation of `debug()`. */ exports.init = init; exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.destroy = uti...
3116c986bff5d0b3a0d9ee1700d97ac466965a7b30d353300d408b41622604c2
JavaScript
4,686
174
"use strict"; // Manually added data to be used by sbcs codec in addition to generated one. module.exports = { // Not supported by iconv, not sure why. "10029": "maccenteuro", "maccenteuro": { "type": "_sbcs", "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ...
a3ed56435cbd4b3f07a80c4a343edd86d787f89bf2cee0105bdf68cb653ba2a0
JavaScript
4,717
174
#!/usr/bin/env node // Standalone semver comparison program. // Exits successfully and prints matching version(s) if // any supplied version is valid and passes all tests. var argv = process.argv.slice(2) var versions = [] var range = [] var inc = null var version = require('../package.json').version var loose = ...
0144ab6a52b9330c567de11a5c3a4aea35cdac47a4c106482aa24ae8054cdc6f
JavaScript
4,734
185
/** * This is the web browser implementation of `debug()`. * * Expose `debug()` as the module. */ exports = module.exports = require('./debug'); exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.storage = 'undefined' != typeof chrom...
6bf9eee39229aa68ac3e6a71177c387c8321eff1f83242a35f3e7c35cb9eec1b
JavaScript
4,792
201
var concatMap = require('concat-map'); var balanced = require('balanced-match'); module.exports = expandTop; var escSlash = '\0SLASH'+Math.random()+'\0'; var escOpen = '\0OPEN'+Math.random()+'\0'; var escClose = '\0CLOSE'+Math.random()+'\0'; var escComma = '\0COMMA'+Math.random()+'\0'; var escPeriod = '\0PERIOD'+Math...
85ffe59d050974725c044a0cead644db76f4bffe823753723670244b90629c5b
JavaScript
4,809
222
/*! * content-type * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */ 'use strict' /** * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1 * * parameter = token "=" ( token / quoted-string ) * token = 1*tchar * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" * ...
711a9b895ac6d92e747ec2b68042eff1f126c837a545d24e53530657b2aec74e
JavaScript
4,829
171
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Adapter = void 0; const events_1 = require("events"); class Adapter extends events_1.EventEmitter { /** * In-memory adapter constructor. * * @param {Namespace} nsp */ constructor(nsp) { super(); ...
a34efbd3438dcd0a0060b4bda8ea75acaec3ae2b1a49460e25af950d15562276
JavaScript
4,918
230
/*! * body-parser * Copyright(c) 2014 Jonathan Ong * Copyright(c) 2014-2015 Douglas Christopher Wilson * MIT Licensed */ 'use strict' /** * Module dependencies. * @private */ var bytes = require('bytes') var contentType = require('content-type') var createError = require('http-errors') var debug = require('d...
b7a1211d22552e94b41d883092b78262a26e28004c5e153d8c25a1f75d174a90
JavaScript
4,936
122
describe('toHaveBeenCalledOnceWith', function() { it('passes when the actual was called only once and with matching parameters', function() { const pp = privateUnderTest.makePrettyPrinter(); const util = new privateUnderTest.MatchersUtil({ pp: pp }); const matcher = privateUnderTest.matchers.toHaveBeenCal...
1d458cdfd14f02066f8ddacb7bd764464cdc3b519231d68ceeacf2b995a49466
JavaScript
4,947
151
describe('toBeCloseTo', function() { it('passes when within two decimal places by default', function() { const matcher = privateUnderTest.matchers.toBeCloseTo(); let result; result = matcher.compare(0, 0); expect(result.pass).toBe(true); result = matcher.compare(0, 0.001); expect(result.pass...
54ab2a07998e9efc1f79667ee52650479f22e6d6f2bd3bb9c629b1426f5b1906
JavaScript
4,976
206
exports.parse = exports.decode = decode exports.stringify = exports.encode = encode exports.safe = safe exports.unsafe = unsafe var eol = typeof process !== 'undefined' && process.platform === 'win32' ? '\r\n' : '\n' function encode (obj, opt) { var children = [] var out = '' if (typeof opt === 'string') {...
7585bb294c2a356068e8ff148cdbf566e3156e20429f2365e2c967a4dfaee963
JavaScript
5,007
154
describe('toHaveNoOtherSpyInteractions', function() { it('passes when there are no spy interactions', function() { let matcher = privateUnderTest.matchers.toHaveNoOtherSpyInteractions(); let spyObj = jasmineUnderTest .getEnv() .createSpyObj('NewClass', ['spyA', 'spyB']); let result = matcher....
baf708be438edf0fef70a3e34619c6be94cd53d963acb9b2542419d5fc3bb8c8
JavaScript
5,011
177
"use strict"; var Buffer = require("safer-buffer").Buffer; // Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js // == UTF16-BE codec. ========================================================== exports.utf16be = Utf16BECodec; function Utf16BECodec() { } Utf16BECodec.prototype.encoder = Utf1...
536ad2d746e944c5570cc15badaeccc3c0582a1b66e45511fe4edce32b6da510
JavaScript
5,023
1
!function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.d...
b09215a39073b67ccca59eb9501865d017e0d45196536e4a11653798ec6aae11
JavaScript
5,038
224
'use strict' const EE = require('events').EventEmitter const cons = require('constants') const fs = require('fs') module.exports = (f, options, cb) => { if (typeof options === 'function') cb = options, options = {} const p = new Promise((res, rej) => { new Touch(validOpts(options, f, null)) .on('do...
af981743e8a8e31abf3a608b02ade0fe0c07cf04b291ae7658a502e506370077
JavaScript
5,061
206
exports.parse = exports.decode = decode exports.stringify = exports.encode = encode exports.safe = safe exports.unsafe = unsafe var eol = typeof process !== 'undefined' && process.platform === 'win32' ? '\r\n' : '\n' function encode (obj, opt) { var children = [] var out = '' if (typeof opt === 'string') {...
bdab610f30f97bdb20b9cf79d39927186dffaa524abc952d3e6831aa8f6777ed
JavaScript
5,096
136
'use strict'; var test = require('tape'); var inspect = require('object-inspect'); var SaferBuffer = require('safer-buffer').Buffer; var forEach = require('for-each'); var utils = require('../lib/utils'); test('merge()', function (t) { t.deepEqual(utils.merge(null, true), [null, true], 'merges true into null'); ...