sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
5f946156c726aa6f243ba7beff93ce352120bf374864d39dce551469b9f414d5
JavaScript
818
34
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var _exportNames = { equals: true, isA: true }; Object.defineProperty(exports, 'equals', { enumerable: true, get: function () { return _jasmineUtils.equals; } }); Object.defineProperty(exports, 'isA', { enumerable: true, g...
b5efc48a9ccc907c4492ce5daa63d3ca4b0b4ca2dfa61f2415fb806c0da6fe19
JavaScript
819
27
/*! * Chai - getOwnEnumerablePropertySymbols utility * Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /** * ### .getOwnEnumerablePropertySymbols(object) * * This allows the retrieval of directly-owned enumerable property symbols of an * object. This function is necessary because ...
22ecef4ef40aa9689ba0d42826aece097f14458b7545304af77b71a32ac9a233
JavaScript
830
18
var superPropBase = require("./superPropBase.js"); function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { module.exports = _get = Reflect.get.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports; } else { module.exports = _get = function _get(target, property,...
bab8c84bafe6896540da95a8d4f51a278cd78b810a39df258f4cd24ecb8df758
JavaScript
836
27
'use strict'; import AxiosError from './AxiosError.js'; /** * Resolve or reject a Promise based on response status. * * @param {Function} resolve A function that resolves the promise. * @param {Function} reject A function that rejects the promise. * @param {object} response The response. * * @returns {object} ...
9b7c939c9c86dd0b92369476d47607003e748c9ba8a56669491ae5b14b008883
JavaScript
846
28
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { ...
e8c18da3624e6b7a7cf4720bcaa8d108709c22b1ab76e6e5f974587acb05d2c8
JavaScript
879
31
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToG...
718c800c5d9c84269f79d38a4f9436b06e0058fd60fe242941bd149ed01b12c4
JavaScript
882
20
var unsupportedIterableToArray = require("./unsupportedIterableToArray.js"); function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = unsupportedItera...
f4f66a995ff396bb16e2a07d848116d35181bd8547f7c2a2f494ba9602d269c6
JavaScript
883
23
import OverloadYield from "./OverloadYield.js"; export default function _asyncGeneratorDelegate(inner) { var iter = {}, waiting = !1; function pump(key, value) { return waiting = !0, value = new Promise(function (resolve) { resolve(inner[key](value)); }), { done: !1, value: new Overloa...
a51784e046e1a890ddddc00bd78745e7acac781a5abddb6b199b97483ef60010
JavaScript
895
42
#!/usr/bin/env node const fs = require('fs') const path = require('path') const readline = require('readline') const flat = require('./index') const filepath = process.argv.slice(2)[0] if (filepath) { // Read from file const file = path.resolve(process.cwd(), filepath) fs.accessSync(file, fs.constants.R_OK) //...
2c40be28955bb22429cc1958d5e16b656bc3194c9cdcebbd1b1635b806d4d7d9
JavaScript
897
34
import { truncate, inspectList, inspectProperty } from './helpers' const errorKeys = [ 'stack', 'line', 'column', 'name', 'message', 'fileName', 'lineNumber', 'columnNumber', 'number', 'description', ] export default function inspectObject(error, options) { const properties = Object.getOwnProper...
086e07e05bdc57123a58e836785933f8baf65b7c84722e6195e9ea3800ed2a43
JavaScript
900
31
import { inspectProperty, inspectList } from './helpers' export default function inspectObject(object, options) { const properties = Object.getOwnPropertyNames(object) const symbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : [] if (properties.length === 0 && symbols.length === 0) { ...
468c6a3145d8e8adaabf88dcb7e2ef0902795b1f2a35e4a483447c76a3c15562
JavaScript
902
18
var setPrototypeOf = require("./setPrototypeOf.js"); var isNativeReflectConstruct = require("./isNativeReflectConstruct.js"); function _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["defau...
6b8f315c5ef9733e157eeceebc92a0155fa92a36253a962badfd2dd2f1180bbe
JavaScript
902
24
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) ...
ed69ea4f757130e46dc48a0cc31beb6257e61a31c70936d82b8a3f02ffd64df5
JavaScript
923
47
'use strict'; const stripAnsi = require('strip-ansi'); const isFullwidthCodePoint = require('is-fullwidth-code-point'); const emojiRegex = require('emoji-regex'); const stringWidth = string => { if (typeof string !== 'string' || string.length === 0) { return 0; } string = stripAnsi(string); if (string.length =...
3532438bc5512c457c702d34ae283ca363f06fc4e8cc2b34c64bdcb157667252
JavaScript
934
39
const express = require('express'); const cors = require('cors'); const bodyParser = require('body-parser'); // mongodb connection const app = express(); var corsOptions = { origin: "http://localhost:4203" }; app.use(cors(corsOptions)); // Create link to Angular build directory var distDir = "./dist/pubmedapis/"; ...
9c3fe921ce1c205c62ce1cca97e1eb9335f3ddf066626a36c9a44bd59bd7a2db
JavaScript
941
37
// API module.exports = state; /** * Creates initial state object * for iteration over list * * @param {array|object} list - list to iterate over * @param {function|null} sortMethod - function to use for keys sort, * or `null` to keep them as is * @returns {object} - init...
9ddda7cb6c54a672d8a7e8cdd029d44e35335f7fa6e6102daf0c9f60137b59af
JavaScript
941
29
var serialOrdered = require('../serialOrdered.js'); // API module.exports = ReadableSerialOrdered; // expose sort helpers module.exports.ascending = serialOrdered.ascending; module.exports.descending = serialOrdered.descending; /** * Streaming wrapper to `asynckit.serialOrdered` * * @param {array|object} list -...
879ee5895679697a706e33929569bb41350e571eee7f8bc7a5bce4ee94030969
JavaScript
942
19
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var match_path_async_1 = require("../match-path-async"); var Tests = require("./data/match-path-data"); describe("match-path-async", function () { Tests.tests.forEach(function (t) { return it(t.name, function (done) { v...
e811bab630760c5956ad6ed613ec1bf4269575679d4d3ed5ad8d43ecf8bfec64
JavaScript
946
19
'use strict'; // Alias exports to a their normalized format Mocha#reporter to prevent a need // for dynamic (try/catch) requires, which Browserify doesn't handle. exports.Base = exports.base = require('./base'); exports.Dot = exports.dot = require('./dot'); exports.Doc = exports.doc = require('./doc'); exports.TAP = e...
c14c7ffa099ebd2a85e478bba3469c29431cec6b7b596754ba7ee4b9c6f6c533
JavaScript
953
38
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); exports.print = print; exports.remove = remove; function _chalk() { const data = _interopRequireDefault(require('chalk')); _chalk = function () { return data; }; return data; } var _clearLine = _interopRequireDefault(require('./...
a21e0c3e453c5bc1aeaf9887070d0df295ccf34107e31762aba93a1b202f562a
JavaScript
958
36
'use strict'; /** * Command module for "init" command * * @private * @module */ const fs = require('fs'); const path = require('path'); exports.command = 'init <path>'; exports.description = 'create a client-side Mocha setup at <path>'; exports.builder = yargs => yargs.positional('path', { type: 'string...
634b7821ceb0877b5320a17b3b0fc3fb60ac3092b86c9d069722f18e2421c1db
JavaScript
971
35
'use strict'; var Type = require('../type'); function resolveYamlBoolean(data) { if (data === null) return false; var max = data.length; return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); } funct...
95de06a942da992ff1235a70af240b8b8f8d3ca16b5972b5bcc5abcbd543ae72
JavaScript
973
22
import defineProperty from "./defineProperty.js"; function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnProperty...
df218a44dca7a1a2f3896a550a99cfbd7346939dd1e01154024359621c878354
JavaScript
973
34
let random = async bytes => crypto.getRandomValues(new Uint8Array(bytes)) let customAlphabet = (alphabet, defaultSize = 21) => { let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 let step = -~((1.6 * mask * defaultSize) / alphabet.length) return async (size = defaultSize) => { let id = '' w...
8f8317c6517081062acbbded96fbbfd4dc33ae7fc09e16d2cd3b53751ce91564
JavaScript
976
35
import crypto from 'crypto' import { urlAlphabet } from '../url-alphabet/index.js' let random = bytes => new Promise((resolve, reject) => { crypto.randomFill(Buffer.allocUnsafe(bytes), (err, buf) => { if (err) { reject(err) } else { resolve(buf) } }) }) let customAlphabet =...
da0b5fd3722c5e2913dbe22a14a3bd8474e508401f3629a10f44441bc085c333
JavaScript
981
21
var REACT_ELEMENT_TYPE; export default function _createRawReactElement(type, props, key, children) { REACT_ELEMENT_TYPE || (REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol["for"] && Symbol["for"]("react.element") || 60103); var defaultProps = type && type.defaultProps, childrenLength = arguments.leng...
9d7f656c257485ab32ef3bd4fc147cec8c44e35e61110730be1b1846d7a40772
JavaScript
989
1
'use strict';Object.defineProperty(exports,'__esModule',{value:true});exports.isSpaceSeparator=isSpaceSeparator;exports.isIdStartChar=isIdStartChar;exports.isIdContinueChar=isIdContinueChar;exports.isDigit=isDigit;exports.isHexDigit=isHexDigit;var _unicode=require('../lib/unicode');var unicode=_interopRequireWildcard(_...
dcc004e00d8ebbe38585efb7fa359998b7ab0885d03b16e9e54e6294146d2f52
JavaScript
991
24
var OverloadYield = require("./OverloadYield.js"); function _asyncGeneratorDelegate(inner) { var iter = {}, waiting = !1; function pump(key, value) { return waiting = !0, value = new Promise(function (resolve) { resolve(inner[key](value)); }), { done: !1, value: new OverloadYield(value...
f37311ed8f79866b392915961155ce9e80e6504a2c04e1628cc1918949c5c0e9
JavaScript
1,009
36
import { classNames } from "./common"; export const RLSelect = ({ options, values, selected, setSelected, disabled, disabledOptions, name, className }) => { if (!disabledOptions) disabledOptions = []; const option_items = options.map( (val, idx) => { return ( <optio...
b3eb9d2e054a43a3064af17332fb1839a7dadb205c5371af4789616afb1a117f
JavaScript
1,011
27
// Minimal replacement for ansi string helpers "wrap-ansi" and "strip-ansi". // to facilitate ESM and Deno modules. // TODO: look at porting https://www.npmjs.com/package/wrap-ansi to ESM. // The npm application // Copyright (c) npm, Inc. and Contributors // Licensed on the terms of The Artistic License 2.0 // See: htt...
4ff81594ec378e2f476f66ae931a2ee078ae61f3d426c7ddc169a47fe25bbd7f
JavaScript
1,016
39
'use strict'; /** * Highlight the given string of `js`. * * @private * @param {string} js * @return {string} */ function highlight(js) { return js .replace(/</g, '&lt;') .replace(/>/g, '&gt;') .replace(/\/\/(.*)/gm, '<span class="comment">//$1</span>') .replace(/('.*?')/gm, '<span class="string...
5296e5c3581ad9dc1f04aedaf1132df9736c580a326970e3975856f73aebfaea
JavaScript
1,017
43
var iterate = require('./lib/iterate.js') , initState = require('./lib/state.js') , terminator = require('./lib/terminator.js') ; // Public API module.exports = parallel; /** * Runs iterator over provided array elements in parallel * * @param {array|object} list - array or object (named list) to iterat...
a44ac4093ea6a1226b293f6afcdb478e507ffc80a7bdd775eb1060afeeaddc33
JavaScript
1,022
32
// Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ require('karma-jasmine'), requir...
a4fa54ca0343665eb199503d772a4fe4aab792e4e08bee682e70c0d4a5ada043
JavaScript
1,023
44
'use strict'; var Type = require('../type'); var _hasOwnProperty = Object.prototype.hasOwnProperty; var _toString = Object.prototype.toString; function resolveYamlOmap(data) { if (data === null) return true; var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data; for (index ...
f8fecfd13cf690d729f4bf22ac286bddf9294be3ca74d542bd0f136cf8d96c1c
JavaScript
1,030
1
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(t){if(void 0===t)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===t.stemmerSupport)throw new Error("Lunr stemmer su...
2d028b79ad0692a07dfaa4b192c4f3117ea11d4fef1a6d80b22846dcc8fad48b
JavaScript
1,051
35
module.exports = app => { const abstracts = require("../controllers/abstracts.controller.js"); const umls = require("../controllers/umls.controller.js"); var router = require("express").Router(); //Retrieve an abstract by ID router.get("/abstracts/findById", abstracts.findAbstractById); //Ret...
cc29dde422f382986f35a751904be190e59853c1999e799eb4c0a1df371dbc7c
JavaScript
1,060
34
import { urlAlphabet } from './url-alphabet/index.js' let random = bytes => crypto.getRandomValues(new Uint8Array(bytes)) let customRandom = (alphabet, defaultSize, getRandom) => { let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1 let step = -~((1.6 * mask * defaultSize) / alphabet.length) return (...
735b602e9dbc2d633d189cb23c796411c67f3795dd1d4e19c974c4ee3e13dd42
JavaScript
1,072
23
var defineProperty = require("./defineProperty.js"); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPrope...
2d7705386d8d1b9ed201cde627e1d837ff89364cc26ca939ad4c01344bb6308c
JavaScript
1,080
39
'use strict'; const denyList = new Set([ 'ENOTFOUND', 'ENETUNREACH', // SSL errors from https://github.com/nodejs/node/blob/fc8e3e2cdc521978351de257030db0076d79e0ab/src/crypto/crypto_common.cc#L301-L328 'UNABLE_TO_GET_ISSUER_CERT', 'UNABLE_TO_GET_CRL', 'UNABLE_TO_DECRYPT_CERT_SIGNATURE', 'UNABLE_TO_DECRYPT_CRL...
5b2be8c0e23f9621f7b88024f45e135a2b4273d0eeb1876e2803e8a0d8e7bb3b
JavaScript
1,080
30
import getPrototypeOf from "./getPrototypeOf.js"; import setPrototypeOf from "./setPrototypeOf.js"; import isNativeFunction from "./isNativeFunction.js"; import construct from "./construct.js"; export default function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNat...
faebb6d8a9d1b0cd755f92113e49464711d87060f17d1e807695924866f89a4a
JavaScript
1,084
53
'use strict'; var Type = require('../type'); var _toString = Object.prototype.toString; function resolveYamlPairs(data) { if (data === null) return true; var index, length, pair, keys, result, object = data; result = new Array(object.length); for (index = 0, length = object.length; index < length; i...
f006be28da0433d0e8a6b62b32854e7a05eb83edc837d5b8b5002dd26c5ef24c
JavaScript
1,085
22
var REACT_ELEMENT_TYPE; function _createRawReactElement(type, props, key, children) { REACT_ELEMENT_TYPE || (REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol["for"] && Symbol["for"]("react.element") || 60103); var defaultProps = type && type.defaultProps, childrenLength = arguments.length - 3; if (p...
5c03d8a9a69d1eefc44ee2750169fe74129fa8f7ba12432e492c71610bfe70fb
JavaScript
1,091
52
'use strict'; /** * @module Min */ /** * Module dependencies. */ var Base = require('./base'); var inherits = require('../utils').inherits; var constants = require('../runner').constants; var EVENT_RUN_END = constants.EVENT_RUN_END; var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; /** * Expose `Min`. */ export...
bcffb3fb83f27549cdd51ffbc1fa292a5282ddda01876c79bbc34fa411ac51d8
JavaScript
1,092
55
'use strict'; /** * Calculate data maxRate * @param {Number} [samplesCount= 10] * @param {Number} [min= 1000] * @returns {Function} */ function speedometer(samplesCount, min) { samplesCount = samplesCount || 10; const bytes = new Array(samplesCount); const timestamps = new Array(samplesCount); let head = ...
a6c311aacbf0d53bba453229e4b00a80f0b1e45aeba5cd4d415e36fb1d413269
JavaScript
1,096
22
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useDispatch, useSelector } from "react-redux"; import { streamlessSrcIds, addStream } from "../store/reptilearn_slice"; import RLButton from "./ui/button"; import { RLTooltip } from "./ui/tooltip"; export const AddStreamButton = () => { con...
583aba43e0ae0ccfb6c3a790019486990ac9241337dc38005f0189586e18295a
JavaScript
1,108
22
"use strict"; // Call this function in a another function to find out the file from // which that function was called from. (Inspects the v8 stack trace) // // Inspired by http://stackoverflow.com/questions/13227489 module.exports = function getCallerFile(position) { if (position === void 0) { position = 2; } i...
8e482c70067850425183ae785f19614bb9c788cf22226db62243119e507384c4
JavaScript
1,120
42
'use strict'; var isGlob = require('is-glob'); var pathPosixDirname = require('path').posix.dirname; var isWin32 = require('os').platform() === 'win32'; var slash = '/'; var backslash = /\\/g; var enclosure = /[\{\[].*[\}\]]$/; var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; ...
4489881f35106a0a2d5a6b9c00341a62e48858873af2fae3b9e06a91e54713ef
JavaScript
1,123
44
'use strict'; /* ! * Chai - getFuncName utility * Copyright(c) 2012-2016 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /** * ### .getFuncName(constructorFn) * * Returns the name of a function. * When a non-function instance is passed, returns `null`. * This also includes a polyfill function if `aFun...
b5836fc7ffae705a04c8be0a76eb33727c6467aeb7c0a55023c20c60e37340bb
JavaScript
1,142
47
/*! * chai * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ module.exports = function (chai, util) { chai.expect = function (val, message) { return new chai.Assertion(val, message); }; /** * ### .fail([message]) * ### .fail(actual, expected, [message], [operator]) ...
7fec40da83b2da031a7a75a7e777a53129c4ac8d556a27f72ac807bb1ff4a0f7
JavaScript
1,152
33
// This is (almost) directly from Node.js utils // https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js var getName = require('get-func-name'); var loupe = require('loupe'); var config = require('../config'); module.exports = inspect; /** * ### .inspect(obj, [showHidden], [depth]...
370323654b11cedf0f1bb510972bc251ecf5e7c60863cc8351a59a369e328d66
JavaScript
1,157
50
'use strict'; const pLimit = require('p-limit'); class EndError extends Error { constructor(value) { super(); this.value = value; } } // The input can also be a promise, so we await it const testElement = async (element, tester) => tester(await element); // The input can also be a promise, so we `Promise.all()...
9211491f8e0058a419a4664e36bb4ec6509655aabe6bd537eddf941fdf34e734
JavaScript
1,177
59
'use strict'; function isNothing(subject) { return (typeof subject === 'undefined') || (subject === null); } function isObject(subject) { return (typeof subject === 'object') && (subject !== null); } function toArray(sequence) { if (Array.isArray(sequence)) return sequence; else if (isNothing(sequence)) r...
06e4d0037715251cb3be2b2db063662f555b3538d9e30a9c517a54374d941cbc
JavaScript
1,219
62
'use strict'; module.exports = balanced; function balanced(a, b, str) { if (a instanceof RegExp) a = maybeMatch(a, str); if (b instanceof RegExp) b = maybeMatch(b, str); var r = range(a, b, str); return r && { start: r[0], end: r[1], pre: str.slice(0, r[0]), body: str.slice(r[0] + a.length, r[...
514d09ad85b57d8aba8d0ae6eeaea68d85eeaabbd558f3dde2521da7286e18cd
JavaScript
1,226
50
/*! * Chai - flag utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /*! * Module dependencies */ var inspect = require('./inspect'); var config = require('../config'); /** * ### .objDisplay(object) * * Determines if an object or an array matches * criteria to be inspec...
074d4e581302e739bc98fe3fc3fd22b3643c65326d5c2a109a4a59b7f0247ab4
JavaScript
1,233
40
import superPropBase from "./superPropBase.js"; import defineProperty from "./defineProperty.js"; function set(target, property, value, receiver) { if (typeof Reflect !== "undefined" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = superP...
11ff557a6ad3a0b17b72b7fdf4f9289ab4c9fdb7b24d1b98d991b8450726dc74
JavaScript
1,239
41
var version = require('./package.json').version; var ts = new Date().getTime(); module.exports = function(config) { var auth; try { auth = require('./test/auth/index'); } catch(ex) { auth = {}; auth.SAUCE_USERNAME = process.env.SAUCE_USERNAME || null; auth.SAUCE_ACCESS_KEY = process.env.SAUCE_AC...
aa6b9628dbdad63cafdab97234845ac73a17f8c21d7e349aa1d7cbeaf2cf2a0f
JavaScript
1,245
43
'use strict'; var parse = require('../'); var test = require('tape'); test('-', function (t) { t.plan(6); t.deepEqual(parse(['-n', '-']), { n: '-', _: [] }); t.deepEqual(parse(['--nnn', '-']), { nnn: '-', _: [] }); t.deepEqual(parse(['-']), { _: ['-'] }); t.deepEqual(parse(['-f-']), { f: '-', _: [] }); t.deepEq...
adbcf292b0b348979282052361e16d25f62a5a8bcb7f64fe04bc92fb198b4eab
JavaScript
1,252
55
var type = require('type-detect'); var flag = require('./flag'); function isObjectType(obj) { var objectType = type(obj); var objectTypes = ['Array', 'Object', 'function']; return objectTypes.indexOf(objectType) !== -1; } /** * ### .getOperator(message) * * Extract the operator from error message. * Opera...
b6c4a058c4fd03900f3786ef216322d57553ec83998e19b6d557dc39acfd2f9f
JavaScript
1,256
76
/* eslint no-console: "off" */ var asynckit = require('./') , async = require('async') , assert = require('assert') , expected = 0 ; var Benchmark = require('benchmark'); var suite = new Benchmark.Suite; var source = []; for (var z = 1; z < 100; z++) { source.push(z); expected += z; } suite // add ...
48bae87fa97780c262d35af7977386a44ceef34b75412204f238e9a37cc5e968
JavaScript
1,258
92
/*! * chai * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ var used = []; /*! * Chai version */ exports.version = '4.3.3'; /*! * Assertion Error */ exports.AssertionError = require('assertion-error'); /*! * Utils for plugins (not exported) */ var util = require('./chai/u...
675c629ed0495f091e94bc0670d15d772965e2349c45e07aedb50a880008385a
JavaScript
1,285
31
var getPrototypeOf = require("./getPrototypeOf.js"); var setPrototypeOf = require("./setPrototypeOf.js"); var isNativeFunction = require("./isNativeFunction.js"); var construct = require("./construct.js"); function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; module.expo...
4c95f30cb99b076c7e295b5ace4060d94010919478494aa2765f81bbd1aaf05c
JavaScript
1,295
69
'use strict'; var parse = require('../'); var test = require('tape'); test('numeric short args', function (t) { t.plan(2); t.deepEqual(parse(['-n123']), { n: 123, _: [] }); t.deepEqual( parse(['-123', '456']), { 1: true, 2: true, 3: 456, _: [] } ); }); test('short', function (t) { t.deepEqual( parse(['-b'...
3dcd70e20270a93b8769204174a1949a133a41afbc8f1a74a9c6ab73fd60a179
JavaScript
1,299
55
// YAML error class. http://stackoverflow.com/questions/8458984 // 'use strict'; function formatError(exception, compact) { var where = '', message = exception.reason || '(unknown reason)'; if (!exception.mark) return message; if (exception.mark.name) { where += 'in "' + exception.mark.name + '" '; } ...
2e334ba43cd4852f7a3ed68159029167c05d7fa6af536e6ef177eb868ccd1bb8
JavaScript
1,308
66
module.exports = realpath realpath.realpath = realpath realpath.sync = realpathSync realpath.realpathSync = realpathSync realpath.monkeypatch = monkeypatch realpath.unmonkeypatch = unmonkeypatch var fs = require('fs') var origRealpath = fs.realpath var origRealpathSync = fs.realpathSync var version = process.version ...
be5f6a4df97ab15ec35f995a7cb093a74e7489bad108c8bcabaeb9aa7c547317
JavaScript
1,315
40
import _typeof from "./typeof.js"; function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInte...
f52b5831460dd99fe57d61849f03636dc148e057329a681d60387b5e15a0ac4f
JavaScript
1,325
41
var superPropBase = require("./superPropBase.js"); var defineProperty = require("./defineProperty.js"); function set(target, property, value, receiver) { if (typeof Reflect !== "undefined" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = ...
75ae4ecb41d5dcc6b8f86bcf4e742c47064591afc484f79bad6c9d987476c157
JavaScript
1,326
45
import crypto from 'crypto' import { urlAlphabet } from './url-alphabet/index.js' const POOL_SIZE_MULTIPLIER = 128 let pool, poolOffset let fillPool = bytes => { if (!pool || pool.length < bytes) { pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER) crypto.randomFillSync(pool) poolOffset = 0 } else ...
9d4b1cac593b50b4b745ac3655c8af60a87f854fb18407fef91585d28e3a5dcb
JavaScript
1,329
68
'use strict'; const path = require('path'); const fs = require('fs'); const {promisify} = require('util'); const pLocate = require('p-locate'); const fsStat = promisify(fs.stat); const fsLStat = promisify(fs.lstat); const typeMappings = { directory: 'isDirectory', file: 'isFile' }; function checkType({type}) { if...
5de7441139955794ed213c8e650ecd4f7f9ddbf068a88f901d0553df6c1fb04b
JavaScript
1,358
59
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "isIdentifierChar", { enumerable: true, get: function () { return _identifier.isIdentifierChar; } }); Object.defineProperty(exports, "isIdentifierName", { enumerable: true, get: function () { ...
e36ae46e9a07e9e370220c5ed72dc03efeb7d5843a083bfbdd0c04ffc029ece3
JavaScript
1,361
45
/*! * Chai - transferFlags utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /** * ### .transferFlags(assertion, object, includeAll = true) * * Transfer all the flags for `assertion` to `object`. If * `includeAll` is set to `false`, then the base Chai * assertion flags (n...
b1e57ff12d020183670639a49cbaa9532522dcaf64a2ff0829843d2746fd9b0a
JavaScript
1,365
53
'use strict'; import AxiosError from '../core/AxiosError.js'; import parseProtocol from './parseProtocol.js'; import platform from '../platform/index.js'; const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/; /** * Parse data uri to a Buffer or Blob * * @param {String} uri * @param {?Boolean}...
e33ea098a91d2c41be886fbbcecacb9799fe183d8a446f138a4786cb3d809802
JavaScript
1,365
54
var wrappy = require('wrappy') var reqs = Object.create(null) var once = require('once') module.exports = wrappy(inflight) function inflight (key, cb) { if (reqs[key]) { reqs[key].push(cb) return null } else { reqs[key] = [cb] return makeres(key) } } function makeres (key) { return once(funct...
5a9421987a3b82be588116d526a4cec76c76f06fae21b9d240f4e3a0bca03148
JavaScript
1,370
50
/*! * Chai - message composition utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /*! * Module dependencies */ var flag = require('./flag') , getActual = require('./getActual') , objDisplay = require('./objDisplay'); /** * ### .getMessage(object, message, negateMessa...
4aecdb675769825d39657bfd6d4f76390ae3943d8db3df44fb15b5a5377cf285
JavaScript
1,374
15
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.loadConfig = exports.register = exports.matchFromAbsolutePathsAsync = exports.createMatchPathAsync = exports.matchFromAbsolutePaths = exports.createMatchPath = void 0; // register is used from register.js in root dir var match_path_syn...
e0d7adca78c926e1eeef2e70c9671c76bd5f1ae5f3af14dde16cb1e58c2fc486
JavaScript
1,382
55
'use strict'; import utils from './../utils.js'; // RawAxiosHeaders whose duplicates are ignored by node // c.f. https://nodejs.org/api/http.html#http_message_headers const ignoreDuplicateOf = utils.toObjectSet([ 'age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modi...
62d7dcefddb91a366639bca2a209718ec4cc9a83ef9de8273ca4095d8ed7035d
JavaScript
1,390
52
import unsupportedIterableToArray from "./unsupportedIterableToArray.js"; export default function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArray...
9432ea7c7bbe918561b204937d078982c026a56bf7378550682b6269e4751bea
JavaScript
1,396
40
import { truncator, inspectList } from './helpers' export function inspectAttribute([key, value], options) { options.truncate -= 3 if (!value) { return `${options.stylize(key, 'yellow')}` } return `${options.stylize(key, 'yellow')}=${options.stylize(`"${value}"`, 'string')}` } export function inspectHTMLC...
e86507bc840c3efee6f7d0bfcc84f43d5aa045be20803af0ee91bc72e28b623d
JavaScript
1,403
52
'use strict'; import utils from './../utils.js'; import platform from '../platform/index.js'; export default platform.isStandardBrowserEnv ? // Standard browser envs support document.cookie (function standardBrowserEnv() { return { write: function write(name, value, expires, path, domain, secure) { ...
12cca266f9d8578188a9a89a4ddf19b24942c7bd7e3308b812373e45bda15f1a
JavaScript
1,428
60
'use strict'; var Suite = require('../suite'); var Test = require('../test'); /** * Exports-style (as Node.js module) interface: * * exports.Array = { * '#indexOf()': { * 'should return -1 when the value is not present': function() { * * }, * * 'should return the correct inde...
d992115bae799d15b30cfd482248db2d409e31966f9db4bd28b469733a058f13
JavaScript
1,428
44
// Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ require('karma-jasmine'), requir...
203525ea2bebc0cb3c82a4e75f9929e329fffa7f2c2749ea4830f286f219ae3b
JavaScript
1,429
44
// Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ require('karma-jasmine'), requir...
f8b2a502285cdb49fb871ebd273006f2342188e38d01f0990cb45e6033b9ac9e
JavaScript
1,433
51
/*! * Chai - expectTypes utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /** * ### .expectTypes(obj, types) * * Ensures that the object being tested against is of a valid type. * * utils.expectTypes(this, ['array', 'object', 'string']); * * @param {Mixed} obj cons...
90b522ff0bc9763be7e1ccd6a74b22d6ad4b8cd10d0ee460dc8fb57896bc55b7
JavaScript
1,434
41
var _typeof = require("./typeof.js")["default"]; function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { r...
0e19b07d96a717eb1b07630c9f984be4014edf05c84f4d95ee6077f072ceb3ff
JavaScript
1,439
58
'use strict'; import toFormData from './toFormData.js'; /** * It encodes a string by replacing all characters that are not in the unreserved set with * their percent-encoded equivalents * * @param {string} str - The string to encode. * * @returns {string} The encoded string. */ function encode(str) { const c...
198c6305fc396df6802c0ec653577fdbe2a0b9faa155ca98245ebcda5753141c
JavaScript
1,440
86
'use strict'; /** * @module Context */ /** * Expose `Context`. */ module.exports = Context; /** * Initialize a new `Context`. * * @private */ function Context() {} /** * Set or get the context `Runnable` to `runnable`. * * @private * @param {Runnable} runnable * @return {Context} context */ Context.pro...
45faaa87c4c9f9a8f8e2a0e9f1ddb986e9b0b406a56989af1f69adb3270c0232
JavaScript
1,442
106
/*! * Chrome */ exports['SL_Chrome'] = { base: 'SauceLabs' , browserName: 'chrome' }; /*! * Firefox */ exports['SL_Firefox'] = { base: 'SauceLabs' , browserName: 'firefox' }; exports['SL_Firefox_ESR'] = { base: 'SauceLabs' , browserName: 'firefox' , version: 38 }; /*! * Internet ...
f90139be95f13627343c6a99328b382d43a782324f8f99d7aba929caaaa62aeb
JavaScript
1,442
59
import utils from '../utils.js'; import httpAdapter from './http.js'; import xhrAdapter from './xhr.js'; import AxiosError from "../core/AxiosError.js"; const knownAdapters = { http: httpAdapter, xhr: xhrAdapter } utils.forEach(knownAdapters, (fn, value) => { if(fn) { try { Object.defineProperty(fn, '...
b6f81c0531fc09be2f8a26059a5cb9f47150e550471da0ace5705a26d3c6268e
JavaScript
1,448
23
// Copyright 2014, 2015, 2016, 2017, 2018 Simon Lydell // License: MIT. (See LICENSE.) Object.defineProperty(exports, "__esModule", { value: true }) // This regex comes from regex.coffee, and is inserted here by generate-index.js // (run `npm run build`). exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(...
5056e814a02d10d20d056ab9de9470e1cc7b44e2f5403fe23628ee5c81879ca6
JavaScript
1,466
47
import { JSONEditor } from "svelte-jsoneditor/dist/jsoneditor.js"; import { useEffect, useRef } from "react"; import { classNames } from "./common"; // Adapted from https://codesandbox.io/s/svelte-jsoneditor-react-59wxz export const RLJSONEditor = ({ className, ...props }) => { const refContainer = useRef(null); c...
a04d720e0eac7387698459a4f566f474f20a9f8ac02c9b63126b1312d2964297
JavaScript
1,472
44
// Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ require('karma-jasmine'), ...
44e833b54a1b6af451538d21e741442879558b60b6e14821d59107466304fd55
JavaScript
1,501
53
var unsupportedIterableToArray = require("./unsupportedIterableToArray.js"); function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o &&...
3d9ef759e08df4488e6916699dc4434021b378d736b067324dd64d81b1cedac6
JavaScript
1,509
17
/*istanbul ignore start*/'use strict'; exports.__esModule = true; exports.characterDiff = undefined; exports. /*istanbul ignore end*/diffChars = diffChars; var /*istanbul ignore start*/_base = require('./base') /*istanbul ignore end*/; /*istanbul ignore start*/var _base2 = _interopRequireDefault(_base); function _i...
ecefe5e6a041b09d7b7d59f87a7a95bb2ca3b4775d53370307a08d82f872638b
JavaScript
1,517
53
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); exports.getType = getType; exports.isPrimitive = void 0; /** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tr...
2e4de1d05d9cd406ac9cea19c553fa4d3005f1238a44c4d20c66f7e73640ce8a
JavaScript
1,519
47
import React from 'react'; import { api } from '../api.js'; import RLButton from './ui/button.js'; import RLModal from './ui/modal.js'; export const DeleteSessionModal = ({ session, sessions, open, setOpen, onDelete }) => { const [dataRoot, setDataRoot] = React.useState(null); React.useEffect(() => { ...
ec25b742450df200d287bd9790451e203e2a99066f615b43f034e731afa0697f
JavaScript
1,521
71
'use strict'; const Queue = require('yocto-queue'); const pLimit = concurrency => { if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { throw new TypeError('Expected `concurrency` to be a number from 1 and up'); } const queue = new Queue(); let activeCount = 0; const next ...
01cfba0b7d2fe0eda43ff680c3e82ea6f16af6336168e909d1e5f3b8866a7275
JavaScript
1,537
58
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); exports.test = exports.serialize = exports.default = void 0; var _markup = require('./lib/markup'); var Symbol = globalThis['jest-symbol-do-not-touch'] || globalThis.Symbol; const testSymbol = typeof Symbol === 'function' && Symbol.for ...
651bf433cf05e9ec8cee0b94639483236a605d48279e83d3d5c5de81c21d6599
JavaScript
1,540
67
/* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors * Licensed under the New BSD license. See LICENSE or: * http://opensource.org/licenses/BSD-3-Clause */ var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); /** * Encode ...
61dc470b66dbbd567abed509b6e242de5700e2f394ad2da9b2b718a8170f6ca5
JavaScript
1,549
69
'use strict'; /** * Contains "command" code for "one-and-dones"--options passed * to Mocha which cause it to just dump some info and exit. * See {@link module:lib/cli/one-and-dones.ONE_AND_DONE_ARGS ONE_AND_DONE_ARGS} for more info. * @module * @private */ const Mocha = require('../mocha'); /** * Dumps a sort...
4fc2c9f538dad9e21d9e6a999bf4be9fb5c803677a6a4fa9f24b31b69332403d
JavaScript
1,559
63
'use strict'; import utils from '../utils.js'; import AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js'; /** * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their * URI encoded counterparts * * @param {string} val The value to be encoded. * * @returns {string} Th...
7769d227806714491cd5d641041746dc073300df2e39c6709f59a4e766c18c15
JavaScript
1,569
71
'use strict'; import utils from './../utils.js'; class InterceptorManager { constructor() { this.handlers = []; } /** * Add a new interceptor to the stack * * @param {Function} fulfilled The function to handle `then` for a `Promise` * @param {Function} rejected The function to handle `reject` f...