text
stringlengths
9
39.2M
dir
stringlengths
25
226
lang
stringclasses
163 values
created_date
timestamp[s]
updated_date
timestamp[s]
repo_name
stringclasses
751 values
repo_full_name
stringclasses
752 values
star
int64
1.01k
183k
len_tokens
int64
1
18.5M
```javascript var _ = require('../utils')._; function formatParse(format) { format = format.split('-'); var keyType = 'private'; var keyOpt = {type: 'default'}; for (var i = 1; i < format.length; i++) { if (format[i]) { switch (format[i]) { case 'public': ...
/content/code_sandbox/node_modules/node-rsa/src/formats/formats.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
636
```javascript var ber = require('asn1').Ber; var _ = require('../utils')._; var utils = require('../utils'); const PRIVATE_OPENING_BOUNDARY = '-----BEGIN RSA PRIVATE KEY-----'; const PRIVATE_CLOSING_BOUNDARY = '-----END RSA PRIVATE KEY-----'; const PUBLIC_OPENING_BOUNDARY = '-----BEGIN RSA PUBLIC KEY-----'; const PUB...
/content/code_sandbox/node_modules/node-rsa/src/formats/pkcs1.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,227
```javascript module.exports.BinarySearchTree = require('./lib/bst'); module.exports.AVLTree = require('./lib/avltree'); ```
/content/code_sandbox/node_modules/binary-search-tree/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
26
```unknown lib-cov *.seed *.log *.csv *.dat *.out *.pid *.gz pids logs results npm-debug.log node_modules ```
/content/code_sandbox/node_modules/binary-search-tree/.npmignore
unknown
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
40
```unknown test: @echo "Launching tests" @ ./node_modules/.bin/mocha --timeout 10000 --reporter spec @echo "Tests finished" .PHONY: test ```
/content/code_sandbox/node_modules/binary-search-tree/Makefile
unknown
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
42
```javascript var ber = require('asn1').Ber; var _ = require('../utils')._; var PUBLIC_RSA_OID = '1.2.840.113549.1.1.1'; var utils = require('../utils'); const PRIVATE_OPENING_BOUNDARY = '-----BEGIN PRIVATE KEY-----'; const PRIVATE_CLOSING_BOUNDARY = '-----END PRIVATE KEY-----'; const PUBLIC_OPENING_BOUNDARY = '-----...
/content/code_sandbox/node_modules/node-rsa/src/formats/pkcs8.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,520
```javascript /** * Return an array with the numbers from 0 to n-1, in a random order */ function getRandomArray (n) { var res, next; if (n === 0) { return []; } if (n === 1) { return [0]; } res = getRandomArray(n - 1); next = Math.floor(Math.random() * n); res.splice(next, 0, n - 1); // Add n-1 at a ...
/content/code_sandbox/node_modules/binary-search-tree/lib/customUtils.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
277
```javascript /** * Simple binary search tree */ var customUtils = require('./customUtils'); /** * Constructor * @param {Object} options Optional * @param {Boolean} options.unique Whether to enforce a 'unique' constraint on the key or not * @param {Key} options.key Initialize this BST's key with key * @p...
/content/code_sandbox/node_modules/binary-search-tree/lib/bst.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,490
```javascript /** * Self-balancing binary search tree using the AVL implementation */ var BinarySearchTree = require('./bst') , customUtils = require('./customUtils') , util = require('util') , _ = require('underscore') ; /** * Constructor * We can't use a direct pointer to the root node (as in the simple...
/content/code_sandbox/node_modules/binary-search-tree/lib/avltree.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,272
```javascript var should = require('chai').should() , assert = require('chai').assert , BinarySearchTree = require('../index').BinarySearchTree , _ = require('underscore') , customUtils = require('../lib/customUtils') ; describe('Binary search tree', function () { it('Upon creation, left, right are null,...
/content/code_sandbox/node_modules/binary-search-tree/test/bst.test.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
8,721
```javascript var v1 = require('./v1'); var v4 = require('./v4'); var uuid = v4; uuid.v1 = v1; uuid.v4 = v4; module.exports = uuid; ```
/content/code_sandbox/node_modules/uuid/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
44
```unknown Robert Kieffer <robert@broofa.com> Christoph Tavan <dev@tavan.de> AJ ONeal <coolaj86@gmail.com> Vincent Voyer <vincent@zeroload.net> Roman Shtylman <shtylman@gmail.com> ```
/content/code_sandbox/node_modules/uuid/AUTHORS
unknown
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
61
```javascript var rng = require('./lib/rng'); var bytesToUuid = require('./lib/bytesToUuid'); function v4(options, buf, offset) { var i = buf && offset || 0; if (typeof(options) == 'string') { buf = options === 'binary' ? new Array(16) : null; options = null; } options = options || {}; var rnds = o...
/content/code_sandbox/node_modules/uuid/v4.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
239
```javascript var v35 = require('./lib/v35.js'); var md5 = require('./lib/md5'); module.exports = v35('v3', 0x30, md5); ```
/content/code_sandbox/node_modules/uuid/v3.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
39
```javascript var v35 = require('./lib/v35.js'); var sha1 = require('./lib/sha1'); module.exports = v35('v5', 0x50, sha1); ```
/content/code_sandbox/node_modules/uuid/v5.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
40
```javascript var rng = require('./lib/rng'); var bytesToUuid = require('./lib/bytesToUuid'); // **`v1()` - Generate time-based UUID** // // Inspired by path_to_url // and path_to_url var _nodeId; var _clockseq; // Previous uuid creation time var _lastMSecs = 0; var _lastNSecs = 0; // See path_to_url for API detail...
/content/code_sandbox/node_modules/uuid/v1.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,099
```javascript // Adapted from Chris Veness' SHA1 code at // path_to_url 'use strict'; function f(s, x, y, z) { switch (s) { case 0: return (x & y) ^ (~x & z); case 1: return x ^ y ^ z; case 2: return (x & y) ^ (x & z) ^ (y & z); case 3: return x ^ y ^ z; } } function ROTL(x, n) { return (x << n)...
/content/code_sandbox/node_modules/uuid/lib/sha1-browser.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,083
```javascript var should = require('chai').should() , assert = require('chai').assert , AVLTree = require('../index').AVLTree , _ = require('underscore') , customUtils = require('../lib/customUtils') ; describe('AVL tree', function () { describe('Sanity checks', function () { it('Checking that all n...
/content/code_sandbox/node_modules/binary-search-tree/test/avltree.test.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
9,673
```javascript var bytesToUuid = require('./bytesToUuid'); function uuidToBytes(uuid) { // Note: We assume we're being passed a valid uuid string var bytes = []; uuid.replace(/[a-fA-F0-9]{2}/g, function(hex) { bytes.push(parseInt(hex, 16)); }); return bytes; } function stringToBytes(str) { str = unesc...
/content/code_sandbox/node_modules/uuid/lib/v35.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
485
```javascript 'use strict'; var crypto = require('crypto'); function sha1(bytes) { if (typeof Buffer.from === 'function') { // Modern Buffer API if (Array.isArray(bytes)) { bytes = Buffer.from(bytes); } else if (typeof bytes === 'string') { bytes = Buffer.from(bytes, 'utf8'); } } else ...
/content/code_sandbox/node_modules/uuid/lib/sha1.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
149
```javascript // Unique ID creation requires a high quality random # generator. In the // browser this is a little complicated due to unknown quality of Math.random() // and inconsistent support for the `crypto` API. We do the best we can via // feature-detection // getRandomValues needs to be invoked in a context w...
/content/code_sandbox/node_modules/uuid/lib/rng-browser.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
352
```javascript /** * Convert array of 16 byte values to UUID string format of the form: * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */ var byteToHex = []; for (var i = 0; i < 256; ++i) { byteToHex[i] = (i + 0x100).toString(16).substr(1); } function bytesToUuid(buf, offset) { var i = offset || 0; var bth = byteToHex...
/content/code_sandbox/node_modules/uuid/lib/bytesToUuid.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
270
```javascript // Unique ID creation requires a high quality random # generator. In node.js // this is pretty straight-forward - we use the crypto API. var crypto = require('crypto'); module.exports = function nodeRNG() { return crypto.randomBytes(16); }; ```
/content/code_sandbox/node_modules/uuid/lib/rng.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
56
```javascript 'use strict'; var crypto = require('crypto'); function md5(bytes) { if (typeof Buffer.from === 'function') { // Modern Buffer API if (Array.isArray(bytes)) { bytes = Buffer.from(bytes); } else if (typeof bytes === 'string') { bytes = Buffer.from(bytes, 'utf8'); } } else {...
/content/code_sandbox/node_modules/uuid/lib/md5.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
149
```unknown #!/usr/bin/env node var assert = require('assert'); function usage() { console.log('Usage:'); console.log(' uuid'); console.log(' uuid v1'); console.log(' uuid v3 <name> <namespace uuid>'); console.log(' uuid v4'); console.log(' uuid v5 <name> <namespace uuid>'); console.log(' uuid --hel...
/content/code_sandbox/node_modules/uuid/bin/uuid
unknown
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
437
```javascript var parse = require('acorn').parse; var isArray = require('isarray'); var objectKeys = require('object-keys'); var forEach = require('foreach'); module.exports = function (src, opts, fn) { if (typeof opts === 'function') { fn = opts; opts = {}; } if (src && typeof src === 'obj...
/content/code_sandbox/node_modules/falafel/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
503
```javascript /* * Browser-compatible JavaScript MD5 * * Modification of JavaScript MD5 * path_to_url * * path_to_url * * path_to_url * * Based on * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message * Digest Algorithm, as defined in RFC 1321. * Other contributors: Greg Holt, Andrew Kep...
/content/code_sandbox/node_modules/uuid/lib/md5-browser.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,945
```javascript var falafel = require('../'); var src = 'console.log(beep "boop", "BOOP");'; function isKeyword (id) { if (id === 'beep') return true; } var output = falafel(src, { isKeyword: isKeyword }, function (node) { if (node.type === 'UnaryExpression' && node.operator === 'beep') { node.updat...
/content/code_sandbox/node_modules/falafel/example/keyword.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
113
```javascript var falafel = require('../'); var src = '(' + function () { var xs = [ 1, 2, [ 3, 4 ] ]; var ys = [ 5, 6 ]; console.dir([ xs, ys ]); } + ')()'; var output = falafel(src, function (node) { if (node.type === 'ArrayExpression') { node.update('fn(' + node.source() + ')'); } }); c...
/content/code_sandbox/node_modules/falafel/example/array.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
104
```markdown # falafel Transform the [ast](path_to_url on a recursive walk. [![browser support](path_to_url [![build status](path_to_url This modules uses [acorn](path_to_url to create an AST from source code. ![falafel dner](path_to_url # example ## array.js Put a function wrapper around all array literals. ``...
/content/code_sandbox/node_modules/falafel/readme.markdown
markdown
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
695
```javascript var falafel = require('../'); var vm = require('vm'); var termExps = [ 'Identifier', 'CallExpression', 'BinaryExpression', 'UpdateExpression', 'UnaryExpression' ].reduce(function (acc, key) { acc[key] = true; return acc }, {}); function terminated (node) { for (var p = node; p.pa...
/content/code_sandbox/node_modules/falafel/example/prompt.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
305
```javascript var falafel = require('../'); var test = require('tape'); test('array', function (t) { t.plan(5); var src = '(function () {' + 'var xs = [ 1, 2, [ 3, 4 ] ];' + 'var ys = [ 5, 6 ];' + 'g([ xs, ys ]);' + '})()'; var pending = 0; var output = falafel(src...
/content/code_sandbox/node_modules/falafel/test/async.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
317
```javascript var falafel = require('../'); var test = require('tape'); test('for loop', function (t) { t.plan(7); var src = '(function () {' + 'var sum = 0;' + 'for (var i = 0; i < 10; i++)' + 'sum += i;' + 'if (true)' + 'for (var i = 0; i < 10; i++)' ...
/content/code_sandbox/node_modules/falafel/test/for.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
248
```javascript var falafel = require('../'); var test = require('tape'); test('inspect', function (t) { t.plan(6); var src = '(function () {' + 'var xs = [ 1, 2, [ 3, 4 ] ];' + 'var ys = [ 5, 6 ];' + 'g([ xs, ys ]);' + '})()'; var output = falafel(src, function (node) {...
/content/code_sandbox/node_modules/falafel/test/inspect.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
281
```javascript var falafel = require('../'); var test = require('tape'); test('array', function (t) { t.plan(5); var src = '(' + function () { var xs = [ 1, 2, [ 3, 4 ] ]; var ys = [ 5, 6 ]; g([ xs, ys ]); } + ')()'; var output = falafel(src, function (node) { i...
/content/code_sandbox/node_modules/falafel/test/array.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
263
```javascript var falafel = require('../'); var test = require('tape'); test('parent', function (t) { t.plan(5); var src = '(function () {' + 'var xs = [ 1, 2, 3 ];' + 'fn(ys);' + '})()'; var output = falafel(src, function (node) { if (node.type === 'ArrayExpression') ...
/content/code_sandbox/node_modules/falafel/test/parent.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
244
```javascript var falafel = require('../'); var acorn = require('acorn-jsx'); var test = require('tape'); test('custom parser', function (t) { var src = '(function() { var f = {a: "b"}; var a = <div {...f} className="test"></div>; })()'; var nodeTypes = [ 'Identifier', 'Identifier', 'Literal', 'P...
/content/code_sandbox/node_modules/falafel/test/custom-parser.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
266
```javascript var falafel = require('../'); var test = require('tape'); test('generators', function (t) { t.plan(1); var src = 'console.log((function * () { yield 3 })().next().value)'; var output = falafel(src, { ecmaVersion: 6 }, function (node) { if (node.type === 'Literal') { n...
/content/code_sandbox/node_modules/falafel/test/es6.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
124
```javascript var path = require('path'); for (var i = 2; i < process.argv.length; i++) { require(path.resolve(process.cwd(), process.argv[i])); } ```
/content/code_sandbox/node_modules/falafel/test/bin/run.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
37
```javascript module.exports = Array.isArray || function (arr) { return Object.prototype.toString.call(arr) == '[object Array]'; }; ```
/content/code_sandbox/node_modules/falafel/node_modules/isarray/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
26
```javascript var falafel = require('../'); var test = require('tape'); test('first opts arg', function (t) { t.plan(5); var src = '(function () {' + 'var xs = [ 1, 2, [ 3, 4 ] ];' + 'var ys = [ 5, 6 ];' + 'g([ xs, ys ]);' + '})()'; var output = falafel({ source: src }...
/content/code_sandbox/node_modules/falafel/test/opts.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,059
```xml import { Agent, ClientRequest, RequestOptions, AgentCallbackCallback, AgentCallbackPromise, AgentCallbackReturn } from './index'; type LegacyCallback = ( req: ClientRequest, opts: RequestOptions, fn: AgentCallbackCallback ) => void; export default function promisify(fn: LegacyCallback): AgentCallbackP...
/content/code_sandbox/node_modules/agent-base/src/promisify.ts
xml
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
164
```javascript /** * Require the given path. * * @param {String} path * @return {Object} exports * @api public */ function require(path, parent, orig) { var resolved = require.resolve(path); // lookup failed if (null == resolved) { orig = orig || path; parent = parent || 'root'; var err = new ...
/content/code_sandbox/node_modules/falafel/node_modules/isarray/build/build.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,063
```unknown {"version":3,"file":"promisify.js","sourceRoot":"","sources":["../../src/promisify.ts"],"names":[],"mappings":";;AAeA,SAAwB,SAAS,CAAC,EAAkB;IACnD,OAAO,UAAsB,GAAkB,EAAE,IAAoB;QACpE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACtC,EAAE,CAAC,IAAI,CACN,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,CAAC,GAA6B,EAAE,GAAyB,E...
/content/code_sandbox/node_modules/agent-base/dist/src/promisify.js.map
unknown
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
272
```xml /// <reference types="node" /> import net from 'net'; import http from 'http'; import https from 'https'; import { Duplex } from 'stream'; import { EventEmitter } from 'events'; declare function createAgent(opts?: createAgent.AgentOptions): createAgent.Agent; declare function createAgent(callback: createAgent.Ag...
/content/code_sandbox/node_modules/agent-base/dist/src/index.d.ts
xml
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
667
```xml import net from 'net'; import http from 'http'; import https from 'https'; import { Duplex } from 'stream'; import { EventEmitter } from 'events'; import createDebug from 'debug'; import promisify from './promisify'; const debug = createDebug('agent-base'); function isAgent(v: any): v is createAgent.AgentLike ...
/content/code_sandbox/node_modules/agent-base/src/index.ts
xml
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,308
```javascript "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; const events_1 = require("events"); const debug_1 = __importDefault(require("debug")); const promisify_1 = __importDefault(require("./promisify")); const...
/content/code_sandbox/node_modules/agent-base/dist/src/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,586
```javascript "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function promisify(fn) { return function (req, opts) { return new Promise((resolve, reject) => { fn.call(this, req, opts, (err, rtn) => { if (err) { reject(err); ...
/content/code_sandbox/node_modules/agent-base/dist/src/promisify.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
100
```xml import { ClientRequest, RequestOptions, AgentCallbackCallback, AgentCallbackPromise } from './index'; declare type LegacyCallback = (req: ClientRequest, opts: RequestOptions, fn: AgentCallbackCallback) => void; export default function promisify(fn: LegacyCallback): AgentCallbackPromise; export {}; ```
/content/code_sandbox/node_modules/agent-base/dist/src/promisify.d.ts
xml
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
60
```unknown {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAIA,mCAAsC;AACtC,kDAAgC;AAChC,4DAAoC;AAEpC,MAAM,KAAK,GAAG,eAAW,CAAC,YAAY,CAAC,CAAC;AAExC,SAAS,OAAO,CAAC,CAAM;IACtB,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,UAAU,KAAK,UAAU,CAAC;AACzD,CAAC;AAED,SAAS,...
/content/code_sandbox/node_modules/agent-base/dist/src/index.js.map
unknown
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,648
```javascript /** * Helpers. */ var s = 1000; var m = s * 60; var h = m * 60; var d = h * 24; var w = d * 7; var y = d * 365.25; /** * Parse or format the given `val`. * * Options: * * - `long` verbose formatting [false] * * @param {String|Number} val * @param {Object} [options] * @throws {Error} throw an...
/content/code_sandbox/node_modules/agent-base/node_modules/ms/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
981
```javascript /** * Detect Electron renderer / nwjs process, which is node, but we should * treat as a browser. */ if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { module.exports = require('./browser.js'); } else { module.exports = require('./node....
/content/code_sandbox/node_modules/agent-base/node_modules/debug/src/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
73
```javascript /** * 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...
/content/code_sandbox/node_modules/agent-base/node_modules/debug/src/node.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,400
```javascript /** * This is the common logic for both the Node.js and web browser * implementations of `debug()`. */ function setup(env) { createDebug.debug = createDebug; createDebug.default = createDebug; createDebug.coerce = coerce; createDebug.disable = disable; createDebug.enable = enable; createDebug.e...
/content/code_sandbox/node_modules/agent-base/node_modules/debug/src/common.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,693
```unknown /test.js /node-* /lib/events.js ```
/content/code_sandbox/node_modules/vm2/.eslintignore
unknown
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
10
```javascript /* eslint-env browser */ /** * This is the web browser implementation of `debug()`. */ exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.storage = localstorage(); exports.destroy = (() => { let warned = false; return () => { if (!war...
/content/code_sandbox/node_modules/agent-base/node_modules/debug/src/browser.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,732
```javascript if (parseInt(process.versions.node.split('.')[0]) < 6) throw new Error('vm2 requires Node.js version 6 or newer.'); module.exports = require('./lib/main'); ```
/content/code_sandbox/node_modules/vm2/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
39
```javascript module.exports = { env: { es6: true, node: true }, extends: [ 'integromat' ], parserOptions: { 'ecmaVersion': 2017, 'ecmaFeatures': { 'globalReturn': true } }, globals: { }, rules: { } }; ```
/content/code_sandbox/node_modules/vm2/.eslintrc.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
83
```xml import {EventEmitter} from 'events'; /** * Require options for a VM */ export interface VMRequire { /** Array of allowed built-in modules, accepts ["*"] for all. Using "*" increases the attack surface and potential * new modules allow to escape the sandbox. (default: none) */ builtin?: string[]; /* ...
/content/code_sandbox/node_modules/vm2/index.d.ts
xml
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,018
```javascript 'use strict'; const pa = require('path'); const {NodeVM, VMError} = require('../'); if (process.argv[2]) { const path = pa.resolve(process.argv[2]); console.log(`\x1B[90m[vm] creating VM for ${path}\x1B[39m`); const started = Date.now(); try { NodeVM.file(path, { verbose: true, require: {...
/content/code_sandbox/node_modules/vm2/lib/cli.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
261
```javascript 'use strict'; const {Script} = require('vm'); const { lookupCompiler, removeShebang } = require('./compiler'); const { transformer } = require('./transformer'); const objectDefineProperties = Object.defineProperties; const MODULE_PREFIX = '(function (exports, require, module, __filename, __dirname) ...
/content/code_sandbox/node_modules/vm2/lib/script.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,580
```javascript 'use strict'; /** * This callback will be called to resolve a module if it couldn't be found. * * @callback resolveCallback * @param {string} moduleName - Name of the module used to resolve. * @param {string} dirname - Name of the current directory. * @return {(string|undefined)} The file or direct...
/content/code_sandbox/node_modules/vm2/lib/nodevm.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
4,342
```javascript 'use strict'; /** * __ ___ ____ _ _ ___ _ _ ____ * \ \ / / \ | _ \| \ | |_ _| \ | |/ ___| * \ \ /\ / / _ \ | |_) | \| || || \| | | _ * \ V V / ___ \| _ <| |\ || || |\ | |_| | * \_/\_/_/ \_\_| \_\_| \_|___|_| \_|\____| * * This file is critical for vm2. It impl...
/content/code_sandbox/node_modules/vm2/lib/bridge.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
7,725
```javascript // // 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, modify, merge, publish, // distribute, sublic...
/content/code_sandbox/node_modules/vm2/lib/events.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
6,672
```javascript 'use strict'; /** * This callback will be called to transform a script to JavaScript. * * @callback compileCallback * @param {string} code - Script code to transform to JavaScript. * @param {string} filename - Filename of this script. * @return {string} JavaScript code that represents the script co...
/content/code_sandbox/node_modules/vm2/lib/vm.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,847
```javascript 'use strict'; const { VMError } = require('./bridge'); let cacheCoffeeScriptCompiler; /** * Returns the cached coffee script compiler or loads it * if it is not found in the cache. * * @private * @return {compileCallback} The coffee script compiler. * @throws {VMError} If the coffee-script modul...
/content/code_sandbox/node_modules/vm2/lib/compiler.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
553
```javascript 'use strict'; const { VMError } = require('./bridge'); const { VMScript } = require('./script'); const { VM } = require('./vm'); const { NodeVM } = require('./nodevm'); exports.VMError = VMError; exports.VMScript = VMScript; exports.NodeVM = NodeVM; exports.VM = VM; ```
/content/code_sandbox/node_modules/vm2/lib/main.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
81
```javascript const {Parser: AcornParser, isNewLine: acornIsNewLine, getLineInfo: acornGetLineInfo} = require('acorn'); const {full: acornWalkFull} = require('acorn-walk'); const INTERNAL_STATE_NAME = 'VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL'; function assertType(node, type) { if (!node) throw new Error(...
/content/code_sandbox/node_modules/vm2/lib/transformer.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,524
```javascript /* global host, data, VMError */ 'use strict'; const LocalError = Error; const LocalTypeError = TypeError; const LocalWeakMap = WeakMap; const { apply: localReflectApply, defineProperty: localReflectDefineProperty } = Reflect; const { set: localWeakMapSet, get: localWeakMapGet } = LocalWeakMap.pro...
/content/code_sandbox/node_modules/vm2/lib/setup-node-sandbox.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,900
```javascript /* global host, bridge, data, context */ 'use strict'; const { Object: localObject, Array: localArray, Error: LocalError, Reflect: localReflect, Proxy: LocalProxy, WeakMap: LocalWeakMap, Function: localFunction, Promise: localPromise, eval: localEval } = global; const { freeze: localObjectFre...
/content/code_sandbox/node_modules/vm2/lib/setup-sandbox.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,031
```javascript 'use strict'; // Translate the old options to the new Resolver functionality. const fs = require('fs'); const pa = require('path'); const nmod = require('module'); const {EventEmitter} = require('events'); const util = require('util'); const { Resolver, DefaultResolver } = require('./resolver'); cons...
/content/code_sandbox/node_modules/vm2/lib/resolver-compat.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,813
```unknown #!/usr/bin/env node require(__dirname +'/../lib/cli.js'); ```
/content/code_sandbox/node_modules/vm2/bin/vm2
unknown
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
17
```unknown #!/usr/bin/env node "use strict" require("../dist/bin.js") ```
/content/code_sandbox/node_modules/vm2/node_modules/acorn/bin/acorn
unknown
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
16
```javascript 'use strict'; // The Resolver is currently experimental and might be exposed to users in the future. const pa = require('path'); const fs = require('fs'); const { VMError } = require('./bridge'); const { VMScript } = require('./script'); // This should match. Note that '\', '%' are invalid characters...
/content/code_sandbox/node_modules/vm2/lib/resolver.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
9,397
```xml export as namespace acorn export = acorn declare namespace acorn { function parse(input: string, options: Options): Node function parseExpressionAt(input: string, pos: number, options: Options): Node function tokenizer(input: string, options: Options): { getToken(): Token [Symbol.iterator](): It...
/content/code_sandbox/node_modules/vm2/node_modules/acorn/dist/acorn.d.ts
xml
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,622
```unknown // This file was generated. Do not modify manually! var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 1...
/content/code_sandbox/node_modules/vm2/node_modules/acorn/dist/acorn.mjs
unknown
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
59,357
```xml import * as acorn from "./acorn"; export = acorn; ```
/content/code_sandbox/node_modules/vm2/node_modules/acorn/dist/acorn.mjs.d.ts
xml
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
16
```javascript 'use strict'; var path = require('path'); var fs = require('fs'); var acorn = require('./acorn.js'); function _interopNamespace(e) { if (e && e.__esModule) return e; var n = Object.create(null); if (e) { Object.keys(e).forEach(function (k) { if (k !== 'default') { var d = Object....
/content/code_sandbox/node_modules/vm2/node_modules/acorn/dist/bin.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
906
```javascript // Underscore.js 1.4.4 // path_to_url // (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc. // Underscore may be freely distributed under the MIT license. (function() { // Baseline setup // -------------- // Establish the root object, `window` in the browser, or `global` on the ser...
/content/code_sandbox/node_modules/underscore/underscore.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
10,405
```javascript module.exports = require('./underscore'); ```
/content/code_sandbox/node_modules/underscore/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
8
```unknown underscorejs.org ```
/content/code_sandbox/node_modules/underscore/CNAME
unknown
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
5
```javascript (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.acorn = {})); })(this,...
/content/code_sandbox/node_modules/vm2/node_modules/acorn/dist/acorn.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
60,612
```javascript (function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,d=e.filter,g=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,_=Object.keys,j=i.bind,w=functi...
/content/code_sandbox/node_modules/underscore/underscore-min.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
4,601
```unknown test/ Rakefile docs/ raw/ ```
/content/code_sandbox/node_modules/underscore/.npmignore
unknown
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
11
```javascript var Writable = require('readable-stream').Writable var inherits = require('inherits') var bufferFrom = require('buffer-from') if (typeof Uint8Array === 'undefined') { var U8 = require('typedarray').Uint8Array } else { var U8 = Uint8Array } function ConcatStream(opts, cb) { if (!(this instanceof Co...
/content/code_sandbox/node_modules/concat-stream/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,026
```javascript var assert = require('tap'); var t = require('./lib/util'); assert.equal(t.isArray([]), true); assert.equal(t.isArray({}), false); assert.equal(t.isBoolean(null), false); assert.equal(t.isBoolean(true), true); assert.equal(t.isBoolean(false), true); assert.equal(t.isNull(null), true); assert.equal(t.i...
/content/code_sandbox/node_modules/core-util-is/test.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
484
```diff diff --git a/lib/util.js b/lib/util.js index a03e874..9074e8e 100644 --- a/lib/util.js +++ b/lib/util.js @@ -19,430 +19,6 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -var formatRegExp = /%[sdj%]/g; -exports.format = function(f) { -...
/content/code_sandbox/node_modules/core-util-is/float.patch
diff
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
4,767
```javascript // // 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, modify, merge, publish, // distribute, sublic...
/content/code_sandbox/node_modules/core-util-is/lib/util.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
660
```javascript 'use strict' module.exports = function (Yallist) { Yallist.prototype[Symbol.iterator] = function* () { for (let walker = this.head; walker; walker = walker.next) { yield walker.value } } } ```
/content/code_sandbox/node_modules/yallist/iterator.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
55
```javascript 'use strict' module.exports = Yallist Yallist.Node = Node Yallist.create = Yallist function Yallist (list) { var self = this if (!(self instanceof Yallist)) { self = new Yallist() } self.tail = null self.head = null self.length = 0 if (list && typeof list.forEach === 'function') { ...
/content/code_sandbox/node_modules/yallist/yallist.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,526
```javascript var IncomingForm = require('./incoming_form').IncomingForm; IncomingForm.IncomingForm = IncomingForm; module.exports = IncomingForm; ```
/content/code_sandbox/node_modules/formidable/lib/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
28
```javascript var Buffer = require('buffer').Buffer, s = 0, S = { PARSER_UNINITIALIZED: s++, START: s++, START_BOUNDARY: s++, HEADER_FIELD_START: s++, HEADER_FIELD: s++, HEADER_VALUE_START: s++, HEADER_VALUE: s++, HEADER_VALUE_ALMOST_DONE: s++, HEADERS_ALMOST_...
/content/code_sandbox/node_modules/formidable/lib/multipart_parser.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,131
```javascript if (global.GENTLY) require = GENTLY.hijack(require); var Buffer = require('buffer').Buffer; function JSONParser(parent) { this.parent = parent; this.chunks = []; this.bytesWritten = 0; } exports.JSONParser = JSONParser; JSONParser.prototype.write = function(buffer) { this.bytesWritten += buffer...
/content/code_sandbox/node_modules/formidable/lib/json_parser.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
164
```javascript var EventEmitter = require('events').EventEmitter , util = require('util'); function OctetParser(options){ if(!(this instanceof OctetParser)) return new OctetParser(options); EventEmitter.call(this); } util.inherits(OctetParser, EventEmitter); exports.OctetParser = OctetParser; OctetParser.prototyp...
/content/code_sandbox/node_modules/formidable/lib/octet_parser.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
104
```javascript if (global.GENTLY) require = GENTLY.hijack(require); var util = require('util'), fs = require('fs'), EventEmitter = require('events').EventEmitter, crypto = require('crypto'); function File(properties) { EventEmitter.call(this); this.size = 0; this.path = null; this.name = null; t...
/content/code_sandbox/node_modules/formidable/lib/file.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
422
```javascript if (global.GENTLY) require = GENTLY.hijack(require); var crypto = require('crypto'); var fs = require('fs'); var util = require('util'), path = require('path'), File = require('./file'), MultipartParser = require('./multipart_parser').MultipartParser, QuerystringParser = require('./querys...
/content/code_sandbox/node_modules/formidable/lib/incoming_form.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,486
```javascript if (global.GENTLY) require = GENTLY.hijack(require); // This is a buffering parser, not quite as nice as the multipart one. // If I find time I'll rewrite this to be fully streaming as well var querystring = require('querystring'); function QuerystringParser(maxKeys) { this.maxKeys = maxKeys; this.b...
/content/code_sandbox/node_modules/formidable/lib/querystring_parser.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
176
```html <!DOCTYPE HTML> <html> <head> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> <meta http-equiv="X-UA-Compatible" content="chrome=1" /> <meta name="viewport" content="width=device-width" /> <link rel="canonical" href="path_to_url" /> <link rel="shortcut icon" href="favicon.ico" typ...
/content/code_sandbox/node_modules/underscore/index.html
html
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
26,089
```javascript var path = require('path'); var fs = require('fs'); var _0777 = parseInt('0777', 8); module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; function mkdirP (p, opts, f, made) { if (typeof opts === 'function') { f = opts; opts = {}; } else if (!opts || typeof opts !== 'objec...
/content/code_sandbox/node_modules/mkdirp/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
683
```javascript #!/usr/bin/env node var mkdirp = require('../'); var minimist = require('minimist'); var fs = require('fs'); var argv = minimist(process.argv.slice(2), { alias: { m: 'mode', h: 'help' }, string: [ 'mode' ] }); if (argv.help) { fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout...
/content/code_sandbox/node_modules/mkdirp/bin/cmd.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
197