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
```html <!DOCTYPE html> <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> <head> <meta charset="utf-8" /> <title>Esprima: Compatibility Tests</title> <meta name="viewport" content="width=device-width" /> <link rel="styles...
/content/code_sandbox/node_modules/esprima-fb/test/compat.html
html
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,148
```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/esprima-fb/test/compare.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,031
```html <!doctype html> <html> <head> <title>Code coverage report for esprima/esprima.js</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta http-equiv="content-language" content="en-gb"> <link rel='stylesheet' href='../prettify.css'> <style type='text/css...
/content/code_sandbox/node_modules/esprima-fb/test/esprima.js.html
html
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
94,867
```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/esprima-fb/test/benchmarks.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,176
```html <!DOCTYPE html> <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> <head> <meta charset="utf-8" /> <title>Esprima: Unit Tests</title> <meta name="viewport" content="width=device-width" /> <link rel="stylesheet" hre...
/content/code_sandbox/node_modules/esprima-fb/test/coverage.html
html
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,131
```javascript var testFixture; var fbTestFixture = { 'XJS': { '<a />': { type: "ExpressionStatement", expression: { type: "XJSElement", openingElement: { type: "XJSOpeningElement", name: { type...
/content/code_sandbox/node_modules/esprima-fb/test/fbtest.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
18,538
```html <!DOCTYPE html> <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> <head> <meta charset="utf-8" /> <title>Esprima: Benchmarks</title> <meta name="viewport" content="width=device-width" /> <link rel="stylesheet" hre...
/content/code_sandbox/node_modules/esprima-fb/test/benchmarks.html
html
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,287
```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/esprima-fb/test/run.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
446
```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/esprima-fb/test/compat.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,537
```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/esprima-fb/test/harmonytest.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
84,758
```html <!DOCTYPE html> <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> <head> <meta charset="utf-8" /> <title>Esprima: Unit Tests</title> <meta name="viewport" content="width=device-width" /> <link rel="stylesheet" hre...
/content/code_sandbox/node_modules/esprima-fb/test/index.html
html
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,151
```javascript #!/usr/bin/env node /* 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 disclaime...
/content/code_sandbox/node_modules/esprima-fb/bin/esvalidate.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,567
```javascript #!/usr/bin/env node /* 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 disclaime...
/content/code_sandbox/node_modules/esprima-fb/bin/esparse.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
966
```javascript // Usage: node detectnestedternary.js /path/to/some/directory // For more details, please read path_to_url#nestedternary /*jslint node:true sloppy:true plusplus:true */ var fs = require('fs'), esprima = require('../esprima'), dirname = process.argv[2]; // Executes visitor on the object and its...
/content/code_sandbox/node_modules/esprima-fb/examples/detectnestedternary.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
632
```javascript // Usage: node findbooleantrap.js /path/to/some/directory // For more details, please read path_to_url#booleantrap. /*jslint node:true sloppy:true plusplus:true */ var fs = require('fs'), esprima = require('../esprima'), dirname = process.argv[2], doubleNegativeList = []; // Black-list of ...
/content/code_sandbox/node_modules/esprima-fb/examples/findbooleantrap.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,027
```javascript /*jslint node:true */ var fs = require('fs'), esprima = require('../esprima'), files = process.argv.splice(2), histogram, type; histogram = { Boolean: 0, Identifier: 0, Keyword: 0, Null: 0, Numeric: 0, Punctuator: 0, RegularExpression: 0, String: 0 }; file...
/content/code_sandbox/node_modules/esprima-fb/examples/tokendist.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
184
```html <!DOCTYPE html> <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> <head> <meta charset="utf-8" /> <title>Esprima Documentation</title> <meta name="viewport" content="width=device-width" /> <link rel="stylesheet" t...
/content/code_sandbox/node_modules/esprima-fb/doc/index.html
html
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
4,557
```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/esprima-fb/test/test.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
149,102
```javascript var Transform = require('readable-stream/transform') , inherits = require('util').inherits , xtend = require('xtend') function DestroyableTransform(opts) { Transform.call(this, opts) this._destroyed = false } inherits(DestroyableTransform, Transform) DestroyableTransform.prototype.destroy ...
/content/code_sandbox/node_modules/through2/through2.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
523
```javascript var Stream = require('stream'); // hack to fix a circular dependency issue when used with browserify exports = module.exports = require('./lib/_stream_readable.js'); exports.Stream = Stream; exports.Readable = exports; exports.Writable = require('./lib/_stream_writable.js'); exports.Duplex = require('./li...
/content/code_sandbox/node_modules/through2/node_modules/readable-stream/readable.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
121
```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/through2/node_modules/readable-stream/lib/_stream_transform.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,733
```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/through2/node_modules/readable-stream/lib/_stream_writable.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,685
```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/through2/node_modules/readable-stream/lib/_stream_readable.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
7,019
```javascript /** * dashdash - A light, featureful and explicit option parsing library for * node.js. */ // vim: set ts=4 sts=4 sw=4 et: var assert = require('assert-plus'); var format = require('util').format; var fs = require('fs'); var path = require('path'); var DEBUG = true; if (DEBUG) { var debug = cons...
/content/code_sandbox/node_modules/dashdash/lib/dashdash.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
8,347
```javascript "use strict"; var BOMChar = '\uFEFF'; exports.PrependBOM = PrependBOMWrapper function PrependBOMWrapper(encoder, options) { this.encoder = encoder; this.addBOM = true; } PrependBOMWrapper.prototype.write = function(str) { if (this.addBOM) { str = BOMChar + str; this.addBOM =...
/content/code_sandbox/node_modules/raw-body/node_modules/iconv-lite/lib/bom-handling.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
271
```javascript /*! * raw-body */ 'use strict' /** * Module dependencies. * @private */ var asyncHooks = tryRequireAsyncHooks() var bytes = require('bytes') var createError = require('http-errors') var iconv = require('iconv-lite') var unpipe = require('unpipe') /** * Module exports. * @public */ module.expo...
/content/code_sandbox/node_modules/raw-body/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,703
```javascript "use strict"; // Some environments don't have global Buffer (e.g. React Native). // Solution would be installing npm modules "buffer" and "stream" explicitly. var Buffer = require("safer-buffer").Buffer; var bomHandling = require("./bom-handling"), iconv = module.exports; // All codecs and aliases ...
/content/code_sandbox/node_modules/raw-body/node_modules/iconv-lite/lib/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,134
```javascript "use strict"; var Buffer = require("buffer").Buffer, Transform = require("stream").Transform; // == Exports ================================================================== module.exports = function(iconv) { // Additional Public API. iconv.encodeStream = function encodeStream(encodin...
/content/code_sandbox/node_modules/raw-body/node_modules/iconv-lite/lib/streams.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
744
```javascript "use strict"; var Buffer = require("safer-buffer").Buffer; // Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that // correspond to encoded bytes (if 128 - then lower half is ASCII). exports._sbcs = SBCSCodec; function SBCSCodec(codecOptions, iconv) { if (!codecOp...
/content/code_sandbox/node_modules/raw-body/node_modules/iconv-lite/encodings/sbcs-codec.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
574
```javascript "use strict"; // Update this array if you add/rename/remove files in this directory. // We support Browserify by skipping automatic module discovery and requiring modules directly. var modules = [ require("./internal"), require("./utf16"), require("./utf7"), require("./sbcs-codec"), r...
/content/code_sandbox/node_modules/raw-body/node_modules/iconv-lite/encodings/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
164
```javascript "use strict"; var Buffer = require("buffer").Buffer; // Note: not polyfilled with safer-buffer on a purpose, as overrides Buffer // == Extend Node primitives to use iconv-lite ================================= module.exports = function (iconv) { var original = undefined; // Place to keep original me...
/content/code_sandbox/node_modules/raw-body/node_modules/iconv-lite/lib/extend-node.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,675
```javascript "use strict"; // Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script. module.exports = { "437": "cp437", "737": "cp737", "775": "cp775", "850": "cp850", "852": "cp852", "855": "cp855", "856": "cp856", "857": "cp857", "858": "cp858", "860"...
/content/code_sandbox/node_modules/raw-body/node_modules/iconv-lite/encodings/sbcs-data-generated.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,677
```javascript "use strict"; // Description of supported double byte encodings and aliases. // Tables are not require()-d until they are needed to speed up library load. // require()-s are direct to support Browserify. module.exports = { // == Japanese/ShiftJIS ================================================...
/content/code_sandbox/node_modules/raw-body/node_modules/iconv-lite/encodings/dbcs-data.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,311
```javascript "use strict"; var Buffer = require("safer-buffer").Buffer; // Multibyte codec. In this scheme, a character is represented by 1 or more bytes. // Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences. // To save memory and loading time, we read table files only when requested....
/content/code_sandbox/node_modules/raw-body/node_modules/iconv-lite/encodings/dbcs-codec.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
5,470
```javascript "use strict"; var Buffer = require("safer-buffer").Buffer; // Export Node.js internal encodings. module.exports = { // Encodings utf8: { type: "_internal", bomAware: true}, cesu8: { type: "_internal", bomAware: true}, unicode11utf8: "utf8", ucs2: { type: "_internal", bomAware: ...
/content/code_sandbox/node_modules/raw-body/node_modules/iconv-lite/encodings/internal.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,484
```javascript "use strict"; // Manually added data to be used by sbcs codec in addition to generated one. module.exports = { // Not supported by iconv, not sure why. "10029": "maccenteuro", "maccenteuro": { "type": "_sbcs", "chars": "" }, "808": "cp808", "ibm808": "cp808", ...
/content/code_sandbox/node_modules/raw-body/node_modules/iconv-lite/encodings/sbcs-data.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,483
```javascript "use strict"; var Buffer = require("safer-buffer").Buffer; // Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js // == UTF16-BE codec. ========================================================== exports.utf16be = Utf16BECodec; function Utf16BECodec() { } Utf16BECodec.prototype....
/content/code_sandbox/node_modules/raw-body/node_modules/iconv-lite/encodings/utf16.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,309
```javascript var Syntax = require('esprima-fb').Syntax; var jstransform = require('jstransform'); var through = require('through'); var utils = require('jstransform/src/utils'); var reserved = [ "break", "case", "catch", "continue", "default", "delete", "do", "else", "finally", "for", "function", "if", "in", ...
/content/code_sandbox/node_modules/es3ify/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,061
```javascript "use strict"; var Buffer = require("safer-buffer").Buffer; // UTF-7 codec, according to path_to_url // See also below a UTF-7-IMAP codec, according to path_to_url#section-5.1.3 exports.utf7 = Utf7Codec; exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7 function Utf7Codec(codecOptions, iconv) { ...
/content/code_sandbox/node_modules/raw-body/node_modules/iconv-lite/encodings/utf7.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,535
```javascript var transform = require('../index.js').transform; describe('es3ify', function() { it('should quote property keys', function() { expect(transform('x = {dynamic: 0, static: 17};')) .toEqual('x = {dynamic: 0, "static": 17};'); }); it('should quote member properties', fun...
/content/code_sandbox/node_modules/es3ify/spec/es3ifyspec.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
329
```javascript // Acorn is a tiny, fast JavaScript parser written in JavaScript. // // Acorn was written by Marijn Haverbeke, Ingvar Stepanyan, and // various contributors and released under an MIT license. // // Git repositories for Acorn are available at // // path_to_url // path_to_url // // Please use the [g...
/content/code_sandbox/node_modules/acorn/src/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
576
```javascript // ## Token types // The assignment of fine-grained, information-carrying type objects // allows the tokenizer to store the information it has about a // token in a way that is very cheap for the parser to look up. // All token type variables start with an underscore, to make them // easy to recognize. ...
/content/code_sandbox/node_modules/acorn/src/tokentype.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,296
```javascript import {types as tt} from "./tokentype" import {Parser} from "./state" import {reservedWords} from "./identifier" import {has} from "./util" const pp = Parser.prototype // Convert existing expression atom to assignable pattern // if possible. pp.toAssignable = function(node, isBinding) { if (this.opt...
/content/code_sandbox/node_modules/acorn/src/lval.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,500
```javascript // The algorithm used to determine whether a regexp can appear at a // given point in the program is loosely based on sweet.js' approach. // See path_to_url import {Parser} from "./state" import {types as tt} from "./tokentype" import {lineBreak} from "./whitespace" export class TokContext { construct...
/content/code_sandbox/node_modules/acorn/src/tokencontext.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
794
```javascript import {Parser} from "./state" import {lineBreakG} from "./whitespace" import {deprecate} from "util" // These are used when `options.locations` is on, for the // `startLoc` and `endLoc` properties. export class Position { constructor(line, col) { this.line = line this.column = col } offs...
/content/code_sandbox/node_modules/acorn/src/location.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
486
```javascript import {Parser} from "./state" import {SourceLocation} from "./location" // Start an AST node, attaching a start offset. const pp = Parser.prototype export class Node {} pp.startNode = function() { let node = new Node node.start = this.start if (this.options.locations) node.loc = new SourceL...
/content/code_sandbox/node_modules/acorn/src/node.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
447
```javascript import {types as tt} from "./tokentype" import {Parser} from "./state" import {lineBreak} from "./whitespace" const pp = Parser.prototype // ### Statement parsing // Parse a program. Initializes the parser, reads any number of // statements, and wraps them in a Program node. Optionally takes a // `pro...
/content/code_sandbox/node_modules/acorn/src/statement.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
5,101
```javascript export function isArray(obj) { return Object.prototype.toString.call(obj) === "[object Array]" } // Checks if an object has a property. export function has(obj, propName) { return Object.prototype.hasOwnProperty.call(obj, propName) } ```
/content/code_sandbox/node_modules/acorn/src/util.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
49
```javascript import {types as tt} from "./tokentype" import {Parser} from "./state" import {lineBreak} from "./whitespace" const pp = Parser.prototype // ## Parser utilities // Test whether a statement node is the string literal `"use strict"`. pp.isUseStrict = function(stmt) { return this.options.ecmaVersion >=...
/content/code_sandbox/node_modules/acorn/src/parseutil.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
580
```javascript import {reservedWords, keywords} from "./identifier" import {types as tt} from "./tokentype" import {lineBreak} from "./whitespace" export function Parser(options, input, startPos) { this.options = options this.sourceFile = this.options.sourceFile || null this.isKeyword = keywords[this.options.ecma...
/content/code_sandbox/node_modules/acorn/src/state.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
611
```javascript // Matches a whole line break (where CRLF is considered a single // line break). Used to count lines. export const lineBreak = /\r\n?|\n|\u2028|\u2029/ export const lineBreakG = new RegExp(lineBreak.source, "g") export function isNewLine(code) { return code === 10 || code === 13 || code === 0x2028 || ...
/content/code_sandbox/node_modules/acorn/src/whitespace.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
132
```javascript // A recursive descent parser operates by defining functions for all // syntactic elements, and recursively calling those, each function // advancing the input stream and returning an AST node. Precedence // of constructs (for example, the fact that `!x[1]` means `!(x[1])` // instead of `(!x)[1]` is handl...
/content/code_sandbox/node_modules/acorn/src/expression.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
6,147
```javascript import {isIdentifierStart, isIdentifierChar} from "./identifier" import {types as tt, keywords as keywordTypes} from "./tokentype" import {Parser} from "./state" import {SourceLocation} from "./location" import {lineBreak, lineBreakG, isNewLine, nonASCIIwhitespace} from "./whitespace" // Object type used...
/content/code_sandbox/node_modules/acorn/src/tokenize.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
6,279
```javascript // This is a trick taken from Esprima. It turns out that, on // non-Chrome browsers, to check whether a string is in a set, a // predicate containing a big ugly `switch` statement is faster than // a regular expression, and on Chrome the two are about on par. // This function uses `eval` (non-lexical) to ...
/content/code_sandbox/node_modules/acorn/src/identifier.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
6,432
```javascript // Acorn: Loose parser // // This module provides an alternative parser (`parse_dammit`) that // exposes that same interface as `parse`, but will try to parse // anything as JavaScript, repairing syntax error the best it can. // There are circumstances in which it will raise an error and give // up, but t...
/content/code_sandbox/node_modules/acorn/src/loose/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
410
```javascript ```
/content/code_sandbox/node_modules/acorn/src/loose/acorn_loose.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1
```javascript import {has, isArray} from "./util" import {SourceLocation} from "./location" // A second optional argument can be given to further configure // the parser process. These options are recognized: export const defaultOptions = { // `ecmaVersion` indicates the ECMAScript version to parse. Must // be ei...
/content/code_sandbox/node_modules/acorn/src/options.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,220
```javascript import {LooseParser} from "./state" import {isDummy} from "./parseutil" import {getLineInfo, tokTypes as tt} from ".." const lp = LooseParser.prototype lp.parseTopLevel = function() { let node = this.startNodeAt(this.options.locations ? [0, getLineInfo(this.input, 0)] : 0) node.body = [] while (th...
/content/code_sandbox/node_modules/acorn/src/loose/statement.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,634
```javascript import {LooseParser} from "./state" import {isDummy} from "./parseutil" import {tokTypes as tt} from ".." const lp = LooseParser.prototype lp.checkLVal = function(expr, binding) { if (!expr) return expr switch (expr.type) { case "Identifier": return expr case "MemberExpression": return ...
/content/code_sandbox/node_modules/acorn/src/loose/expression.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
4,126
```javascript import {LooseParser} from "./state" import {Node, SourceLocation, lineBreak, isNewLine, tokTypes as tt} from ".." const lp = LooseParser.prototype lp.startNode = function() { let node = new Node node.start = this.tok.start if (this.options.locations) node.loc = new SourceLocation(this.toks, th...
/content/code_sandbox/node_modules/acorn/src/loose/parseutil.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
901
```javascript import {tokenizer, SourceLocation, tokTypes as tt} from ".." export function LooseParser(input, options) { this.toks = tokenizer(input, options) this.options = this.toks.options this.input = this.toks.input this.tok = this.last = {type: tt.eof, start: 0, end: 0} if (this.options.locations) { ...
/content/code_sandbox/node_modules/acorn/src/loose/state.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
171
```javascript import {tokTypes as tt, Token, isNewLine, SourceLocation, getLineInfo, lineBreakG} from ".." import {LooseParser} from "./state" const lp = LooseParser.prototype function isSpace(ch) { return (ch < 14 && ch > 8) || ch === 32 || ch === 160 || isNewLine(ch) } lp.next = function() { this.last = this.t...
/content/code_sandbox/node_modules/acorn/src/loose/tokenize.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
992
```shell node bin/build-acorn.js node bin/without_eval > dist/acorn_csp.js ```
/content/code_sandbox/node_modules/acorn/bin/prepublish.sh
shell
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
21
```javascript // Note: run `npm install unicode-7.0.0` first. // Which Unicode version should be used? var version = '7.0.0'; var start = require('unicode-' + version + '/properties/ID_Start/code-points') .filter(function(ch) { return ch > 127; }); var cont = [0x200c, 0x200d].concat(require('unicode-' + version +...
/content/code_sandbox/node_modules/acorn/bin/generate-identifier-regex.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
472
```shell # Combine existing list of authors with everyone known in git, sort, add header. tail --lines=+3 AUTHORS > AUTHORS.tmp git log --format='%aN' | grep -v abraidwood >> AUTHORS.tmp echo -e "List of Acorn contributors. Updated before every release.\n" > AUTHORS sort -u AUTHORS.tmp >> AUTHORS rm -f AUTHORS.tmp ```
/content/code_sandbox/node_modules/acorn/bin/update_authors.sh
shell
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
81
```javascript // AST walker module for Mozilla Parser API compatible trees // A simple walk is one where you simply specify callbacks to be // called on specific nodes. The last two arguments are optional. A // simple use would be // // walk.simple(myTree, { // Expression: function(node) { ... } // });...
/content/code_sandbox/node_modules/acorn/src/walk/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,760
```javascript var fs = require("fs"), path = require("path") var stream = require("stream") var browserify = require("browserify") var babelify = require("babelify").configure({loose: "all"}) process.chdir(path.resolve(__dirname, "..")) browserify({standalone: "acorn"}) .plugin(require('browserify-derequire')) ....
/content/code_sandbox/node_modules/acorn/bin/build-acorn.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
451
```javascript (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}(g...
/content/code_sandbox/node_modules/acorn/dist/acorn_loose.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
10,961
```javascript (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}(g...
/content/code_sandbox/node_modules/acorn/dist/walk.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,207
```javascript (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g....
/content/code_sandbox/node_modules/acorn/dist/acorn_csp.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
34,723
```javascript /** vim: et:ts=4:sw=4:sts=4 * Available via the MIT or new BSD license. * see: path_to_url for details */ /*jslint node: true */ /*global module, process */ 'use strict'; /** * Creates a define for node. * @param {Object} module the "module" object that is defined by Node for the * current module....
/content/code_sandbox/node_modules/amdefine/amdefine.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,088
```javascript /*jshint node: true */ var inserted, Module = require('module'), fs = require('fs'), existingExtFn = Module._extensions['.js'], amdefineRegExp = /amdefine\.js/; inserted = "if (typeof define !== 'function') {var define = require('amdefine')(module)}"; //From the node/lib/module.js sourc...
/content/code_sandbox/node_modules/amdefine/intercept.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
274
```javascript var tape = require('tape') , EE = require('events').EventEmitter , util = require('util') , isStream = require('./') , isReadable = require('./').isReadable , isWritable = require('./').isWritable , isDuplex = require('./').is...
/content/code_sandbox/node_modules/isstream/test.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,792
```javascript var stream = require('stream') function isStream (obj) { return obj instanceof stream.Stream } function isReadable (obj) { return isStream(obj) && typeof obj._read == 'function' && typeof obj._readableState == 'object' } function isWritable (obj) { return isStream(obj) && typeof obj._write == ...
/content/code_sandbox/node_modules/isstream/isstream.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
145
```javascript /* It is important to test our Javascript output as well as our coffeescript, * since code that is transpiled may be slightly different in effect from the * original. * * Run these tests (against lib/netmask.js, not lib/netmask.coffee directly) * using mocha, after re-generating lib/netmask.js incl...
/content/code_sandbox/node_modules/netmask/tests/netmask.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,215
```coffeescript Netmask = require('netmask').Netmask ip = process.argv[2] netmask = new Netmask(ip) out = console.log out "Address: #{ip.split('/', 1)[0]}" out "Netmask: #{netmask.mask} = #{netmask.bitmask}" out "Wildcard: #{netmask.hostmask}" out "=>" out "Network: #{netmask.base}/#{netmask.bitmask}" out "HostMin: #...
/content/code_sandbox/node_modules/netmask/example/ipcalc.coffee
coffeescript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
136
```coffeescript long2ip = (long) -> a = (long & (0xff << 24)) >>> 24; b = (long & (0xff << 16)) >>> 16; c = (long & (0xff << 8)) >>> 8; d = long & 0xff; return [a, b, c, d].join('.') ip2long = (ip) -> b = [] for i in [0..3] if ip.length == 0 break if i > 0 ...
/content/code_sandbox/node_modules/netmask/lib/netmask.coffee
coffeescript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,747
```javascript // Generated by CoffeeScript 1.12.7 (function() { var Netmask, atob, chr, chr0, chrA, chra, ip2long, long2ip; long2ip = function(long) { var a, b, c, d; a = (long & (0xff << 24)) >>> 24; b = (long & (0xff << 16)) >>> 16; c = (long & (0xff << 8)) >>> 8; d = long & 0xff; return ...
/content/code_sandbox/node_modules/netmask/lib/netmask.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,786
```coffeescript vows = require 'vows' assert = require 'assert' Netmask = require('../lib/netmask').Netmask shouldFailWithError = (msg) -> context = topic: -> try return new Netmask(@context.name) catch e return e 'should fail': (e) -> ...
/content/code_sandbox/node_modules/netmask/test/badnets.coffee
coffeescript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
600
```javascript (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g....
/content/code_sandbox/node_modules/acorn/dist/acorn.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
34,234
```coffeescript vows = require 'vows' assert = require 'assert' util = require 'util' Netmask = require('../lib/netmask').Netmask fixtures = [ # addr mask base newmask bitmask ['209.157.68.22/255.255.224.0', null, '209.157.64.0', ...
/content/code_sandbox/node_modules/netmask/test/netmasks.coffee
coffeescript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,175
```javascript /* eslint-disable node/no-deprecated-api */ 'use strict' var buffer = require('buffer') var Buffer = buffer.Buffer var safer = require('./safer.js') var Safer = safer.Buffer var dangerous = {} var key for (key in safer) { if (!safer.hasOwnProperty(key)) continue dangerous[key] = safer[key] } var...
/content/code_sandbox/node_modules/safer-buffer/dangerous.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
402
```javascript /* eslint-disable node/no-deprecated-api */ 'use strict' var buffer = require('buffer') var Buffer = buffer.Buffer var safer = {} var key for (key in buffer) { if (!buffer.hasOwnProperty(key)) continue if (key === 'SlowBuffer' || key === 'Buffer') continue safer[key] = buffer[key] } var Safer ...
/content/code_sandbox/node_modules/safer-buffer/safer.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
543
```javascript "use strict"; var punycode = require("punycode"); var mappingTable = require("./lib/mappingTable.json"); var PROCESSING_OPTIONS = { TRANSITIONAL: 0, NONTRANSITIONAL: 1 }; function normalize(str) { // fix bug in v8 return str.split('\u0000').map(function (s) { return s.normalize('NFC'); }).join('\...
/content/code_sandbox/node_modules/tr46/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,968
```javascript var Ajv = require('ajv'); var ajv = new Ajv({allErrors: true}); var schema = { "properties": { "foo": { "type": "string" }, "bar": { "type": "number", "maximum": 3 } } }; var validate = ajv.compile(schema); test({"foo": "abc", "bar": 2}); test({"foo": 2, "bar": 4}); function test(data) { ...
/content/code_sandbox/node_modules/ajv/.tonic_example.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
137
```javascript 'use strict'; var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; var customRuleCode = require('./dotjs/custom'); var definitionSchema = require('./definition_schema'); module.exports = { add: addKeyword, get: getKeyword, remove: removeKeyword, validate: validateKeyword }; /** * Define custom keyword ...
/content/code_sandbox/node_modules/ajv/lib/keyword.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
965
```javascript 'use strict'; var KEYWORDS = [ 'multipleOf', 'maximum', 'exclusiveMaximum', 'minimum', 'exclusiveMinimum', 'maxLength', 'minLength', 'pattern', 'additionalItems', 'maxItems', 'minItems', 'uniqueItems', 'maxProperties', 'minProperties', 'required', 'additionalProperties', ...
/content/code_sandbox/node_modules/ajv/lib/data.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
264
```javascript /* eslint-disable node/no-deprecated-api */ 'use strict' var test = require('tape') var buffer = require('buffer') var index = require('./') var safer = require('./safer') var dangerous = require('./dangerous') /* Inheritance tests */ test('Default is Safer', function (t) { t.equal(index, safer) ...
/content/code_sandbox/node_modules/safer-buffer/tests.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
4,276
```javascript 'use strict'; var Cache = module.exports = function Cache() { this._cache = {}; }; Cache.prototype.put = function Cache_put(key, value) { this._cache[key] = value; }; Cache.prototype.get = function Cache_get(key) { return this._cache[key]; }; Cache.prototype.del = function Cache_del(key) { ...
/content/code_sandbox/node_modules/ajv/lib/cache.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
95
```javascript 'use strict'; var metaSchema = require('./refs/json-schema-draft-07.json'); module.exports = { $id: 'path_to_url definitions: { simpleTypes: metaSchema.definitions.simpleTypes }, type: 'object', dependencies: { schema: ['validate'], $data: ['validate'], statements: ['inline'], ...
/content/code_sandbox/node_modules/ajv/lib/definition_schema.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
221
```javascript 'use strict'; var MissingRefError = require('./error_classes').MissingRef; module.exports = compileAsync; /** * Creates validating function for passed schema with asynchronous loading of missing schemas. * `loadSchema` option should be a function that accepts schema uri and returns promise that reso...
/content/code_sandbox/node_modules/ajv/lib/compile/async.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
621
```javascript 'use strict'; var util = require('./util'); module.exports = SchemaObject; function SchemaObject(obj) { util.copy(obj, this); } ```
/content/code_sandbox/node_modules/ajv/lib/compile/schema_obj.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
31
```javascript 'use strict'; var compileSchema = require('./compile') , resolve = require('./compile/resolve') , Cache = require('./cache') , SchemaObject = require('./compile/schema_obj') , stableStringify = require('fast-json-stable-stringify') , formats = require('./compile/formats') , rules = require('....
/content/code_sandbox/node_modules/ajv/lib/ajv.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,956
```javascript 'use strict'; var resolve = require('./resolve') , util = require('./util') , errorClasses = require('./error_classes') , stableStringify = require('fast-json-stable-stringify'); var validateGenerator = require('../dotjs/validate'); /** * Functions below are used inside compiled validations func...
/content/code_sandbox/node_modules/ajv/lib/compile/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,718
```javascript 'use strict'; var resolve = require('./resolve'); module.exports = { Validation: errorSubclass(ValidationError), MissingRef: errorSubclass(MissingRefError) }; function ValidationError(errors) { this.message = 'validation failed'; this.errors = errors; this.ajv = this.validation = true; } M...
/content/code_sandbox/node_modules/ajv/lib/compile/error_classes.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
193
```javascript 'use strict'; module.exports = { copy: copy, checkDataType: checkDataType, checkDataTypes: checkDataTypes, coerceToTypes: coerceToTypes, toHash: toHash, getProperty: getProperty, escapeQuotes: escapeQuotes, equal: require('fast-deep-equal'), ucs2length: require('./ucs2length'), varOc...
/content/code_sandbox/node_modules/ajv/lib/compile/util.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,921
```javascript 'use strict'; // path_to_url // path_to_url - punycode.ucs2.decode module.exports = function ucs2length(str) { var length = 0 , len = str.length , pos = 0 , value; while (pos < len) { length++; value = str.charCodeAt(pos++); if (value >= 0xD800 && value <= 0xDBFF && pos < len)...
/content/code_sandbox/node_modules/ajv/lib/compile/ucs2length.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
148
```javascript 'use strict'; // do NOT remove this file - it would break pre-compiled schemas // path_to_url module.exports = require('fast-deep-equal'); ```
/content/code_sandbox/node_modules/ajv/lib/compile/equal.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
35
```javascript 'use strict'; var ruleModules = require('../dotjs') , toHash = require('./util').toHash; module.exports = function rules() { var RULES = [ { type: 'number', rules: [ { 'maximum': ['exclusiveMaximum'] }, { 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] }, { ty...
/content/code_sandbox/node_modules/ajv/lib/compile/rules.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
536
```javascript 'use strict'; var util = require('./util'); var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; var DAYS = [0,31,28,31,30,31,30,31,31,30,31,30,31]; var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i; var HOSTNAME = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,...
/content/code_sandbox/node_modules/ajv/lib/compile/formats.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
6,377