text
stringlengths
9
39.2M
dir
stringlengths
26
295
lang
stringclasses
185 values
created_date
timestamp[us]
updated_date
timestamp[us]
repo_name
stringlengths
1
97
repo_full_name
stringlengths
7
106
star
int64
1k
183k
len_tokens
int64
1
13.8M
```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/superagent/node_modules/readable-stream/lib/_stream_readable.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
9,045
```javascript var util = require('util'); var Stream = require('stream').Stream; var DelayedStream = require('delayed-stream'); module.exports = CombinedStream; function CombinedStream() { this.writable = false; this.readable = true; this.dataSize = 0; this.maxDataSize = 2 * 1024 * 1024; this.pauseStreams = ...
/content/code_sandbox/node_modules/superagent/node_modules/combined-stream/lib/combined_stream.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,144
```javascript /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributio...
/content/code_sandbox/node_modules/esmangle-evaluator/common.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
465
```javascript /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistribut...
/content/code_sandbox/node_modules/esmangle-evaluator/evaluator.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,058
```javascript /*! * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ /** * Module dependencies. */ var crypto = require('crypto') , parse = require('url').parse ; /** * Valid keys. ...
/content/code_sandbox/node_modules/aws-sign2/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,062
```javascript var WritableStream = require('stream').Writable || require('readable-stream').Writable, inherits = require('util').inherits, inspect = require('util').inspect; var XRegExp = require('xregexp').XRegExp; var REX_LISTUNIX = XRegExp.cache('^(?<type>[\\-ld])(?<permission>([\\-r][...
/content/code_sandbox/node_modules/ftp/lib/parser.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,241
```javascript require('fs').readdirSync(__dirname).forEach(function(f) { if (f.substr(0, 5) === 'test-') require('./' + f); }); ```
/content/code_sandbox/node_modules/ftp/test/test.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
40
```javascript var Parser = require('../lib/parser'), parseListEntry = Parser.parseListEntry; var path = require('path'), assert = require('assert'), inspect = require('util').inspect; var group = path.basename(__filename, '.js') + '/'; [ { source: 'drwxr-xr-x 10 root root 4096 Dec 21 2012 usr', ...
/content/code_sandbox/node_modules/ftp/test/test-parser.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,227
```javascript var fs = require('fs'), tls = require('tls'), zlib = require('zlib'), Socket = require('net').Socket, EventEmitter = require('events').EventEmitter, inherits = require('util').inherits, inspect = require('util').inspect; var Parser = require('./parser'); var XRegExp = require('xre...
/content/code_sandbox/node_modules/ftp/lib/connection.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
7,653
```javascript 'use strict' module.exports = { afterRequest: require('./afterRequest.json'), beforeRequest: require('./beforeRequest.json'), browser: require('./browser.json'), cache: require('./cache.json'), content: require('./content.json'), cookie: require('./cookie.json'), creator: require('./creator...
/content/code_sandbox/node_modules/har-schema/lib/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
162
```javascript module.exports = Pend; function Pend() { this.pending = 0; this.max = Infinity; this.listeners = []; this.waiting = []; this.error = null; } Pend.prototype.go = function(fn) { if (this.pending < this.max) { pendGo(this, fn); } else { this.waiting.push(fn); } }; Pend.prototype.wa...
/content/code_sandbox/node_modules/pend/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
292
```javascript var assert = require('assert'); var Pend = require('./'); var tests = [ { name: "basic", fn: testBasic, }, { name: "max", fn: testWithMax, }, { name: "callback twice", fn: testCallbackTwice, }, { name: "calling wait twice", fn: testCallingWaitTwice, }, { ...
/content/code_sandbox/node_modules/pend/test.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
683
```javascript /** * marked - a markdown parser * path_to_url */ !function(e){"use strict";var k={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:f,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,nptable:f,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$...
/content/code_sandbox/node_modules/marked/marked.min.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
8,554
```groff .ds q \N'34' .TH marked 1 .SH NAME marked \- a javascript markdown parser .SH SYNOPSIS .B marked [\-o \fI<output>\fP] [\-i \fI<input>\fP] [\-\-help] [\-\-tokens] [\-\-pedantic] [\-\-gfm] [\-\-breaks] [\-\-tables] [\-\-sanitize] [\-\-smart\-lists] [\-\-lang\-prefix \fI<prefix>\fP] [\-\-no\-etc...] [\-\-silent...
/content/code_sandbox/node_modules/marked/man/marked.1
groff
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
759
```javascript /** * JSON Schema link handler */ (function (root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define([], function () { return factory(); }); } else if (typeof module === 'object' && module.exports) { ...
/content/code_sandbox/node_modules/json-schema/lib/links.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
509
```javascript /** * JSONSchema Validator - Validates JavaScript objects using JSON Schemas * (path_to_url To use the validator call the validate function with an instance object and an optional schema object. If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validat...
/content/code_sandbox/node_modules/json-schema/lib/validate.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,548
```javascript /** * marked - a markdown parser * path_to_url */ ;(function(root) { 'use strict'; /** * Block-Level Grammar */ var block = { newline: /^\n+/, code: /^( {4}[^\n]+\n*)+/, fences: noop, hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/, heading: /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)...
/content/code_sandbox/node_modules/marked/lib/marked.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
12,476
```javascript /* * Author: Alex Wilson <alex.wilson@joyent.com> * * 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, ...
/content/code_sandbox/node_modules/getpass/lib/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
883
```javascript "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; const agent_1 = __importDefault(require("./agent")); function createSocksProxyAgent(opts) { return new agent_1.default(opts); } (function (createSock...
/content/code_sandbox/node_modules/socks-proxy-agent/dist/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
138
```javascript "use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfil...
/content/code_sandbox/node_modules/socks-proxy-agent/dist/agent.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,384
```javascript // Generated by LiveScript 1.4.0 var apply, curry, flip, fix, over, memoize, slice$ = [].slice, toString$ = {}.toString; apply = curry$(function(f, list){ return f.apply(null, list); }); curry = function(f){ return curry$(f); }; flip = curry$(function(f, x, y){ return f(y, x); }); fix = function(f){...
/content/code_sandbox/node_modules/prelude-ls/lib/Func.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
448
```javascript // Generated by LiveScript 1.4.0 var Func, List, Obj, Str, Num, id, isType, replicate, prelude, toString$ = {}.toString; Func = require('./Func.js'); List = require('./List.js'); Obj = require('./Obj.js'); Str = require('./Str.js'); Num = require('./Num.js'); id = function(x){ return x; }; isType = curr...
/content/code_sandbox/node_modules/prelude-ls/lib/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,405
```javascript // Generated by LiveScript 1.4.0 var max, min, negate, abs, signum, quot, rem, div, mod, recip, pi, tau, exp, sqrt, ln, pow, sin, tan, cos, asin, acos, atan, atan2, truncate, round, ceiling, floor, isItNaN, even, odd, gcd, lcm; max = curry$(function(x$, y$){ return x$ > y$ ? x$ : y$; }); min = curry$(fu...
/content/code_sandbox/node_modules/prelude-ls/lib/Num.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
840
```javascript // Generated by LiveScript 1.4.0 var values, keys, pairsToObj, objToPairs, listsToObj, objToLists, empty, each, map, compact, filter, reject, partition, find; values = function(object){ var i$, x, results$ = []; for (i$ in object) { x = object[i$]; results$.push(x); } return results$; }; k...
/content/code_sandbox/node_modules/prelude-ls/lib/Obj.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,006
```javascript // Generated by LiveScript 1.4.0 var split, join, lines, unlines, words, unwords, chars, unchars, reverse, repeat, capitalize, camelize, dasherize; split = curry$(function(sep, str){ return str.split(sep); }); join = curry$(function(sep, xs){ return xs.join(sep); }); lines = function(str){ if (!str....
/content/code_sandbox/node_modules/prelude-ls/lib/Str.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
585
```javascript /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistribut...
/content/code_sandbox/node_modules/esutils/lib/keyword.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,379
```javascript /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistribut...
/content/code_sandbox/node_modules/esutils/lib/utils.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
299
```javascript // Generated by LiveScript 1.4.0 var each, map, compact, filter, reject, partition, find, head, first, tail, last, initial, empty, reverse, unique, uniqueBy, fold, foldl, fold1, foldl1, foldr, foldr1, unfoldr, concat, concatMap, flatten, difference, intersection, union, countBy, groupBy, andList, orList, ...
/content/code_sandbox/node_modules/prelude-ls/lib/List.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
5,254
```javascript /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistribut...
/content/code_sandbox/node_modules/esutils/lib/ast.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
907
```javascript /*! * unpipe */ 'use strict' /** * Module exports. * @public */ module.exports = unpipe /** * Determine if there are Node.js pipe-like data listeners. * @private */ function hasPipeDataListeners(stream) { var listeners = stream.listeners('data') for (var i = 0; i < listeners.length; i++)...
/content/code_sandbox/node_modules/unpipe/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
277
```javascript "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; const agent_1 = __importDefault(require("./agent")); function createHttpProxyAgent(opts) { return new agent_1.default(opts); } (function (createHttpP...
/content/code_sandbox/node_modules/http-proxy-agent/dist/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
130
```javascript "use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfil...
/content/code_sandbox/node_modules/http-proxy-agent/dist/agent.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,433
```javascript /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistribut...
/content/code_sandbox/node_modules/esutils/lib/code.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
16,175
```javascript exports = module.exports = stringify exports.getSerialize = serializer function stringify(obj, replacer, spaces, cycleReplacer) { return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces) } function serializer(replacer, cycleReplacer) { var stack = [], keys = [] if (cycleReplacer ==...
/content/code_sandbox/node_modules/json-stringify-safe/stringify.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
232
```javascript var Sinon = require("sinon") var stringify = require("..") function jsonify(obj) { return JSON.stringify(obj, null, 2) } describe("Stringify", function() { it("must stringify circular objects", function() { var obj = {name: "Alice"} obj.self = obj var json = stringify(obj, null, 2) json...
/content/code_sandbox/node_modules/json-stringify-safe/test/stringify_test.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,161
```javascript // Use node-qunit to run the tests. var qunit = require("qunit"); qunit.run({ code: { namespace: "xregexp", path: __dirname + "/../xregexp-all.js" }, tests: __dirname + "/tests.js" }); ```
/content/code_sandbox/node_modules/xregexp/tests/node-qunit.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
61
```javascript // In Node.JS, `module` is a predefined object, which makes the QUnit `module` definitions fail // unless we redefine it. module = QUnit.module; // When using node-qunit on the command line, the module is imported as is and we need to point at // the XRegExp class inside the module. This does nothing in ...
/content/code_sandbox/node_modules/xregexp/tests/tests.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
12,190
```javascript 'use strict'; var traverse = module.exports = function (schema, opts, cb) { // Legacy support for v0.3.1 and earlier. if (typeof opts == 'function') { cb = opts; opts = {}; } cb = opts.cb || cb; var pre = (typeof cb == 'function') ? cb : cb.pre || function() {}; var post = cb.post ||...
/content/code_sandbox/node_modules/json-schema-traverse/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
653
```yaml extends: eslint:recommended env: node: true browser: true rules: block-scoped-var: 2 complexity: [2, 13] curly: [2, multi-or-nest, consistent] dot-location: [2, property] dot-notation: 2 indent: [2, 2, SwitchCase: 1] linebreak-style: [2, unix] new-cap: 2 no-console: [2, allow: [warn, error...
/content/code_sandbox/node_modules/json-schema-traverse/.eslintrc.yml
yaml
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
239
```javascript 'use strict'; var traverse = require('../index'); var assert = require('assert'); describe('json-schema-traverse', function() { var calls; beforeEach(function() { calls = []; }); it('should traverse all keywords containing schemas recursively', function() { var schema = require('./fixt...
/content/code_sandbox/node_modules/json-schema-traverse/spec/index.spec.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,349
```yaml parserOptions: ecmaVersion: 6 globals: beforeEach: false describe: false it: false ```
/content/code_sandbox/node_modules/json-schema-traverse/spec/.eslintrc.yml
yaml
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
29
```javascript 'use strict'; var schema = { additionalItems: subschema('additionalItems'), items: subschema('items'), contains: subschema('contains'), additionalProperties: subschema('additionalProperties'), propertyNames: subschema('propertyNames'), not: subschema('not'), allOf: [ subschema('allOf_0'...
/content/code_sandbox/node_modules/json-schema-traverse/spec/fixtures/schema.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,668
```javascript /***** xregexp.js *****/ /*! * XRegExp v2.0.0 * (c) 2007-2012 Steven Levithan <path_to_url */ /** * XRegExp provides augmented, extensible JavaScript regular expressions. You get new syntax, * flags, and methods beyond what browsers support natively. XRegExp is also a regex utility belt * with to...
/content/code_sandbox/node_modules/xregexp/xregexp-all.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
26,310
```javascript var undefined = (void 0); // Paranoia // Beyond this value, index getters/setters (i.e. array[0], array[1]) are so slow to // create, and consume so much memory, that the browser appears frozen. var MAX_ARRAY_LENGTH = 1e5; // Approximations of internal ECMAScript conversion functions var ECMAScript = (f...
/content/code_sandbox/node_modules/typedarray/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
5,766
```markdown # typedarray TypedArray polyfill ripped from [this module](path_to_url [![build status](path_to_url [![testling badge](path_to_url # example ``` js var Uint8Array = require('typedarray').Uint8Array; var ua = new Uint8Array(5); ua[1] = 256 + 55; console.log(ua[1]); ``` output: ``` 55 ``` # methods `...
/content/code_sandbox/node_modules/typedarray/readme.markdown
markdown
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
249
```javascript var Uint8Array = require('../').Uint8Array; var ua = new Uint8Array(5); ua[1] = 256 + 55; console.log(ua[1]); ```
/content/code_sandbox/node_modules/typedarray/example/tarray.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
41
```javascript var TA = require('../'); var test = require('tape'); test('tiny u8a test', function (t) { var ua = new(TA.Uint8Array)(5); t.equal(ua.length, 5); ua[1] = 256 + 55; t.equal(ua[1], 55); t.end(); }); ```
/content/code_sandbox/node_modules/typedarray/test/tarray.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
78
```javascript var test = require('tape'); var vm = require('vm'); var fs = require('fs'); var src = fs.readFileSync(__dirname + '/../../index.js', 'utf8'); test('u8a without globals', function (t) { var c = { module: { exports: {} }, }; c.exports = c.module.exports; vm.runInNewContext(src, c); ...
/content/code_sandbox/node_modules/typedarray/test/server/undef_globals.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
145
```javascript /** * Export cheerio (with ) */ exports = module.exports = require('./lib/cheerio'); /* Export the version */ exports.version = require('./package').version; ```
/content/code_sandbox/node_modules/cheerio/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
39
```javascript /* Module dependencies */ var parse = require('./parse'), isHtml = require('./utils').isHtml, _ = require('lodash'); /* * The API */ var api = [ require('./api/attributes'), require('./api/traversing'), require('./api/manipulation'), require('./api/css'), require('./api/forms') ];...
/content/code_sandbox/node_modules/cheerio/lib/cheerio.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
764
```javascript /* Module Dependencies */ var htmlparser = require('htmlparser2'); /* Parser */ exports = module.exports = function(content, options) { var dom = exports.evaluate(content, options), // Generic root element root = exports.evaluate('<root></root>', options)[0]; root.type = 'root'; /...
/content/code_sandbox/node_modules/cheerio/lib/parse.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
455
```javascript var parse = require('./parse'), render = require('dom-serializer'); /** * HTML Tags */ var tags = { tag: true, script: true, style: true }; /** * Check if the DOM element is a tag * * isTag(type) includes <script> and <style> tags */ exports.isTag = function(type) { if (type.type) type = t...
/content/code_sandbox/node_modules/cheerio/lib/utils.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
574
```javascript /** * Module dependencies */ var select = require('css-select'), parse = require('./parse'), serialize = require('dom-serializer'), _ = require('lodash'); /** * $.load(str) */ exports.load = function(content, options) { var Cheerio = require('./cheerio'); options = _.defaults(optio...
/content/code_sandbox/node_modules/cheerio/lib/static.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,075
```javascript var _ = require('lodash'), $ = require('../static'), utils = require('../utils'), isTag = utils.isTag, domEach = utils.domEach, hasOwn = Object.prototype.hasOwnProperty, camelCase = utils.camelCase, cssCase = utils.cssCase, rspace = /\s+/, dataAttrPrefix = 'data-', // Lookup table for...
/content/code_sandbox/node_modules/cheerio/lib/api/attributes.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,018
```javascript var _ = require('lodash'), select = require('css-select'), utils = require('../utils'), domEach = utils.domEach, uniqueSort = require('htmlparser2').DomUtils.uniqueSort, isTag = utils.isTag; exports.find = function(selectorOrHaystack) { var elems = _.reduce(this, function(memo, elem...
/content/code_sandbox/node_modules/cheerio/lib/api/traversing.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,772
```javascript var _ = require('lodash'), domEach = require('../utils').domEach; var toString = Object.prototype.toString; /** * Set / Get css. * * @param {String|Object} prop * @param {String} val * @return {self} * @api public */ exports.css = function(prop, val) { if (arguments.length === 2 || // W...
/content/code_sandbox/node_modules/cheerio/lib/api/css.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
648
```javascript // path_to_url // path_to_url var _ = require('lodash'), submittableSelector = 'input,select,textarea,keygen', rCRLF = /\r?\n/g; exports.serializeArray = function() { // Resolve all form elements from either forms or collections of form elements var Cheerio = this.constructor; return this.m...
/content/code_sandbox/node_modules/cheerio/lib/api/forms.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
511
```javascript var _ = require('lodash'), parse = require('../parse'), $ = require('../static'), updateDOM = parse.update, evaluate = parse.evaluate, utils = require('../utils'), domEach = utils.domEach, cloneDom = utils.cloneDom, isHtml = utils.isHtml, slice = Array.prototype.slice; ...
/content/code_sandbox/node_modules/cheerio/lib/api/manipulation.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,687
```javascript var Stream = require('stream') // through // // a stream that does nothing but re-emit the input. // useful for aggregating a series of changing but not ending streams into one stream) exports = module.exports = through through.through = through //create a readable writable stream. function through (w...
/content/code_sandbox/node_modules/through/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
647
```markdown #through [![build status](path_to_url [![testling badge](path_to_url Easy way to create a `Stream` that is both `readable` and `writable`. * Pass in optional `write` and `end` methods. * `through` takes care of pause/resume logic if you use `this.queue(data)` instead of `this.emit('data', data)`. * Use ...
/content/code_sandbox/node_modules/through/readme.markdown
markdown
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
382
```javascript var test = require('tape') var through = require('../') // must emit end before close. test('end before close', function (assert) { var ts = through() ts.autoDestroy = false var ended = false, closed = false ts.on('end', function () { assert.ok(!closed) ended = true }) ts.on('close'...
/content/code_sandbox/node_modules/through/test/auto-destroy.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
149
```javascript var from = require('from') var through = require('../') var tape = require('tape') tape('simple async example', function (t) { var n = 0, expected = [1,2,3,4,5], actual = [] from(expected) .pipe(through(function(data) { this.pause() n ++ setTimeout(function(){ console.log('push...
/content/code_sandbox/node_modules/through/test/async.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
172
```javascript var test = require('tape') var spec = require('stream-spec') var through = require('../') /* I'm using these two functions, and not streams and pipe so there is less to break. if this test fails it must be the implementation of _through_ */ function write(array, stream) { array = array.slice() ...
/content/code_sandbox/node_modules/through/test/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
626
```javascript var test = require('tape') var through = require('../') // must emit end before close. test('end before close', function (assert) { var ts = through() var ended = false, closed = false ts.on('end', function () { assert.ok(!closed) ended = true }) ts.on('close', function () { asser...
/content/code_sandbox/node_modules/through/test/end.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
206
```javascript var test = require('tape') var through = require('../') // must emit end before close. test('buffering', function(assert) { var ts = through(function (data) { this.queue(data) }, function () { this.queue(null) }) var ended = false, actual = [] ts.on('data', actual.push.bind(actual))...
/content/code_sandbox/node_modules/through/test/buffering.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
440
```javascript 'use strict'; var GetIntrinsic = require('get-intrinsic'); var callBound = require('call-bind/callBound'); var inspect = require('object-inspect'); var $TypeError = GetIntrinsic('%TypeError%'); var $WeakMap = GetIntrinsic('%WeakMap%', true); var $Map = GetIntrinsic('%Map%', true); var $weakMapGet = cal...
/content/code_sandbox/node_modules/side-channel/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
982
```javascript 'use strict'; var test = require('tape'); var getSideChannel = require('../'); test('export', function (t) { t.equal(typeof getSideChannel, 'function', 'is a function'); t.equal(getSideChannel.length, 0, 'takes no arguments'); var channel = getSideChannel(); t.ok(channel, 'is truthy'); t.equal(ty...
/content/code_sandbox/node_modules/side-channel/test/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
458
```javascript (function(){ // All Rights Reserved. // See "LICENSE" for details. // Basic JavaScript BN library - subset useful for RSA encryption. // Bits per digit var dbits; // JavaScript engine analysis var canary = 0xdeadbeefcafe; var j_lm = ((canary&0xffffff)==0xefcafe); /...
/content/code_sandbox/node_modules/jsbn/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
13,824
```javascript var BigInteger = require('./'); var a = new BigInteger('91823918239182398123'); console.log(a.bitLength()); ```
/content/code_sandbox/node_modules/jsbn/example.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
27
```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title></title> </head> <body> <script src="index.js"></script> </body> </html> ```
/content/code_sandbox/node_modules/jsbn/example.html
html
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
55
```javascript 'use strict'; /** * @param typeMap [Object] Map of MIME type -> Array[extensions] * @param ... */ function Mime() { this._types = Object.create(null); this._extensions = Object.create(null); for (let i = 0; i < arguments.length; i++) { this.define(arguments[i]); } this.define = this.de...
/content/code_sandbox/node_modules/mime/mime.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
731
```javascript #!/usr/bin/env node 'use strict'; process.title = 'mime'; let mime = require('.'); let pkg = require('./package.json'); let args = process.argv.splice(2); if (args.includes('--version') || args.includes('-v') || args.includes('--v')) { console.log(pkg.version); process.exit(0); } else if (args.incl...
/content/code_sandbox/node_modules/mime/cli.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
302
```javascript 'use strict'; let Mime = require('./Mime'); module.exports = new Mime(require('./types/standard'), require('./types/other')); ```
/content/code_sandbox/node_modules/mime/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
29
```javascript 'use strict'; let Mime = require('./Mime'); module.exports = new Mime(require('./types/standard')); ```
/content/code_sandbox/node_modules/mime/lite.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
23
```javascript module.exports = {"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["hel...
/content/code_sandbox/node_modules/mime/types/standard.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,749
```javascript module.exports = {"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":...
/content/code_sandbox/node_modules/mime/types/other.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
6,915
```javascript var Stack = require('./_Stack'), arrayEach = require('./_arrayEach'), assignValue = require('./_assignValue'), baseAssign = require('./_baseAssign'), baseAssignIn = require('./_baseAssignIn'), cloneBuffer = require('./_cloneBuffer'), copyArray = require('./_copyArray'), copySym...
/content/code_sandbox/node_modules/lodash/_baseClone.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,476
```javascript var arrayPush = require('./_arrayPush'), baseFlatten = require('./_baseFlatten'), copyArray = require('./_copyArray'), isArray = require('./isArray'); /** * Creates a new array concatenating `array` with any additional arrays * and/or values. * * @static * @memberOf _ * @since 4.0.0 * ...
/content/code_sandbox/node_modules/lodash/concat.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
280
```javascript module.exports = require('./toPairs'); ```
/content/code_sandbox/node_modules/lodash/entries.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
9
```javascript var root = require('./_root'), toString = require('./toString'); /** Used to match leading whitespace. */ var reTrimStart = /^\s+/; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeParseInt = root.parseInt; /** * Converts `string` to an integer of ...
/content/code_sandbox/node_modules/lodash/parseInt.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
366
```javascript var createMathOperation = require('./_createMathOperation'); /** * Adds two numbers. * * @static * @memberOf _ * @since 3.4.0 * @category Math * @param {number} augend The first number in an addition. * @param {number} addend The second number in an addition. * @returns {number} Returns the tota...
/content/code_sandbox/node_modules/lodash/add.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
136
```javascript var arrayEvery = require('./_arrayEvery'), createOver = require('./_createOver'); /** * Creates a function that checks if **all** of the `predicates` return * truthy when invoked with the arguments it receives. * * Following shorthands are possible for providing predicates. * Pass an `Object` an...
/content/code_sandbox/node_modules/lodash/overEvery.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
235
```javascript var baseConformsTo = require('./_baseConformsTo'), keys = require('./keys'); /** * The base implementation of `_.conforms` which doesn't clone `source`. * * @private * @param {Object} source The object of property predicates to conform to. * @returns {Function} Returns the new spec function. */...
/content/code_sandbox/node_modules/lodash/_baseConforms.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
116
```javascript module.exports = { 'countBy': require('./countBy'), 'each': require('./each'), 'eachRight': require('./eachRight'), 'every': require('./every'), 'filter': require('./filter'), 'find': require('./find'), 'findLast': require('./findLast'), 'flatMap': require('./flatMap'), 'flatMapDeep': re...
/content/code_sandbox/node_modules/lodash/collection.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
250
```javascript var baseSortedIndex = require('./_baseSortedIndex'); /** * Uses a binary search to determine the lowest index at which `value` * should be inserted into `array` in order to maintain its sort order. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The sorted array ...
/content/code_sandbox/node_modules/lodash/sortedIndex.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
165
```javascript var apply = require('./_apply'), baseRest = require('./_baseRest'), customDefaultsMerge = require('./_customDefaultsMerge'), mergeWith = require('./mergeWith'); /** * This method is like `_.defaults` except that it recursively assigns * default properties. * * **Note:** This method mutate...
/content/code_sandbox/node_modules/lodash/defaultsDeep.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
234
```javascript module.exports = require('./forEachRight'); ```
/content/code_sandbox/node_modules/lodash/eachRight.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
9
```javascript var Symbol = require('./_Symbol'), getRawTag = require('./_getRawTag'), objectToString = require('./_objectToString'); /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; /** Built-in value references. */ var symToStringTag = Symbol...
/content/code_sandbox/node_modules/lodash/_baseGetTag.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
187
```javascript var createCaseFirst = require('./_createCaseFirst'); /** * Converts the first character of `string` to lower case. * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to convert. * @returns {string} Returns the converted string. * @example * * _...
/content/code_sandbox/node_modules/lodash/lowerFirst.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
128
```javascript var metaMap = require('./_metaMap'), noop = require('./noop'); /** * Gets metadata for `func`. * * @private * @param {Function} func The function to query. * @returns {*} Returns the metadata for `func`. */ var getData = !metaMap ? noop : function(func) { return metaMap.get(func); }; module....
/content/code_sandbox/node_modules/lodash/_getData.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
81
```javascript var createPadding = require('./_createPadding'), stringSize = require('./_stringSize'), toInteger = require('./toInteger'), toString = require('./toString'); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeCeil = Math.ceil, nativeFloor = ...
/content/code_sandbox/node_modules/lodash/pad.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
353
```javascript /** Used to match words composed of alphanumeric characters. */ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; /** * Splits an ASCII `string` into an array of its words. * * @private * @param {string} The string to inspect. * @returns {Array} Returns the words of `string`. */ functi...
/content/code_sandbox/node_modules/lodash/_asciiWords.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
117
```javascript var arrayShuffle = require('./_arrayShuffle'), baseShuffle = require('./_baseShuffle'), isArray = require('./isArray'); /** * Creates an array of shuffled values, using a version of the * [Fisher-Yates shuffle](path_to_url * * @static * @memberOf _ * @since 0.1.0 * @category Collection * ...
/content/code_sandbox/node_modules/lodash/shuffle.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
177
```javascript var castFunction = require('./_castFunction'), partial = require('./partial'); /** * Creates a function that provides `value` to `wrapper` as its first * argument. Any additional arguments provided to the function are appended * to those provided to the `wrapper`. The wrapper is invoked with the `...
/content/code_sandbox/node_modules/lodash/wrap.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
228
```javascript var arrayLikeKeys = require('./_arrayLikeKeys'), baseKeysIn = require('./_baseKeysIn'), isArrayLike = require('./isArrayLike'); /** * Creates an array of the own and inherited enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @membe...
/content/code_sandbox/node_modules/lodash/keysIn.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
212
```javascript var baseNth = require('./_baseNth'), toInteger = require('./toInteger'); /** * Gets the element at index `n` of `array`. If `n` is negative, the nth * element from the end is returned. * * @static * @memberOf _ * @since 4.11.0 * @category Array * @param {Array} array The array to query. * @p...
/content/code_sandbox/node_modules/lodash/nth.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
207
```javascript var baseRange = require('./_baseRange'), isIterateeCall = require('./_isIterateeCall'), toFinite = require('./toFinite'); /** * Creates a `_.range` or `_.rangeRight` function. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the ...
/content/code_sandbox/node_modules/lodash/_createRange.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
230
```javascript /** Used to detect strings that need a more robust regexp to match words. */ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; /** * Checks if `string` contains a word composed of Unicode symbols. * * @private * @param {string} string The string to inspect. ...
/content/code_sandbox/node_modules/lodash/_hasUnicodeWord.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
141
```javascript var apply = require('./_apply'), createCtor = require('./_createCtor'), createHybrid = require('./_createHybrid'), createRecurry = require('./_createRecurry'), getHolder = require('./_getHolder'), replaceHolders = require('./_replaceHolders'), root = require('./_root'); /** * Cre...
/content/code_sandbox/node_modules/lodash/_createCurry.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
354
```javascript /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } mo...
/content/code_sandbox/node_modules/lodash/_baseUnary.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
76