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 "use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); const EventModifierInit = require("./EventModifierInit"); module.exports = { convertInherit(obj, ret) { EventModifierInit.convertInherit(obj, ret); let key, value; key = "charCode"; ...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/generated/KeyboardEventInit.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
595
```javascript "use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); const EventInit = require("./EventInit"); module.exports = { convertInherit(obj, ret) { EventInit.convertInherit(obj, ret); let key, value; key = "detail"; value = obj === undefined ...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/generated/CustomEventInit.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
200
```javascript "use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); const Impl = require("../events/ProgressEvent-impl.js"); const Event = require("./Event.js"); const impl = utils.implSymbol; const convertProgressEventInit = require("./ProgressEventInit").convert; fun...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/generated/ProgressEvent.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
532
```javascript "use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); const EventModifierInit = require("./EventModifierInit"); module.exports = { convertInherit(obj, ret) { EventModifierInit.convertInherit(obj, ret); let key, value; key = "button"; va...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/generated/MouseEventInit.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
539
```javascript "use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); const EventInit = require("./EventInit"); module.exports = { convertInherit(obj, ret) { EventInit.convertInherit(obj, ret); let key, value; key = "newURL"; value = obj === undefined ...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/generated/HashChangeEventInit.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
239
```javascript "use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); const Impl = require("../events/KeyboardEvent-impl.js"); const UIEvent = require("./UIEvent.js"); const impl = utils.implSymbol; const convertKeyboardEventInit = require("./KeyboardEventInit").convert; ...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/generated/KeyboardEvent.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,484
```javascript "use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); const Impl = require("../events/ErrorEvent-impl.js"); const Event = require("./Event.js"); const impl = utils.implSymbol; const convertErrorEventInit = require("./ErrorEventInit").convert; function Err...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/generated/ErrorEvent.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
583
```javascript "use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); module.exports = { convertInherit(obj, ret) { let key, value; key = "bubbles"; value = obj === undefined || obj === null ? undefined : obj[key]; if (value !== undefined) { ret[...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/generated/EventInit.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
240
```javascript "use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); const Impl = require("../events/HashChangeEvent-impl.js"); const Event = require("./Event.js"); const impl = utils.implSymbol; const convertHashChangeEventInit = require("./HashChangeEventInit").convert...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/generated/HashChangeEvent.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
484
```javascript "use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); const Impl = require("../events/EventTarget-impl.js"); const impl = utils.implSymbol; function EventTarget() { throw new TypeError("Illegal constructor"); } EventTarget.prototype.addEventListener = ...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
689
```javascript "use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); const EventInit = require("./EventInit"); module.exports = { convertInherit(obj, ret) { EventInit.convertInherit(obj, ret); let key, value; key = "colno"; value = obj === undefined |...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/generated/ErrorEventInit.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
366
```javascript "use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); const Impl = require("../elements/HTMLTemplateElement-impl.js"); const HTMLElement = require("./HTMLElement.js"); const impl = utils.implSymbol; function HTMLTemplateElement() { throw new TypeError("...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/generated/HTMLTemplateElement.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
274
```javascript "use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); const Impl = require("../events/CustomEvent-impl.js"); const Event = require("./Event.js"); const impl = utils.implSymbol; const convertCustomEventInit = require("./CustomEventInit").convert; function ...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/generated/CustomEvent.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
630
```javascript "use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); const UIEventInit = require("./UIEventInit"); module.exports = { convertInherit(obj, ret) { UIEventInit.convertInherit(obj, ret); let key, value; key = "altKey"; value = obj === unde...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/generated/EventModifierInit.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
983
```javascript "use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); const Impl = require("../events/UIEvent-impl.js"); const Event = require("./Event.js"); const impl = utils.implSymbol; const convertUIEventInit = require("./UIEventInit").convert; function UIEvent(type...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/generated/UIEvent.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
673
```javascript "use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); const EventInit = require("./EventInit"); module.exports = { convertInherit(obj, ret) { EventInit.convertInherit(obj, ret); let key, value; key = "data"; value = obj === undefined ||...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/generated/MessageEventInit.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
359
```javascript "use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); const Impl = require("../attributes/Attr-impl.js"); const impl = utils.implSymbol; function Attr() { throw new TypeError("Illegal constructor"); } Object.defineProperty(Attr.prototype, "namespaceURI"...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/generated/Attr.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
612
```javascript "use strict"; const SymbolTree = require("symbol-tree"); exports.cloningSteps = Symbol("cloning steps"); exports.locationInfo = Symbol("location info"); exports.accept = Symbol("accept"); exports.requestManager = Symbol("request manager"); exports.pool = Symbol("pool"); exports.agentOptions = Symbol("age...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/helpers/internal-constants.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
130
```javascript "use strict"; module.exports = function orderedSetParser(input) { return new Set(input.split(/\s+/).filter(Boolean)); }; ```
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/helpers/ordered-set-parser.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
28
```javascript "use strict"; // path_to_url#event-handlers-on-elements,-document-objects,-and-window-objects module.exports = new Set(["onblur", "onerror", "onfocus", "onload", "onresize", "onscroll", "onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onlanguagechange", "onmessage", "onoffline", "on...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/helpers/proxied-window-event-handlers.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
170
```javascript "use strict"; const xnv = require("xml-name-validator"); const DOMException = require("../../web-idl/DOMException"); // path_to_url#validate exports.name = function (name) { const result = xnv.name(name); if (!result.success) { throw new DOMException(DOMException.INVALID_CHARACTER_ERR, "\"...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/helpers/validate-names.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
478
```javascript "use strict"; const util = require("util"); const ErrorEvent = require("../generated/ErrorEvent").interface; const errorReportingMode = Symbol("error reporting mode"); // path_to_url#report-the-error // Omits script parameter and any check for muted errors; takes error object, message, and location as p...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
479
```javascript "use strict"; const internalQuerySelector = require("../selectors").querySelector; const internalGetAttr = require("../attributes").getAttributeValue; const URL = require("../../utils").URL; exports.documentBaseURL = function (document) { // path_to_url#document-base-url const firstBase = internalQu...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/living/helpers/document-base-url.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
305
```javascript "use strict"; /* DOM Level2 Events implemented as described here: * * path_to_url * */ var core = require("../level1/core"), utils = require("../utils"), defineGetter = utils.defineGetter, defineSetter = utils.defineSetter, inheritFrom = utils.inheritFrom; // The dependencies here are...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/level2/events.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,211
```javascript "use strict"; var resourceLoader = require('../browser/resource-loader'), core = require("../level1/core"), utils = require("../utils"), defineGetter = utils.defineGetter, inheritFrom = utils.inheritFrom, cssom = require("cssom"), cssstyle = require("cssstyle"), resolveHref = r...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/level2/style.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,646
```javascript var core = require("../level1/core"); var memoizeQuery = require('../utils').memoizeQuery; var validateAndExtract = require('../living/helpers/validate-names').validateAndExtract; var mapper = require("../utils").mapper; const createLiveNodeList = require("../living/node-list").createLive; const N...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/level2/core.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
292
```javascript "use strict"; /* ServerJS Javascript DOM Level 1 */ var inheritFrom = require("../utils").inheritFrom; var domToHtml = require("../browser/domtohtml").domToHtml; var defineGetter = require("../utils").defineGetter; var memoizeQuery = require("../utils").memoizeQuery; var validateName = require('../livin...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/level1/core.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
7,232
```javascript "use strict"; const vm = require("vm"); const reportException = require("../../living/helpers/runtime-script-errors"); exports.javascript = function (element, code, filename) { const document = element.ownerDocument; const window = document && document._global; if (window) { window.document._c...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/level2/languages/javascript.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
123
```javascript "use strict"; const resolveHref = require("../utils").resolveHref; const parseDataUrl = require("../utils").parseDataUrl; const fs = require("fs"); const request = require("request"); const documentBaseURL = require("../living/helpers/document-base-url").documentBaseURL; const internalConstants = require...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/browser/resource-loader.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,527
```javascript "use strict"; // Tree traversing exports.getFirstChild = function (node) { return node.childNodes[0]; }; exports.getChildNodes = function (node) { // parse5 treats template elements specially, assuming you return an array whose single item is the document fragment return node._templateContents ? [...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/browser/documentAdapter.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
333
```javascript "use strict"; const whatwgURL = require("whatwg-url-compat"); const documentBaseURL = require("../living/helpers/document-base-url").documentBaseURL; const notImplemented = require("./not-implemented"); const URL = whatwgURL.createURLConstructor(); module.exports = Location; const document = Symbol("rel...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/browser/location.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
478
```javascript "use strict"; const CSSStyleDeclaration = require("cssstyle").CSSStyleDeclaration; const notImplemented = require("./not-implemented"); const History = require("./history"); const VirtualConsole = require("../virtual-console"); const define = require("../utils").define; const inherits = require("../utils...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/browser/Window.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,886
```javascript "use strict"; const whatwgURL = require("whatwg-url-compat"); const resolveHref = require("../utils").resolveHref; function StateEntry(data, title, url) { this.data = data; this.title = title; this.url = url; } module.exports = History; function History(window) { this._states = [new StateEntry(...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/browser/history.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
516
```javascript "use strict"; var resourceLoader = require('../browser/resource-loader'), core = require("../level1/core"), applyDocumentFeatures = require('../browser/documentfeatures').applyDocumentFeatures, defineGetter = require('../utils').defineGetter, defineSetter ...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/level2/html.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
15,861
```javascript // Ideally, we would use // path_to_url#the-css-user-agent-style-sheet-and-presentational-hints // but for now, just use the version from blink. This file is copied from // path_to_url // (removed a line which had octal literals inside since octal literals are not allowed in template strings) // We use a...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/browser/default-stylesheet.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
6,423
```javascript "use strict"; exports.availableDocumentFeatures = [ "FetchExternalResources", "ProcessExternalResources", "MutationEvents", "SkipExternalResources" ]; exports.defaultDocumentFeatures = { FetchExternalResources: ["script", "link"], // omitted by default: "frame" ProcessExternalResources: ["sc...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/browser/documentfeatures.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
343
```javascript "use strict"; module.exports = function (nameForErrorMessage, window) { if (!window) { // Do nothing for window-less documents. return; } window._virtualConsole.emit("jsdomError", new Error(`Not implemented: ${nameForErrorMessage}`)); }; ```
/content/code_sandbox/node_modules/jsdom/lib/jsdom/browser/not-implemented.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
60
```javascript "use strict"; const parse5 = require("parse5"); const documentAdapter = require("./documentAdapter"); const NODE_TYPE = require("../living/node-type"); const serializer = new parse5.TreeSerializer(documentAdapter); exports.domToHtml = function (iterable) { let ret = ""; for (const node of iterable) ...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/browser/domtohtml.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
114
```javascript "use strict"; const parse5 = require("parse5"); const sax = require("sax"); const attributes = require("../living/attributes"); const createDocumentTypeInternal = require("../living/document-type").create; const locationInfo = require("../living/helpers/internal-constants").locationInfo; class HtmlToDom...
/content/code_sandbox/node_modules/jsdom/lib/jsdom/browser/htmltodom.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,302
```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/jsdom/node_modules/acorn/src/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
509
```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/jsdom/node_modules/acorn/src/tokentype.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,365
```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/jsdom/node_modules/acorn/src/tokencontext.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
815
```javascript import {types as tt} from "./tokentype" import {Parser} from "./state" import {has} from "./util" const pp = Parser.prototype // Convert existing expression atom to assignable pattern // if possible. pp.toAssignable = function(node, isBinding) { if (this.options.ecmaVersion >= 6 && node) { switch...
/content/code_sandbox/node_modules/jsdom/node_modules/acorn/src/lval.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,553
```javascript import {Parser} from "./state" import {Position, getLineInfo} from "./locutil" const pp = Parser.prototype // This function is used to raise exceptions on parse errors. It // takes an offset integer (into the current `input`) to indicate // the location of the error, attaches the position to the end // ...
/content/code_sandbox/node_modules/jsdom/node_modules/acorn/src/location.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
193
```javascript import {Parser} from "./state" import {SourceLocation} from "./locutil" export class Node { constructor(parser, pos, loc) { this.type = "" this.start = pos this.end = 0 if (parser.options.locations) this.loc = new SourceLocation(parser, loc) if (parser.options.directSourceFile...
/content/code_sandbox/node_modules/jsdom/node_modules/acorn/src/node.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
319
```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/jsdom/node_modules/acorn/src/statement.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
5,438
```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/jsdom/node_modules/acorn/src/parseutil.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
723
```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/jsdom/node_modules/acorn/src/expression.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
6,355
```javascript import {reservedWords, keywords} from "./identifier" import {types as tt} from "./tokentype" import {lineBreak} from "./whitespace" import {getOptions} from "./options" // Registered plugins export const plugins = {} function keywordRegexp(words) { return new RegExp("^(" + words.replace(/ /g, "|") + "...
/content/code_sandbox/node_modules/jsdom/node_modules/acorn/src/state.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
869
```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/jsdom/node_modules/acorn/src/identifier.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
6,089
```javascript import {has, isArray} from "./util" import {SourceLocation} from "./locutil" // 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 eit...
/content/code_sandbox/node_modules/jsdom/node_modules/acorn/src/options.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,262
```javascript import {isIdentifierStart, isIdentifierChar} from "./identifier" import {types as tt, keywords as keywordTypes} from "./tokentype" import {Parser} from "./state" import {SourceLocation} from "./locutil" import {lineBreak, lineBreakG, isNewLine, nonASCIIwhitespace} from "./whitespace" // Object type used ...
/content/code_sandbox/node_modules/jsdom/node_modules/acorn/src/tokenize.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
6,303
```javascript import {lineBreakG} from "./whitespace" // 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 } offset(n) { return new Position(this.line, this.column + n) ...
/content/code_sandbox/node_modules/jsdom/node_modules/acorn/src/locutil.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
281
```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/jsdom/node_modules/acorn/src/loose/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
423
```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/jsdom/node_modules/acorn/src/loose/statement.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,667
```javascript export function isDummy(node) { return node.name == "" } ```
/content/code_sandbox/node_modules/jsdom/node_modules/acorn/src/loose/parseutil.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
14
```javascript import {tokenizer, SourceLocation, tokTypes as tt, Node, lineBreak, isNewLine} from ".." // Registered plugins export const pluginsLoose = {} export class LooseParser { constructor(input, options) { this.toks = tokenizer(input, options) this.options = this.toks.options this.input = this.to...
/content/code_sandbox/node_modules/jsdom/node_modules/acorn/src/loose/state.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,123
```javascript import {LooseParser} from "./state" import {isDummy} from "./parseutil" import {tokTypes as tt} from ".." const lp = LooseParser.prototype lp.checkLVal = function(expr) { if (!expr) return expr switch (expr.type) { case "Identifier": case "MemberExpression": return expr case "Parenthesize...
/content/code_sandbox/node_modules/jsdom/node_modules/acorn/src/loose/expression.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
4,159
```javascript #!/usr/bin/env node import {basename} from "path" import {readFileSync as readFile} from "fs" import * as acorn from "../dist/acorn.js" let infile, forceFile, silent = false, compact = false, tokenize = false const options = {} function help(status) { const print = (status == 0) ? console.log : conso...
/content/code_sandbox/node_modules/jsdom/node_modules/acorn/src/bin/acorn.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
600
```javascript var fs = require("fs"), path = require("path") var stream = require("stream") var browserify = require("browserify") var babel = require('babel-core') var babelify = require("babelify").configure({loose: "all"}) process.chdir(path.resolve(__dirname, "..")) browserify({standalone: "acorn"}) .plugin(re...
/content/code_sandbox/node_modules/jsdom/node_modules/acorn/bin/build-acorn.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
713
```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/jsdom/node_modules/acorn/src/walk/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,237
```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/jsdom/node_modules/acorn/dist/walk.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
3,656
```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/jsdom/node_modules/acorn/dist/acorn_loose.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
11,603
```javascript /* jshint node: true */ (function () { "use strict"; function CookieAccessInfo(domain, path, secure, script) { if (this instanceof CookieAccessInfo) { this.domain = domain || undefined; this.path = path || "/"; this.secure = !!secure; this.s...
/content/code_sandbox/node_modules/cookiejar/cookiejar.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,895
```javascript var Stream = require('stream').Stream; var util = require('util'); module.exports = DelayedStream; function DelayedStream() { this.source = null; this.dataSize = 0; this.maxDataSize = 1024 * 1024; this.pauseStream = true; this._maxDataSizeExceeded = false; this._released = false; this._buf...
/content/code_sandbox/node_modules/delayed-stream/lib/delayed_stream.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
578
```javascript /*! * statuses */ 'use strict' /** * Module dependencies. * @private */ var codes = require('./codes.json') /** * Module exports. * @public */ module.exports = status // status code to message map status.message = codes // status message (lower-case) to code map status.code = createMessageT...
/content/code_sandbox/node_modules/statuses/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
635
```javascript /*! * mime-db */ /** * Module exports. */ module.exports = require('./db.json') ```
/content/code_sandbox/node_modules/mime-db/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
21
```javascript 'use strict'; // modified from path_to_url var has = Object.prototype.hasOwnProperty; var toStr = Object.prototype.toString; var slice = Array.prototype.slice; var isArgs = require('./isArguments'); var hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'); var hasProtoEnumBug = functio...
/content/code_sandbox/node_modules/object-keys/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
883
```javascript 'use strict'; var toStr = Object.prototype.toString; module.exports = function isArguments(value) { var str = toStr.call(value); var isArgs = str === '[object Arguments]'; if (!isArgs) { isArgs = str !== '[object Array]' && value !== null && typeof value === 'object' && typeof value.length...
/content/code_sandbox/node_modules/object-keys/isArguments.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
107
```javascript 'use strict'; require('./isArguments'); require('./shim'); ```
/content/code_sandbox/node_modules/object-keys/test/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
14
```javascript /*! * http-errors */ 'use strict' /** * Module dependencies. * @private */ var deprecate = require('depd')('http-errors') var setPrototypeOf = require('setprototypeof') var statuses = require('statuses') var inherits = require('inherits') var toIdentifier = require('toidentifier') /** * Module e...
/content/code_sandbox/node_modules/http-errors/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,503
```javascript "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; const get_uri_1 = __importDefault(require("get-uri")); const url_1 = require("url"); const agent_1 = __importDefault(require("./agent")); function create...
/content/code_sandbox/node_modules/pac-proxy-agent/dist/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
334
```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/pac-proxy-agent/dist/agent.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,046
```javascript // Generated by LiveScript 1.4.0 (function(){ var ref$, any, all, isItNaN, types, defaultType, customTypes, toString$ = {}.toString; ref$ = require('prelude-ls'), any = ref$.any, all = ref$.all, isItNaN = ref$.isItNaN; types = { Number: { typeOf: 'Number', validate: function(it){ ...
/content/code_sandbox/node_modules/type-check/lib/check.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
898
```javascript // Generated by LiveScript 1.4.0 (function(){ var VERSION, parseType, parsedTypeCheck, typeCheck; VERSION = '0.3.2'; parseType = require('./parse-type'); parsedTypeCheck = require('./check'); typeCheck = function(type, input, options){ return parsedTypeCheck(parseType(type), input, options);...
/content/code_sandbox/node_modules/type-check/lib/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
122
```javascript // Generated by LiveScript 1.4.0 (function(){ var identifierRegex, tokenRegex; identifierRegex = /[\$\w]+/; function peek(tokens){ var token; token = tokens[0]; if (token == null) { throw new Error('Unexpected end of input.'); } return token; } function consumeIdent(tok...
/content/code_sandbox/node_modules/type-check/lib/parse-type.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,230
```javascript "use strict"; module.exports = CSSselect; var Pseudos = require("./lib/pseudos.js"), DomUtils = require("domutils"), findOne = DomUtils.findOne, findAll = DomUtils.findAll, getChildren = DomUtils.getChildren, removeSubsets = DomUtils.removeSubsets, falseF...
/content/code_sandbox/node_modules/css-select/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
403
```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/jsdom/node_modules/acorn/dist/acorn.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
31,260
```javascript var DomUtils = require("domutils"), hasAttrib = DomUtils.hasAttrib, getAttributeValue = DomUtils.getAttributeValue, falseFunc = require("boolbase").falseFunc; //path_to_url#L469 var reChars = /[-[\]{}()*+?.,\\^$|#\s]/g; /* attribute selectors */ var attributeRules = { __proto__: null, e...
/content/code_sandbox/node_modules/css-select/lib/attributes.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,108
```javascript module.exports = sortByProcedure; /* sort the parts of the passed selector, as there is potential for optimization (some types of selectors are faster than others) */ var procedure = require("./procedure.json"); var attributes = { __proto__: null, exists: 10, equals: 8, not: 7, start: 6, end: ...
/content/code_sandbox/node_modules/css-select/lib/sort.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
550
```javascript var DomUtils = require("domutils"), isTag = DomUtils.isTag, getParent = DomUtils.getParent, getChildren = DomUtils.getChildren, getSiblings = DomUtils.getSiblings, getName = DomUtils.getName; /* all available rules */ module.exports = { __proto__: null, attribute: r...
/content/code_sandbox/node_modules/css-select/lib/general.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
482
```javascript /* compiles a selector to an executable function */ module.exports = compile; module.exports.compileUnsafe = compileUnsafe; module.exports.compileToken = compileToken; var parse = require("css-what"), DomUtils = require("domutils"), isTag = DomUtils.isTag, Rules = requi...
/content/code_sandbox/node_modules/css-select/lib/compile.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,209
```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/get-uri/dist/data.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
566
```javascript /* pseudo selectors --- they are available in two forms: * filters called when the selector is compiled and return a function that needs to return next() * pseudos get called on execution they need to return a boolean */ var DomUtils = require("domutils"), isTag = DomUtils.is...
/content/code_sandbox/node_modules/css-select/lib/pseudos.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,681
```javascript "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const https_1 = __importDefault(require("https")); const http_1 = __importDefault(require(...
/content/code_sandbox/node_modules/get-uri/dist/https.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
130
```javascript "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; const debug_1 = __importDefault(require("debug")); const url_1 = require("url"); // Built-in protocols const data_1 = __importDefault(require("./data"));...
/content/code_sandbox/node_modules/get-uri/dist/index.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
434
```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/get-uri/dist/http.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,856
```javascript "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const http_1 = require("http"); /** * Error subclass to use when an HTTP application error has occurred. */ class HTTPError extends Error { constructor(statusCode, message = http_1.STATUS_CODES[statusCode]) { super(...
/content/code_sandbox/node_modules/get-uri/dist/http-error.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
120
```javascript "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Error subclass to use when the source has not been modified. * * @param {String} message optional "message" property to set * @api protected */ class NotModifiedError extends Error { constructor(message) { ...
/content/code_sandbox/node_modules/get-uri/dist/notmodified.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
123
```javascript "use strict"; /** * Error subclass to use when the source does not exist at the specified endpoint. * * @param {String} message optional "message" property to set * @api protected */ Object.defineProperty(exports, "__esModule", { value: true }); class NotFoundError extends Error { constructor(mes...
/content/code_sandbox/node_modules/get-uri/dist/notfound.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
114
```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/get-uri/dist/ftp.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,040
```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/get-uri/dist/file.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
705
```javascript var types = require("./lib/types"); var parse = require("./lib/parser").parse; var Printer = require("./lib/printer").Printer; function print(node, options) { return new Printer(options).print(node); } function prettyPrint(node, options) { return new Printer(options).printGenerically(node); } f...
/content/code_sandbox/node_modules/recast/main.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
506
```javascript // This module was originally created so that Recast could add its own // custom types to the AST type system (in particular, the File type), but // those types are now incorporated into ast-types, so this module doesn't // have much to do anymore. Still, it might prove useful in the future. module.export...
/content/code_sandbox/node_modules/recast/lib/types.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
75
```javascript var assert = require("assert"); var types = require("./types"); var n = types.namedTypes; var b = types.builders; var isObject = types.builtInTypes.object; var isArray = types.builtInTypes.array; var isFunction = types.builtInTypes.function; var Patcher = require("./patcher").Patcher; var normalizeOptions...
/content/code_sandbox/node_modules/recast/lib/parser.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,012
```javascript var assert = require("assert"); var types = require("./types"); var n = types.namedTypes; var Node = n.Node; var isArray = types.builtInTypes.array; var isNumber = types.builtInTypes.number; function FastPath(value) { assert.ok(this instanceof FastPath); this.stack = [value]; } var FPp = FastPat...
/content/code_sandbox/node_modules/recast/lib/fast-path.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,935
```javascript var assert = require("assert"); var types = require("./types"); var getFieldValue = types.getFieldValue; var n = types.namedTypes; var sourceMap = require("source-map"); var SourceMapConsumer = sourceMap.SourceMapConsumer; var SourceMapGenerator = sourceMap.SourceMapGenerator; var hasOwn = Object.prototyp...
/content/code_sandbox/node_modules/recast/lib/util.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
2,162
```javascript var assert = require("assert"); var sourceMap = require("source-map"); var printComments = require("./comments").printComments; var linesModule = require("./lines"); var fromString = linesModule.fromString; var concat = linesModule.concat; var normalizeOptions = require("./options").normalize; var getRepr...
/content/code_sandbox/node_modules/recast/lib/printer.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
10,741
```javascript var assert = require("assert"); var sourceMap = require("source-map"); var normalizeOptions = require("./options").normalize; var secretKey = require("private").makeUniqueKey(); var types = require("./types"); var isString = types.builtInTypes.string; var comparePos = require("./util").comparePos; var Map...
/content/code_sandbox/node_modules/recast/lib/lines.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
5,360
```javascript var assert = require("assert"); var types = require("./types"); var isString = types.builtInTypes.string; var isNumber = types.builtInTypes.number; var SourceLocation = types.namedTypes.SourceLocation; var Position = types.namedTypes.Position; var linesModule = require("./lines"); var comparePos = require...
/content/code_sandbox/node_modules/recast/lib/mapping.js
javascript
2016-03-11T09:28:00
2024-08-16T17:55:54
antSword
AntSwordProject/antSword
3,579
1,808