diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-05-28 00:38:50 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-05-28 00:40:43 +0200 |
commit | 7fff4499fd915bcea3fa93b1aa8b35f4fe7a6027 (patch) | |
tree | 6de9a1aebd150a23b7f8c273ec657a5d0a18fe3e /node_modules/espurify | |
parent | 963b7a41feb29cc4be090a2446bdfe0c1f1bcd81 (diff) | |
download | wallet-core-7fff4499fd915bcea3fa93b1aa8b35f4fe7a6027.tar.xz |
add linting (and some initial fixes)
Diffstat (limited to 'node_modules/espurify')
-rw-r--r-- | node_modules/espurify/CHANGELOG.md | 109 | ||||
-rw-r--r-- | node_modules/espurify/MIT-LICENSE.txt | 20 | ||||
-rw-r--r-- | node_modules/espurify/README.md | 259 | ||||
-rw-r--r-- | node_modules/espurify/build/espurify.js | 667 | ||||
-rw-r--r-- | node_modules/espurify/index.js | 22 | ||||
-rw-r--r-- | node_modules/espurify/lib/ast-properties.js | 68 | ||||
-rw-r--r-- | node_modules/espurify/lib/clone-ast.js | 69 | ||||
-rw-r--r-- | node_modules/espurify/lib/create-whitelist.js | 17 | ||||
-rw-r--r-- | node_modules/espurify/package.json | 56 |
9 files changed, 1287 insertions, 0 deletions
diff --git a/node_modules/espurify/CHANGELOG.md b/node_modules/espurify/CHANGELOG.md new file mode 100644 index 000000000..ef726cfea --- /dev/null +++ b/node_modules/espurify/CHANGELOG.md @@ -0,0 +1,109 @@ +## [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. diff --git a/node_modules/espurify/MIT-LICENSE.txt b/node_modules/espurify/MIT-LICENSE.txt new file mode 100644 index 000000000..67bb2dc52 --- /dev/null +++ b/node_modules/espurify/MIT-LICENSE.txt @@ -0,0 +1,20 @@ +Copyright (c) 2014-2017 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. diff --git a/node_modules/espurify/README.md b/node_modules/espurify/README.md new file mode 100644 index 000000000..ae06a028c --- /dev/null +++ b/node_modules/espurify/README.md @@ -0,0 +1,259 @@ +espurify +================================ + +Clone new AST without extra properties + +[![Build Status](https://travis-ci.org/estools/espurify.svg?branch=master)](https://travis-ci.org/estools/espurify) +[![NPM version](https://badge.fury.io/js/espurify.svg)](https://badge.fury.io/js/espurify) +[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/estools/espurify/blob/master/MIT-LICENSE.txt) + + +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. diff --git a/node_modules/espurify/build/espurify.js b/node_modules/espurify/build/espurify.js new file mode 100644 index 000000000..c2c965ada --- /dev/null +++ b/node_modules/espurify/build/espurify.js @@ -0,0 +1,667 @@ +/** + * Modules in this bundle + * @license + * + * espurify: + * license: MIT (http://opensource.org/licenses/MIT) + * author: Takuto Wada <takuto.wada@gmail.com> + * homepage: https://github.com/estools/espurify + * version: 1.7.0 + * + * core-js: + * license: MIT (http://opensource.org/licenses/MIT) + * maintainers: zloirock <zloirock@zloirock.ru> + * homepage: https://github.com/zloirock/core-js#readme + * version: 2.4.1 + * + * This header is generated by licensify (https://github.com/twada/licensify) + */ +(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.espurify = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw (f.code="MODULE_NOT_FOUND", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ +/** + * espurify - Clone new AST without extra properties + * + * https://github.com/estools/espurify + * + * Copyright (c) 2014-2017 Takuto Wada + * Licensed under the MIT license. + * https://github.com/estools/espurify/blob/master/MIT-LICENSE.txt + */ +'use strict'; + +var createWhitelist = _dereq_('./lib/create-whitelist'); +var cloneWithWhitelist = _dereq_('./lib/clone-ast'); + +function createCloneFunction (options) { + return cloneWithWhitelist(createWhitelist(options)); +} + +var espurify = createCloneFunction(); +espurify.customize = createCloneFunction; +espurify.cloneWithWhitelist = cloneWithWhitelist; +module.exports = espurify; + +},{"./lib/clone-ast":3,"./lib/create-whitelist":4}],2:[function(_dereq_,module,exports){ +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'], + 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'] +}; + +},{}],3:[function(_dereq_,module,exports){ +'use strict'; + +var isArray = _dereq_('core-js/library/fn/array/is-array'); +var objectKeys = _dereq_('core-js/library/fn/object/keys'); +var indexOf = _dereq_('core-js/library/fn/array/index-of'); +var reduce = _dereq_('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) { + var props = obj.type ? whitelist[obj.type] : null; + if (props) { + return cloneNode(obj, props); + } else { + return cloneObject(obj); + } + } + + function cloneArray (ary) { + var i = ary.length, clone = []; + while (i--) { + clone[i] = cloneOf(ary[i]); + } + return clone; + } + + function cloneNode (node, props) { + var i, len, key, clone = {}; + for (i = 0, len = props.length; i < len; i += 1) { + key = props[i]; + if (node.hasOwnProperty(key)) { + clone[key] = cloneOf(node[key]); + } + } + return clone; + } + + function cloneObject (obj) { + var props = objectKeys(obj); + var i, len, key, clone = {}; + for (i = 0, len = props.length; i < len; i += 1) { + key = props[i]; + clone[key] = cloneOf(obj[key]); + } + return clone; + } + + function cloneOf (val) { + if (typeof val === 'object' && val !== null) { + if (val instanceof RegExp) { + return new RegExp(val); + } else if (isArray(val)) { + return cloneArray(val); + } else { + return cloneNodeOrObject(val); + } + } else { + return val; + } + } + + return cloneNodeOrObject; +}; + +},{"core-js/library/fn/array/index-of":5,"core-js/library/fn/array/is-array":6,"core-js/library/fn/array/reduce":7,"core-js/library/fn/object/keys":9}],4:[function(_dereq_,module,exports){ +'use strict'; + +var defaultProps = _dereq_('./ast-properties'); +var objectKeys = _dereq_('core-js/library/fn/object/keys'); +var assign = _dereq_('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; +}; + +},{"./ast-properties":2,"core-js/library/fn/object/assign":8,"core-js/library/fn/object/keys":9}],5:[function(_dereq_,module,exports){ +_dereq_('../../modules/es6.array.index-of'); +module.exports = _dereq_('../../modules/_core').Array.indexOf; +},{"../../modules/_core":15,"../../modules/es6.array.index-of":48}],6:[function(_dereq_,module,exports){ +_dereq_('../../modules/es6.array.is-array'); +module.exports = _dereq_('../../modules/_core').Array.isArray; +},{"../../modules/_core":15,"../../modules/es6.array.is-array":49}],7:[function(_dereq_,module,exports){ +_dereq_('../../modules/es6.array.reduce'); +module.exports = _dereq_('../../modules/_core').Array.reduce; +},{"../../modules/_core":15,"../../modules/es6.array.reduce":50}],8:[function(_dereq_,module,exports){ +_dereq_('../../modules/es6.object.assign'); +module.exports = _dereq_('../../modules/_core').Object.assign; +},{"../../modules/_core":15,"../../modules/es6.object.assign":51}],9:[function(_dereq_,module,exports){ +_dereq_('../../modules/es6.object.keys'); +module.exports = _dereq_('../../modules/_core').Object.keys; +},{"../../modules/_core":15,"../../modules/es6.object.keys":52}],10:[function(_dereq_,module,exports){ +module.exports = function(it){ + if(typeof it != 'function')throw TypeError(it + ' is not a function!'); + return it; +}; +},{}],11:[function(_dereq_,module,exports){ +var isObject = _dereq_('./_is-object'); +module.exports = function(it){ + if(!isObject(it))throw TypeError(it + ' is not an object!'); + return it; +}; +},{"./_is-object":29}],12:[function(_dereq_,module,exports){ +// false -> Array#indexOf +// true -> Array#includes +var toIObject = _dereq_('./_to-iobject') + , toLength = _dereq_('./_to-length') + , toIndex = _dereq_('./_to-index'); +module.exports = function(IS_INCLUDES){ + return function($this, el, fromIndex){ + var O = toIObject($this) + , length = toLength(O.length) + , index = toIndex(fromIndex, length) + , value; + // Array#includes uses SameValueZero equality algorithm + if(IS_INCLUDES && el != el)while(length > index){ + value = O[index++]; + if(value != value)return true; + // Array#toIndex ignores holes, Array#includes - not + } else for(;length > index; index++)if(IS_INCLUDES || index in O){ + if(O[index] === el)return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; +},{"./_to-index":41,"./_to-iobject":43,"./_to-length":44}],13:[function(_dereq_,module,exports){ +var aFunction = _dereq_('./_a-function') + , toObject = _dereq_('./_to-object') + , IObject = _dereq_('./_iobject') + , toLength = _dereq_('./_to-length'); + +module.exports = function(that, callbackfn, aLen, memo, isRight){ + aFunction(callbackfn); + var O = toObject(that) + , self = IObject(O) + , length = toLength(O.length) + , index = isRight ? length - 1 : 0 + , i = isRight ? -1 : 1; + if(aLen < 2)for(;;){ + if(index in self){ + memo = self[index]; + index += i; + break; + } + index += i; + if(isRight ? index < 0 : length <= index){ + throw TypeError('Reduce of empty array with no initial value'); + } + } + for(;isRight ? index >= 0 : length > index; index += i)if(index in self){ + memo = callbackfn(memo, self[index], index, O); + } + return memo; +}; +},{"./_a-function":10,"./_iobject":27,"./_to-length":44,"./_to-object":45}],14:[function(_dereq_,module,exports){ +var toString = {}.toString; + +module.exports = function(it){ + return toString.call(it).slice(8, -1); +}; +},{}],15:[function(_dereq_,module,exports){ +var core = module.exports = {version: '2.4.0'}; +if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef +},{}],16:[function(_dereq_,module,exports){ +// optional / simple context binding +var aFunction = _dereq_('./_a-function'); +module.exports = function(fn, that, length){ + aFunction(fn); + if(that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } + return function(/* ...args */){ + return fn.apply(that, arguments); + }; +}; +},{"./_a-function":10}],17:[function(_dereq_,module,exports){ +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function(it){ + if(it == undefined)throw TypeError("Can't call method on " + it); + return it; +}; +},{}],18:[function(_dereq_,module,exports){ +// Thank's IE8 for his funny defineProperty +module.exports = !_dereq_('./_fails')(function(){ + return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; +}); +},{"./_fails":22}],19:[function(_dereq_,module,exports){ +var isObject = _dereq_('./_is-object') + , document = _dereq_('./_global').document + // in old IE typeof document.createElement is 'object' + , is = isObject(document) && isObject(document.createElement); +module.exports = function(it){ + return is ? document.createElement(it) : {}; +}; +},{"./_global":23,"./_is-object":29}],20:[function(_dereq_,module,exports){ +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); +},{}],21:[function(_dereq_,module,exports){ +var global = _dereq_('./_global') + , core = _dereq_('./_core') + , ctx = _dereq_('./_ctx') + , hide = _dereq_('./_hide') + , PROTOTYPE = 'prototype'; + +var $export = function(type, name, source){ + var IS_FORCED = type & $export.F + , IS_GLOBAL = type & $export.G + , IS_STATIC = type & $export.S + , IS_PROTO = type & $export.P + , IS_BIND = type & $export.B + , IS_WRAP = type & $export.W + , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) + , expProto = exports[PROTOTYPE] + , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] + , key, own, out; + if(IS_GLOBAL)source = name; + for(key in source){ + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if(own && key in exports)continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function(C){ + var F = function(a, b, c){ + if(this instanceof C){ + switch(arguments.length){ + case 0: return new C; + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if(IS_PROTO){ + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; +},{"./_core":15,"./_ctx":16,"./_global":23,"./_hide":25}],22:[function(_dereq_,module,exports){ +module.exports = function(exec){ + try { + return !!exec(); + } catch(e){ + return true; + } +}; +},{}],23:[function(_dereq_,module,exports){ +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); +if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef +},{}],24:[function(_dereq_,module,exports){ +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function(it, key){ + return hasOwnProperty.call(it, key); +}; +},{}],25:[function(_dereq_,module,exports){ +var dP = _dereq_('./_object-dp') + , createDesc = _dereq_('./_property-desc'); +module.exports = _dereq_('./_descriptors') ? function(object, key, value){ + return dP.f(object, key, createDesc(1, value)); +} : function(object, key, value){ + object[key] = value; + return object; +}; +},{"./_descriptors":18,"./_object-dp":31,"./_property-desc":37}],26:[function(_dereq_,module,exports){ +module.exports = !_dereq_('./_descriptors') && !_dereq_('./_fails')(function(){ + return Object.defineProperty(_dereq_('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7; +}); +},{"./_descriptors":18,"./_dom-create":19,"./_fails":22}],27:[function(_dereq_,module,exports){ +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = _dereq_('./_cof'); +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ + return cof(it) == 'String' ? it.split('') : Object(it); +}; +},{"./_cof":14}],28:[function(_dereq_,module,exports){ +// 7.2.2 IsArray(argument) +var cof = _dereq_('./_cof'); +module.exports = Array.isArray || function isArray(arg){ + return cof(arg) == 'Array'; +}; +},{"./_cof":14}],29:[function(_dereq_,module,exports){ +module.exports = function(it){ + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; +},{}],30:[function(_dereq_,module,exports){ +'use strict'; +// 19.1.2.1 Object.assign(target, source, ...) +var getKeys = _dereq_('./_object-keys') + , gOPS = _dereq_('./_object-gops') + , pIE = _dereq_('./_object-pie') + , toObject = _dereq_('./_to-object') + , IObject = _dereq_('./_iobject') + , $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || _dereq_('./_fails')(function(){ + var A = {} + , B = {} + , S = Symbol() + , K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function(k){ B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source){ // eslint-disable-line no-unused-vars + var T = toObject(target) + , aLen = arguments.length + , index = 1 + , getSymbols = gOPS.f + , isEnum = pIE.f; + while(aLen > index){ + var S = IObject(arguments[index++]) + , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) + , length = keys.length + , j = 0 + , key; + while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; + } return T; +} : $assign; +},{"./_fails":22,"./_iobject":27,"./_object-gops":32,"./_object-keys":34,"./_object-pie":35,"./_to-object":45}],31:[function(_dereq_,module,exports){ +var anObject = _dereq_('./_an-object') + , IE8_DOM_DEFINE = _dereq_('./_ie8-dom-define') + , toPrimitive = _dereq_('./_to-primitive') + , dP = Object.defineProperty; + +exports.f = _dereq_('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes){ + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if(IE8_DOM_DEFINE)try { + return dP(O, P, Attributes); + } catch(e){ /* empty */ } + if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); + if('value' in Attributes)O[P] = Attributes.value; + return O; +}; +},{"./_an-object":11,"./_descriptors":18,"./_ie8-dom-define":26,"./_to-primitive":46}],32:[function(_dereq_,module,exports){ +exports.f = Object.getOwnPropertySymbols; +},{}],33:[function(_dereq_,module,exports){ +var has = _dereq_('./_has') + , toIObject = _dereq_('./_to-iobject') + , arrayIndexOf = _dereq_('./_array-includes')(false) + , IE_PROTO = _dereq_('./_shared-key')('IE_PROTO'); + +module.exports = function(object, names){ + var O = toIObject(object) + , i = 0 + , result = [] + , key; + for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while(names.length > i)if(has(O, key = names[i++])){ + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; +},{"./_array-includes":12,"./_has":24,"./_shared-key":38,"./_to-iobject":43}],34:[function(_dereq_,module,exports){ +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = _dereq_('./_object-keys-internal') + , enumBugKeys = _dereq_('./_enum-bug-keys'); + +module.exports = Object.keys || function keys(O){ + return $keys(O, enumBugKeys); +}; +},{"./_enum-bug-keys":20,"./_object-keys-internal":33}],35:[function(_dereq_,module,exports){ +exports.f = {}.propertyIsEnumerable; +},{}],36:[function(_dereq_,module,exports){ +// most Object methods by ES6 should accept primitives +var $export = _dereq_('./_export') + , core = _dereq_('./_core') + , fails = _dereq_('./_fails'); +module.exports = function(KEY, exec){ + var fn = (core.Object || {})[KEY] || Object[KEY] + , exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); +}; +},{"./_core":15,"./_export":21,"./_fails":22}],37:[function(_dereq_,module,exports){ +module.exports = function(bitmap, value){ + return { + enumerable : !(bitmap & 1), + configurable: !(bitmap & 2), + writable : !(bitmap & 4), + value : value + }; +}; +},{}],38:[function(_dereq_,module,exports){ +var shared = _dereq_('./_shared')('keys') + , uid = _dereq_('./_uid'); +module.exports = function(key){ + return shared[key] || (shared[key] = uid(key)); +}; +},{"./_shared":39,"./_uid":47}],39:[function(_dereq_,module,exports){ +var global = _dereq_('./_global') + , SHARED = '__core-js_shared__' + , store = global[SHARED] || (global[SHARED] = {}); +module.exports = function(key){ + return store[key] || (store[key] = {}); +}; +},{"./_global":23}],40:[function(_dereq_,module,exports){ +var fails = _dereq_('./_fails'); + +module.exports = function(method, arg){ + return !!method && fails(function(){ + arg ? method.call(null, function(){}, 1) : method.call(null); + }); +}; +},{"./_fails":22}],41:[function(_dereq_,module,exports){ +var toInteger = _dereq_('./_to-integer') + , max = Math.max + , min = Math.min; +module.exports = function(index, length){ + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; +},{"./_to-integer":42}],42:[function(_dereq_,module,exports){ +// 7.1.4 ToInteger +var ceil = Math.ceil + , floor = Math.floor; +module.exports = function(it){ + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; +},{}],43:[function(_dereq_,module,exports){ +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = _dereq_('./_iobject') + , defined = _dereq_('./_defined'); +module.exports = function(it){ + return IObject(defined(it)); +}; +},{"./_defined":17,"./_iobject":27}],44:[function(_dereq_,module,exports){ +// 7.1.15 ToLength +var toInteger = _dereq_('./_to-integer') + , min = Math.min; +module.exports = function(it){ + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; +},{"./_to-integer":42}],45:[function(_dereq_,module,exports){ +// 7.1.13 ToObject(argument) +var defined = _dereq_('./_defined'); +module.exports = function(it){ + return Object(defined(it)); +}; +},{"./_defined":17}],46:[function(_dereq_,module,exports){ +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = _dereq_('./_is-object'); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function(it, S){ + if(!isObject(it))return it; + var fn, val; + if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; + if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + throw TypeError("Can't convert object to primitive value"); +}; +},{"./_is-object":29}],47:[function(_dereq_,module,exports){ +var id = 0 + , px = Math.random(); +module.exports = function(key){ + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; +},{}],48:[function(_dereq_,module,exports){ +'use strict'; +var $export = _dereq_('./_export') + , $indexOf = _dereq_('./_array-includes')(false) + , $native = [].indexOf + , NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !_dereq_('./_strict-method')($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /*, fromIndex = 0 */){ + return NEGATIVE_ZERO + // convert -0 to +0 + ? $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + } +}); +},{"./_array-includes":12,"./_export":21,"./_strict-method":40}],49:[function(_dereq_,module,exports){ +// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) +var $export = _dereq_('./_export'); + +$export($export.S, 'Array', {isArray: _dereq_('./_is-array')}); +},{"./_export":21,"./_is-array":28}],50:[function(_dereq_,module,exports){ +'use strict'; +var $export = _dereq_('./_export') + , $reduce = _dereq_('./_array-reduce'); + +$export($export.P + $export.F * !_dereq_('./_strict-method')([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */){ + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + } +}); +},{"./_array-reduce":13,"./_export":21,"./_strict-method":40}],51:[function(_dereq_,module,exports){ +// 19.1.3.1 Object.assign(target, source) +var $export = _dereq_('./_export'); + +$export($export.S + $export.F, 'Object', {assign: _dereq_('./_object-assign')}); +},{"./_export":21,"./_object-assign":30}],52:[function(_dereq_,module,exports){ +// 19.1.2.14 Object.keys(O) +var toObject = _dereq_('./_to-object') + , $keys = _dereq_('./_object-keys'); + +_dereq_('./_object-sap')('keys', function(){ + return function keys(it){ + return $keys(toObject(it)); + }; +}); +},{"./_object-keys":34,"./_object-sap":36,"./_to-object":45}]},{},[1])(1) +}); diff --git a/node_modules/espurify/index.js b/node_modules/espurify/index.js new file mode 100644 index 000000000..ed28ec635 --- /dev/null +++ b/node_modules/espurify/index.js @@ -0,0 +1,22 @@ +/** + * espurify - Clone new AST without extra properties + * + * https://github.com/estools/espurify + * + * Copyright (c) 2014-2017 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; diff --git a/node_modules/espurify/lib/ast-properties.js b/node_modules/espurify/lib/ast-properties.js new file mode 100644 index 000000000..37267b973 --- /dev/null +++ b/node_modules/espurify/lib/ast-properties.js @@ -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'], + 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'] +}; diff --git a/node_modules/espurify/lib/clone-ast.js b/node_modules/espurify/lib/clone-ast.js new file mode 100644 index 000000000..f748b885d --- /dev/null +++ b/node_modules/espurify/lib/clone-ast.js @@ -0,0 +1,69 @@ +'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 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) { + var props = obj.type ? whitelist[obj.type] : null; + if (props) { + return cloneNode(obj, props); + } else { + return cloneObject(obj); + } + } + + function cloneArray (ary) { + var i = ary.length, clone = []; + while (i--) { + clone[i] = cloneOf(ary[i]); + } + return clone; + } + + function cloneNode (node, props) { + var i, len, key, clone = {}; + for (i = 0, len = props.length; i < len; i += 1) { + key = props[i]; + if (node.hasOwnProperty(key)) { + clone[key] = cloneOf(node[key]); + } + } + return clone; + } + + function cloneObject (obj) { + var props = objectKeys(obj); + var i, len, key, clone = {}; + for (i = 0, len = props.length; i < len; i += 1) { + key = props[i]; + clone[key] = cloneOf(obj[key]); + } + return clone; + } + + function cloneOf (val) { + if (typeof val === 'object' && val !== null) { + if (val instanceof RegExp) { + return new RegExp(val); + } else if (isArray(val)) { + return cloneArray(val); + } else { + return cloneNodeOrObject(val); + } + } else { + return val; + } + } + + return cloneNodeOrObject; +}; diff --git a/node_modules/espurify/lib/create-whitelist.js b/node_modules/espurify/lib/create-whitelist.js new file mode 100644 index 000000000..b1dbc16a0 --- /dev/null +++ b/node_modules/espurify/lib/create-whitelist.js @@ -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; +}; diff --git a/node_modules/espurify/package.json b/node_modules/espurify/package.json new file mode 100644 index 000000000..0858b3eba --- /dev/null +++ b/node_modules/espurify/package.json @@ -0,0 +1,56 @@ +{ + "name": "espurify", + "description": "Clone new AST without extra properties", + "version": "1.7.0", + "author": { + "name": "Takuto Wada", + "email": "takuto.wada@gmail.com", + "url": "https://github.com/twada" + }, + "bugs": "https://github.com/estools/espurify/issues", + "dependencies": { + "core-js": "^2.0.0" + }, + "devDependencies": { + "acorn": "^4.0.11", + "babel-types": "^6.3.20", + "babylon": "^6.3.20", + "browserify": "^13.0.0", + "derequire": "^2.0.2", + "dereserve": "^1.0.0", + "esprima": "^2.6.0", + "estraverse": "^4.1.0", + "jshint": "^2.8.0", + "licensify": "^3.1.0", + "mocha": "^2.3.2" + }, + "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", + "repository": { + "type": "git", + "url": "git://github.com/estools/espurify.git" + }, + "scripts": { + "preversion": "npm test", + "version": "npm run dist && git add -A build", + "dist": "browserify index.js --plugin licensify --standalone espurify | dereserve | derequire > ./build/espurify.js", + "lint": "jshint index.js", + "test": "npm run lint && mocha test" + } +} |