mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2025-09-27 23:40:18 +00:00
push all website files
This commit is contained in:
125
website/functions/node_modules/espurify/CHANGELOG.md
generated
vendored
Normal file
125
website/functions/node_modules/espurify/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,125 @@
|
||||
### [1.8.1](https://github.com/estools/espurify/releases/tag/v1.8.1) (2018-07-10)
|
||||
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
* [Deal with circular references in AST](https://github.com/estools/espurify/pull/11)
|
||||
|
||||
|
||||
## [1.8.0](https://github.com/estools/espurify/releases/tag/v1.8.0) (2018-05-10)
|
||||
|
||||
|
||||
#### Features
|
||||
|
||||
* [Support ES2018 (i.e. async iteration statement: `for-await-of`)](https://github.com/estools/espurify/pull/10)
|
||||
|
||||
|
||||
## [1.7.0](https://github.com/estools/espurify/releases/tag/v1.7.0) (2017-02-24)
|
||||
|
||||
|
||||
#### Features
|
||||
|
||||
* [Support ES2017 types and properties](https://github.com/estools/espurify/pull/8)
|
||||
|
||||
|
||||
### [1.6.1](https://github.com/estools/espurify/releases/tag/v1.6.1) (2017-02-13)
|
||||
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
* fix property order of ConditionalExpression ([01c13ada](https://github.com/estools/espurify/commit/01c13adac4ab304c9e5a50bc9bd16f60ad2e872b))
|
||||
|
||||
|
||||
## [1.6.0](https://github.com/estools/espurify/releases/tag/v1.6.0) (2016-05-25)
|
||||
|
||||
|
||||
#### Features
|
||||
|
||||
* [Consolidate ponyfills into core-js](https://github.com/estools/espurify/pull/6)
|
||||
|
||||
|
||||
### [1.5.1](https://github.com/estools/espurify/releases/tag/v1.5.1) (2016-03-28)
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* [Improve AST clone performance](https://github.com/estools/espurify/pull/5)
|
||||
|
||||
|
||||
## [1.5.0](https://github.com/estools/espurify/releases/tag/v1.5.0) (2015-12-21)
|
||||
|
||||
|
||||
#### Features
|
||||
|
||||
* prepend `type` to whitelist if it does not exist ([af941315](https://github.com/estools/espurify/commit/af9413158f12af40cdbadf155c83ec681b3f60cb))
|
||||
|
||||
|
||||
## [1.4.0](https://github.com/estools/espurify/releases/tag/v1.4.0) (2015-12-18)
|
||||
|
||||
|
||||
#### Features
|
||||
|
||||
* [expose `cloneWithWhitelist` to deal with non-standard AST trees](https://github.com/estools/espurify/pull/4)
|
||||
|
||||
|
||||
## [1.3.0](https://github.com/estools/espurify/releases/tag/v1.3.0) (2015-06-05)
|
||||
|
||||
|
||||
#### Features
|
||||
|
||||
* add `delegate` to YieldExpression ([8ef733ed](https://github.com/estools/espurify/commit/8ef733edf15b49958265c1a866dd57802eda07c2))
|
||||
|
||||
|
||||
## [1.2.0](https://github.com/estools/espurify/releases/tag/v1.2.0) (2015-04-17)
|
||||
|
||||
|
||||
#### Features
|
||||
|
||||
* [performance optimization](https://github.com/estools/espurify/pull/1)
|
||||
|
||||
|
||||
## [1.1.0](https://github.com/estools/espurify/releases/tag/v1.1.0) (2015-04-12)
|
||||
|
||||
|
||||
#### Features
|
||||
|
||||
* switch to The ESTree Spec to support ES6 ([b9ca486e](https://github.com/estools/espurify/commit/b9ca486ed94f149e1f957ff7890899f171add03b))
|
||||
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
* avoid cloning private (maybe recursive) props ([501b12bf](https://github.com/estools/espurify/commit/501b12bf86816ded4f5183a075a9d08da0ef22bf))
|
||||
|
||||
|
||||
### [1.0.1](https://github.com/estools/espurify/releases/tag/v1.0.1) (2015-03-06)
|
||||
|
||||
|
||||
* replace Array#indexOf with [indexof module](https://www.npmjs.com/package/indexof) to deal with older browsers ([4ba0bd51](https://github.com/estools/espurify/commit/4ba0bd5155ad657e4beb3338dfcd79e443e40d10))
|
||||
* ship browser build with npm module too ([47e0cc85](https://github.com/estools/espurify/commit/47e0cc85a5d5b92b281ed80216d6908bed591515))
|
||||
|
||||
|
||||
### Moved repository to estools (2014-11-24)
|
||||
|
||||
|
||||
Moved repository from twada/espurify to estools/espurify.
|
||||
|
||||
|
||||
### [1.0.0](https://github.com/estools/espurify/releases/tag/v1.0.0) (2014-11-01)
|
||||
|
||||
|
||||
The first stable release.
|
||||
|
||||
|
||||
### [0.1.3](https://github.com/estools/espurify/releases/tag/v0.1.3) (2014-08-01)
|
||||
|
||||
|
||||
### [0.1.2](https://github.com/estools/espurify/releases/tag/v0.1.2) (2014-07-22)
|
||||
|
||||
|
||||
### [0.1.1](https://github.com/estools/espurify/releases/tag/v0.1.1) (2014-07-22)
|
||||
|
||||
|
||||
### [0.1.0](https://github.com/estools/espurify/releases/tag/v0.1.0) (2014-07-22)
|
||||
|
||||
|
||||
The first release.
|
20
website/functions/node_modules/espurify/MIT-LICENSE.txt
generated
vendored
Normal file
20
website/functions/node_modules/espurify/MIT-LICENSE.txt
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
Copyright (c) 2014-2018 Takuto Wada, https://github.com/estools/espurify
|
||||
|
||||
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, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
260
website/functions/node_modules/espurify/README.md
generated
vendored
Normal file
260
website/functions/node_modules/espurify/README.md
generated
vendored
Normal file
@@ -0,0 +1,260 @@
|
||||
espurify
|
||||
================================
|
||||
|
||||
Clone new AST without extra properties
|
||||
|
||||
[](https://travis-ci.org/estools/espurify)
|
||||
[](https://badge.fury.io/js/espurify)
|
||||
[](https://github.com/estools/espurify/blob/master/MIT-LICENSE.txt)
|
||||
[](https://github.com/Flet/semistandard)
|
||||
|
||||
|
||||
API
|
||||
---------------------------------------
|
||||
|
||||
### var purifiedAstClone = espurify(originalAst)
|
||||
|
||||
Returns new clone of `originalAst` but without extra properties.
|
||||
|
||||
Leaves properties defined in [The ESTree Spec](https://github.com/estree/estree) (formerly known as [Mozilla SpiderMonkey Parser API](https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API)) only. Also note that extra informations (such as `loc`, `range` and `raw`) are eliminated too.
|
||||
|
||||
`espurify` supports [ES5](https://github.com/estree/estree/blob/master/es5.md), [ES2015](https://github.com/estree/estree/blob/master/es2015.md), and [ES2017](https://github.com/estree/estree/blob/master/es2017.md) properties.
|
||||
|
||||
|
||||
### var customizedCloneFunctionWithWhiteList = espurify.cloneWithWhitelist(whiteList)
|
||||
|
||||
Returns customized function for cloning AST, with user-provided `whiteList`.
|
||||
|
||||
|
||||
### var purifiedAstClone = customizedCloneFunctionWithWhiteList(originalAst)
|
||||
|
||||
Returns new clone of `originalAst` by customized function.
|
||||
|
||||
|
||||
#### whiteList
|
||||
|
||||
| type | default value |
|
||||
|:---------|:--------------|
|
||||
| `object` | N/A |
|
||||
|
||||
`whiteList` is an object containing NodeType as keys and properties as values.
|
||||
|
||||
```js
|
||||
{
|
||||
ArrayExpression: ['type', 'elements'],
|
||||
ArrayPattern: ['type', 'elements'],
|
||||
ArrowFunctionExpression: ['type', 'id', 'params', 'body', 'generator', 'expression'],
|
||||
AssignmentExpression: ['type', 'operator', 'left', 'right'],
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
### var customizedCloneFunction = espurify.customize(options)
|
||||
|
||||
Returns customized function for cloning AST, configured by custom `options`.
|
||||
|
||||
|
||||
### var purifiedAstClone = customizedCloneFunction(originalAst)
|
||||
|
||||
Returns new clone of `originalAst` by customized function.
|
||||
|
||||
|
||||
|
||||
#### options
|
||||
|
||||
| type | default value |
|
||||
|:---------|:--------------|
|
||||
| `object` | `{}` |
|
||||
|
||||
Configuration options. If not passed, default options will be used.
|
||||
|
||||
|
||||
#### options.extra
|
||||
|
||||
| type | default value |
|
||||
|:--------------------|:--------------|
|
||||
| `array` of `string` | null |
|
||||
|
||||
List of extra properties to be left in result AST. For example, functions returned by `espurify.customize({extra: ['raw']})` will preserve `raw` properties of `Literal`. Functions return by `espurify.customize({extra: ['loc', 'range']})` will preserve `loc` and `range` properties of each Node.
|
||||
|
||||
|
||||
EXAMPLE
|
||||
---------------------------------------
|
||||
|
||||
```javascript
|
||||
var espurify = require('espurify'),
|
||||
estraverse = require('estraverse'),
|
||||
esprima = require('esprima'),
|
||||
syntax = estraverse.Syntax,
|
||||
assert = require('assert');
|
||||
|
||||
var jsCode = 'assert("foo")';
|
||||
|
||||
// Adding extra informations to AST
|
||||
var originalAst = esprima.parse(jsCode, {tolerant: true, loc: true, raw: true});
|
||||
estraverse.replace(originalAst, {
|
||||
leave: function (currentNode, parentNode) {
|
||||
if (currentNode.type === syntax.Literal && typeof currentNode.raw !== 'undefined') {
|
||||
currentNode['x-verbatim-bar'] = {
|
||||
content : currentNode.raw,
|
||||
precedence : 18 // escodegen.Precedence.Primary
|
||||
};
|
||||
return currentNode;
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// purify AST
|
||||
var purifiedClone = espurify(originalAst);
|
||||
|
||||
|
||||
// original AST is not modified
|
||||
assert.deepEqual(originalAst, {
|
||||
type: 'Program',
|
||||
body: [
|
||||
{
|
||||
type: 'ExpressionStatement',
|
||||
expression: {
|
||||
type: 'CallExpression',
|
||||
callee: {
|
||||
type: 'Identifier',
|
||||
name: 'assert',
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 0
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 6
|
||||
}
|
||||
}
|
||||
},
|
||||
arguments: [
|
||||
{
|
||||
type: 'Literal',
|
||||
value: 'foo',
|
||||
raw: '"foo"',
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 7
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 12
|
||||
}
|
||||
},
|
||||
"x-verbatim-bar": {
|
||||
content: '"foo"',
|
||||
precedence: 18
|
||||
}
|
||||
}
|
||||
],
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 0
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 13
|
||||
}
|
||||
}
|
||||
},
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 0
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 13
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 0
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 13
|
||||
}
|
||||
},
|
||||
errors: []
|
||||
});
|
||||
|
||||
|
||||
// Extra properties are eliminated from cloned AST
|
||||
assert.deepEqual(purifiedClone, {
|
||||
type: 'Program',
|
||||
body: [
|
||||
{
|
||||
type: 'ExpressionStatement',
|
||||
expression: {
|
||||
type: 'CallExpression',
|
||||
callee: {
|
||||
type: 'Identifier',
|
||||
name: 'assert'
|
||||
},
|
||||
arguments: [
|
||||
{
|
||||
type: 'Literal',
|
||||
value: 'foo'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
INSTALL
|
||||
---------------------------------------
|
||||
|
||||
### via npm
|
||||
|
||||
Install
|
||||
|
||||
$ npm install --save espurify
|
||||
|
||||
Use
|
||||
|
||||
```javascript
|
||||
var espurify = require('espurify');
|
||||
```
|
||||
|
||||
#### use espurify module on browser
|
||||
|
||||
`espurify` function is exported
|
||||
|
||||
<script type="text/javascript" src="./path/to/node_modules/espurify/build/espurify.js"></script>
|
||||
|
||||
|
||||
### via bower
|
||||
|
||||
Install
|
||||
|
||||
$ bower install --save espurify
|
||||
|
||||
Load (`espurify` function is exported)
|
||||
|
||||
<script type="text/javascript" src="./path/to/bower_components/espurify/build/espurify.js"></script>
|
||||
|
||||
|
||||
|
||||
AUTHOR
|
||||
---------------------------------------
|
||||
* [Takuto Wada](https://github.com/twada)
|
||||
|
||||
|
||||
LICENSE
|
||||
---------------------------------------
|
||||
Licensed under the [MIT](https://github.com/estools/espurify/blob/master/MIT-LICENSE.txt) license.
|
1612
website/functions/node_modules/espurify/build/espurify.js
generated
vendored
Normal file
1612
website/functions/node_modules/espurify/build/espurify.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
22
website/functions/node_modules/espurify/index.js
generated
vendored
Normal file
22
website/functions/node_modules/espurify/index.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* espurify - Clone new AST without extra properties
|
||||
*
|
||||
* https://github.com/estools/espurify
|
||||
*
|
||||
* Copyright (c) 2014-2018 Takuto Wada
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/estools/espurify/blob/master/MIT-LICENSE.txt
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var createWhitelist = require('./lib/create-whitelist');
|
||||
var cloneWithWhitelist = require('./lib/clone-ast');
|
||||
|
||||
function createCloneFunction (options) {
|
||||
return cloneWithWhitelist(createWhitelist(options));
|
||||
}
|
||||
|
||||
var espurify = createCloneFunction();
|
||||
espurify.customize = createCloneFunction;
|
||||
espurify.cloneWithWhitelist = cloneWithWhitelist;
|
||||
module.exports = espurify;
|
68
website/functions/node_modules/espurify/lib/ast-properties.js
generated
vendored
Normal file
68
website/functions/node_modules/espurify/lib/ast-properties.js
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
module.exports = {
|
||||
ArrayExpression: ['type', 'elements'],
|
||||
ArrayPattern: ['type', 'elements'],
|
||||
ArrowFunctionExpression: ['type', 'id', 'params', 'body', 'generator', 'expression', 'async'],
|
||||
AssignmentExpression: ['type', 'operator', 'left', 'right'],
|
||||
AssignmentPattern: ['type', 'left', 'right'],
|
||||
AwaitExpression: ['type', 'argument'],
|
||||
BinaryExpression: ['type', 'operator', 'left', 'right'],
|
||||
BlockStatement: ['type', 'body'],
|
||||
BreakStatement: ['type', 'label'],
|
||||
CallExpression: ['type', 'callee', 'arguments'],
|
||||
CatchClause: ['type', 'param', 'guard', 'body'],
|
||||
ClassBody: ['type', 'body'],
|
||||
ClassDeclaration: ['type', 'id', 'superClass', 'body'],
|
||||
ClassExpression: ['type', 'id', 'superClass', 'body'],
|
||||
ConditionalExpression: ['type', 'test', 'consequent', 'alternate'],
|
||||
ContinueStatement: ['type', 'label'],
|
||||
DebuggerStatement: ['type'],
|
||||
DoWhileStatement: ['type', 'body', 'test'],
|
||||
EmptyStatement: ['type'],
|
||||
ExportAllDeclaration: ['type', 'source'],
|
||||
ExportDefaultDeclaration: ['type', 'declaration'],
|
||||
ExportNamedDeclaration: ['type', 'declaration', 'specifiers', 'source'],
|
||||
ExportSpecifier: ['type', 'exported', 'local'],
|
||||
ExpressionStatement: ['type', 'expression'],
|
||||
ForInStatement: ['type', 'left', 'right', 'body'],
|
||||
ForOfStatement: ['type', 'left', 'right', 'body', 'await'],
|
||||
ForStatement: ['type', 'init', 'test', 'update', 'body'],
|
||||
FunctionDeclaration: ['type', 'id', 'params', 'body', 'generator', 'async'],
|
||||
FunctionExpression: ['type', 'id', 'params', 'body', 'generator', 'async'],
|
||||
Identifier: ['type', 'name'],
|
||||
IfStatement: ['type', 'test', 'consequent', 'alternate'],
|
||||
ImportDeclaration: ['type', 'specifiers', 'source'],
|
||||
ImportDefaultSpecifier: ['type', 'local'],
|
||||
ImportNamespaceSpecifier: ['type', 'local'],
|
||||
ImportSpecifier: ['type', 'imported', 'local'],
|
||||
LabeledStatement: ['type', 'label', 'body'],
|
||||
Literal: ['type', 'value', 'regex'],
|
||||
LogicalExpression: ['type', 'operator', 'left', 'right'],
|
||||
MemberExpression: ['type', 'object', 'property', 'computed'],
|
||||
MetaProperty: ['type', 'meta', 'property'],
|
||||
MethodDefinition: ['type', 'key', 'value', 'kind', 'computed', 'static'],
|
||||
NewExpression: ['type', 'callee', 'arguments'],
|
||||
ObjectExpression: ['type', 'properties'],
|
||||
ObjectPattern: ['type', 'properties'],
|
||||
Program: ['type', 'body', 'sourceType'],
|
||||
Property: ['type', 'key', 'value', 'kind', 'method', 'shorthand', 'computed'],
|
||||
RestElement: ['type', 'argument'],
|
||||
ReturnStatement: ['type', 'argument'],
|
||||
SequenceExpression: ['type', 'expressions'],
|
||||
SpreadElement: ['type', 'argument'],
|
||||
Super: ['type'],
|
||||
SwitchCase: ['type', 'test', 'consequent'],
|
||||
SwitchStatement: ['type', 'discriminant', 'cases', 'lexical'],
|
||||
TaggedTemplateExpression: ['type', 'tag', 'quasi'],
|
||||
TemplateElement: ['type', 'tail', 'value'],
|
||||
TemplateLiteral: ['type', 'quasis', 'expressions'],
|
||||
ThisExpression: ['type'],
|
||||
ThrowStatement: ['type', 'argument'],
|
||||
TryStatement: ['type', 'block', 'handler', 'finalizer'],
|
||||
UnaryExpression: ['type', 'operator', 'prefix', 'argument'],
|
||||
UpdateExpression: ['type', 'operator', 'argument', 'prefix'],
|
||||
VariableDeclaration: ['type', 'declarations', 'kind'],
|
||||
VariableDeclarator: ['type', 'id', 'init'],
|
||||
WhileStatement: ['type', 'test', 'body'],
|
||||
WithStatement: ['type', 'object', 'body'],
|
||||
YieldExpression: ['type', 'argument', 'delegate']
|
||||
};
|
84
website/functions/node_modules/espurify/lib/clone-ast.js
generated
vendored
Normal file
84
website/functions/node_modules/espurify/lib/clone-ast.js
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
'use strict';
|
||||
|
||||
var isArray = require('core-js/library/fn/array/is-array');
|
||||
var objectKeys = require('core-js/library/fn/object/keys');
|
||||
var indexOf = require('core-js/library/fn/array/index-of');
|
||||
var Map = require('core-js/library/fn/map');
|
||||
var reduce = require('core-js/library/fn/array/reduce');
|
||||
|
||||
module.exports = function cloneWithWhitelist (astWhiteList) {
|
||||
var whitelist = reduce(objectKeys(astWhiteList), function (props, key) {
|
||||
var propNames = astWhiteList[key];
|
||||
var prepend = (indexOf(propNames, 'type') === -1) ? ['type'] : [];
|
||||
props[key] = prepend.concat(propNames || []);
|
||||
return props;
|
||||
}, {});
|
||||
|
||||
function cloneNodeOrObject (obj, seen) {
|
||||
var props = obj.type ? whitelist[obj.type] : null;
|
||||
if (props) {
|
||||
return cloneNode(obj, props, seen);
|
||||
} else {
|
||||
return cloneObject(obj, seen);
|
||||
}
|
||||
}
|
||||
|
||||
function cloneArray (ary, seen) {
|
||||
var i = ary.length;
|
||||
var clone = [];
|
||||
while (i--) {
|
||||
clone[i] = cloneOf(ary[i], seen);
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
|
||||
function cloneNode (node, props, seen) {
|
||||
var i, len, key;
|
||||
var clone = {};
|
||||
for (i = 0, len = props.length; i < len; i += 1) {
|
||||
key = props[i];
|
||||
if (node.hasOwnProperty(key)) {
|
||||
clone[key] = cloneOf(node[key], seen);
|
||||
}
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
|
||||
function cloneObject (obj, seen) {
|
||||
var props = objectKeys(obj);
|
||||
var i, len, key, value;
|
||||
var clone = {};
|
||||
for (i = 0, len = props.length; i < len; i += 1) {
|
||||
key = props[i];
|
||||
value = obj[key];
|
||||
if (seen.has(value)) {
|
||||
continue;
|
||||
}
|
||||
clone[key] = cloneOf(value, seen);
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
|
||||
function cloneOf (val, seen) {
|
||||
if (typeof val === 'object' && val !== null) {
|
||||
seen.set(val, true);
|
||||
if (val instanceof RegExp) {
|
||||
return new RegExp(val);
|
||||
} else if (isArray(val)) {
|
||||
return cloneArray(val, seen);
|
||||
} else {
|
||||
return cloneNodeOrObject(val, seen);
|
||||
}
|
||||
} else {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
|
||||
function cloneRoot (obj) {
|
||||
var seen = new Map();
|
||||
seen.set(obj, true);
|
||||
return cloneNodeOrObject(obj, seen);
|
||||
}
|
||||
|
||||
return cloneRoot;
|
||||
};
|
17
website/functions/node_modules/espurify/lib/create-whitelist.js
generated
vendored
Normal file
17
website/functions/node_modules/espurify/lib/create-whitelist.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
var defaultProps = require('./ast-properties');
|
||||
var objectKeys = require('core-js/library/fn/object/keys');
|
||||
var assign = require('core-js/library/fn/object/assign');
|
||||
|
||||
module.exports = function createWhitelist (options) {
|
||||
var opts = assign({}, options);
|
||||
var typeName, i, len;
|
||||
var keys = objectKeys(defaultProps);
|
||||
var result = {};
|
||||
for (i = 0, len = keys.length; i < len; i += 1) {
|
||||
typeName = keys[i];
|
||||
result[typeName] = defaultProps[typeName].concat(opts.extra || []);
|
||||
}
|
||||
return result;
|
||||
};
|
97
website/functions/node_modules/espurify/package.json
generated
vendored
Normal file
97
website/functions/node_modules/espurify/package.json
generated
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"_from": "espurify@^1.6.0",
|
||||
"_id": "espurify@1.8.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-ZDko6eY/o+D/gHCWyHTU85mKDgYcS4FJj7S+YD6WIInm7GQ6AnOjmcL4+buFV/JOztVLELi/7MmuGU5NHta0Mg==",
|
||||
"_location": "/espurify",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "espurify@^1.6.0",
|
||||
"name": "espurify",
|
||||
"escapedName": "espurify",
|
||||
"rawSpec": "^1.6.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.6.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/power-assert-context-reducer-ast"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/espurify/-/espurify-1.8.1.tgz",
|
||||
"_shasum": "5746c6c1ab42d302de10bd1d5bf7f0e8c0515056",
|
||||
"_spec": "espurify@^1.6.0",
|
||||
"_where": "C:\\Users\\jlevi\\Downloads\\tr2022-strategy-master\\tr2022-strategy-master\\data analysis\\functions\\node_modules\\power-assert-context-reducer-ast",
|
||||
"author": {
|
||||
"name": "Takuto Wada",
|
||||
"email": "takuto.wada@gmail.com",
|
||||
"url": "https://github.com/twada"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/estools/espurify/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"core-js": "^2.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Clone new AST without extra properties",
|
||||
"devDependencies": {
|
||||
"acorn": "^5.0.0",
|
||||
"babel-types": "^6.3.20",
|
||||
"babylon": "^6.3.20",
|
||||
"browserify": "^13.0.0",
|
||||
"derequire": "^2.0.2",
|
||||
"dereserve": "^1.0.0",
|
||||
"esprima": "^4.0.0",
|
||||
"estraverse": "^4.1.0",
|
||||
"licensify": "^3.1.0",
|
||||
"mocha": "^5.0.0",
|
||||
"semistandard": "^12.0.0",
|
||||
"snazzy": "^7.0.0"
|
||||
},
|
||||
"files": [
|
||||
"CHANGELOG.md",
|
||||
"MIT-LICENSE.txt",
|
||||
"README.md",
|
||||
"index.js",
|
||||
"lib",
|
||||
"build/espurify.js",
|
||||
"package.json"
|
||||
],
|
||||
"homepage": "https://github.com/estools/espurify",
|
||||
"keywords": [
|
||||
"ast",
|
||||
"estree",
|
||||
"ecmascript",
|
||||
"es6"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "espurify",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/estools/espurify.git"
|
||||
},
|
||||
"scripts": {
|
||||
"dist": "browserify index.js --plugin licensify --standalone espurify | dereserve | derequire > ./build/espurify.js",
|
||||
"fmt": "semistandard --fix index.js lib test",
|
||||
"lint": "semistandard --verbose index.js lib test | snazzy",
|
||||
"preversion": "npm test",
|
||||
"test": "npm run lint && mocha test",
|
||||
"version": "npm run dist && git add -A build"
|
||||
},
|
||||
"semistandard": {
|
||||
"ignore": [
|
||||
"/build/",
|
||||
"/bench/",
|
||||
"**/*.jsx"
|
||||
],
|
||||
"globals": [
|
||||
"describe",
|
||||
"beforeEach",
|
||||
"it"
|
||||
]
|
||||
},
|
||||
"version": "1.8.1"
|
||||
}
|
Reference in New Issue
Block a user