install gulp to process code
This commit is contained in:
parent
24f6606c2c
commit
b6a3900ee2
1651 changed files with 253427 additions and 39 deletions
21
node_modules/gulp-terser/node_modules/arr-diff/LICENSE
generated
vendored
Executable file
21
node_modules/gulp-terser/node_modules/arr-diff/LICENSE
generated
vendored
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2017, Jon Schlinkert
|
||||
|
||||
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.
|
||||
130
node_modules/gulp-terser/node_modules/arr-diff/README.md
generated
vendored
Normal file
130
node_modules/gulp-terser/node_modules/arr-diff/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
# arr-diff [](https://www.npmjs.com/package/arr-diff) [](https://npmjs.org/package/arr-diff) [](https://travis-ci.org/jonschlinkert/arr-diff)
|
||||
|
||||
> Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save arr-diff
|
||||
```
|
||||
|
||||
Install with [yarn](https://yarnpkg.com):
|
||||
|
||||
```sh
|
||||
$ yarn add arr-diff
|
||||
```
|
||||
|
||||
Install with [bower](https://bower.io/)
|
||||
|
||||
```sh
|
||||
$ bower install arr-diff --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Returns the difference between the first array and additional arrays.
|
||||
|
||||
```js
|
||||
var diff = require('arr-diff');
|
||||
|
||||
var a = ['a', 'b', 'c', 'd'];
|
||||
var b = ['b', 'c'];
|
||||
|
||||
console.log(diff(a, b))
|
||||
//=> ['a', 'd']
|
||||
```
|
||||
|
||||
## Benchmarks
|
||||
|
||||
This library versus [array-differ](https://github.com/sindresorhus/array-differ), on April 14, 2017:
|
||||
|
||||
```
|
||||
Benchmarking: (4 of 4)
|
||||
· long-dupes
|
||||
· long
|
||||
· med
|
||||
· short
|
||||
|
||||
# benchmark/fixtures/long-dupes.js (100804 bytes)
|
||||
arr-diff-3.0.0 x 822 ops/sec ±0.67% (86 runs sampled)
|
||||
arr-diff-4.0.0 x 2,141 ops/sec ±0.42% (89 runs sampled)
|
||||
array-differ x 708 ops/sec ±0.70% (89 runs sampled)
|
||||
|
||||
fastest is arr-diff-4.0.0
|
||||
|
||||
# benchmark/fixtures/long.js (94529 bytes)
|
||||
arr-diff-3.0.0 x 882 ops/sec ±0.60% (87 runs sampled)
|
||||
arr-diff-4.0.0 x 2,329 ops/sec ±0.97% (83 runs sampled)
|
||||
array-differ x 769 ops/sec ±0.61% (90 runs sampled)
|
||||
|
||||
fastest is arr-diff-4.0.0
|
||||
|
||||
# benchmark/fixtures/med.js (708 bytes)
|
||||
arr-diff-3.0.0 x 856,150 ops/sec ±0.42% (89 runs sampled)
|
||||
arr-diff-4.0.0 x 4,665,249 ops/sec ±1.06% (89 runs sampled)
|
||||
array-differ x 653,888 ops/sec ±1.02% (86 runs sampled)
|
||||
|
||||
fastest is arr-diff-4.0.0
|
||||
|
||||
# benchmark/fixtures/short.js (60 bytes)
|
||||
arr-diff-3.0.0 x 3,078,467 ops/sec ±0.77% (93 runs sampled)
|
||||
arr-diff-4.0.0 x 9,213,296 ops/sec ±0.65% (89 runs sampled)
|
||||
array-differ x 1,337,051 ops/sec ±0.91% (92 runs sampled)
|
||||
|
||||
fastest is arr-diff-4.0.0
|
||||
```
|
||||
|
||||
## About
|
||||
|
||||
### Related projects
|
||||
|
||||
* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.")
|
||||
* [array-filter](https://www.npmjs.com/package/array-filter): Array#filter for older browsers. | [homepage](https://github.com/juliangruber/array-filter "Array#filter for older browsers.")
|
||||
* [array-intersection](https://www.npmjs.com/package/array-intersection): Return an array with the unique values present in _all_ given arrays using strict equality… [more](https://github.com/jonschlinkert/array-intersection) | [homepage](https://github.com/jonschlinkert/array-intersection "Return an array with the unique values present in _all_ given arrays using strict equality for comparisons.")
|
||||
|
||||
### Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| --- | --- |
|
||||
| 33 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 2 | [paulmillr](https://github.com/paulmillr) |
|
||||
|
||||
### Building docs
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
### Running tests
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 14, 2017._
|
||||
47
node_modules/gulp-terser/node_modules/arr-diff/index.js
generated
vendored
Normal file
47
node_modules/gulp-terser/node_modules/arr-diff/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
/*!
|
||||
* arr-diff <https://github.com/jonschlinkert/arr-diff>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function diff(arr/*, arrays*/) {
|
||||
var len = arguments.length;
|
||||
var idx = 0;
|
||||
while (++idx < len) {
|
||||
arr = diffArray(arr, arguments[idx]);
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
|
||||
function diffArray(one, two) {
|
||||
if (!Array.isArray(two)) {
|
||||
return one.slice();
|
||||
}
|
||||
|
||||
var tlen = two.length
|
||||
var olen = one.length;
|
||||
var idx = -1;
|
||||
var arr = [];
|
||||
|
||||
while (++idx < olen) {
|
||||
var ele = one[idx];
|
||||
|
||||
var hasEle = false;
|
||||
for (var i = 0; i < tlen; i++) {
|
||||
var val = two[i];
|
||||
|
||||
if (ele === val) {
|
||||
hasEle = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (hasEle === false) {
|
||||
arr.push(ele);
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
69
node_modules/gulp-terser/node_modules/arr-diff/package.json
generated
vendored
Normal file
69
node_modules/gulp-terser/node_modules/arr-diff/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
{
|
||||
"name": "arr-diff",
|
||||
"description": "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.",
|
||||
"version": "4.0.0",
|
||||
"homepage": "https://github.com/jonschlinkert/arr-diff",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"contributors": [
|
||||
"Jon Schlinkert <jon.schlinkert@sellside.com> (http://twitter.com/jonschlinkert)",
|
||||
"Paul Miller <paul+gh@paulmillr.com> (paulmillr.com)"
|
||||
],
|
||||
"repository": "jonschlinkert/arr-diff",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/arr-diff/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"ansi-bold": "^0.1.1",
|
||||
"arr-flatten": "^1.0.1",
|
||||
"array-differ": "^1.0.0",
|
||||
"benchmarked": "^0.2.4",
|
||||
"gulp-format-md": "^0.1.9",
|
||||
"minimist": "^1.2.0",
|
||||
"mocha": "^2.4.5"
|
||||
},
|
||||
"keywords": [
|
||||
"arr",
|
||||
"array",
|
||||
"array differ",
|
||||
"array-differ",
|
||||
"diff",
|
||||
"differ",
|
||||
"difference"
|
||||
],
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"arr-flatten",
|
||||
"array-filter",
|
||||
"array-intersection"
|
||||
]
|
||||
},
|
||||
"reflinks": [
|
||||
"array-differ",
|
||||
"verb"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
||||
21
node_modules/gulp-terser/node_modules/arr-union/LICENSE
generated
vendored
Normal file
21
node_modules/gulp-terser/node_modules/arr-union/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2016, Jon Schlinkert.
|
||||
|
||||
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.
|
||||
99
node_modules/gulp-terser/node_modules/arr-union/README.md
generated
vendored
Normal file
99
node_modules/gulp-terser/node_modules/arr-union/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
# arr-union [](https://www.npmjs.com/package/arr-union) [](https://travis-ci.org/jonschlinkert/arr-union)
|
||||
|
||||
> Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm i arr-union --save
|
||||
```
|
||||
|
||||
## Benchmarks
|
||||
|
||||
This library is **10-20 times faster** and more performant than [array-union](https://github.com/sindresorhus/array-union).
|
||||
|
||||
See the [benchmarks](./benchmark).
|
||||
|
||||
```sh
|
||||
#1: five-arrays
|
||||
array-union x 511,121 ops/sec ±0.80% (96 runs sampled)
|
||||
arr-union x 5,716,039 ops/sec ±0.86% (93 runs sampled)
|
||||
|
||||
#2: ten-arrays
|
||||
array-union x 245,196 ops/sec ±0.69% (94 runs sampled)
|
||||
arr-union x 1,850,786 ops/sec ±0.84% (97 runs sampled)
|
||||
|
||||
#3: two-arrays
|
||||
array-union x 563,869 ops/sec ±0.97% (94 runs sampled)
|
||||
arr-union x 9,602,852 ops/sec ±0.87% (92 runs sampled)
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var union = require('arr-union');
|
||||
|
||||
union(['a'], ['b', 'c'], ['d', 'e', 'f']);
|
||||
//=> ['a', 'b', 'c', 'd', 'e', 'f']
|
||||
```
|
||||
|
||||
Returns only unique elements:
|
||||
|
||||
```js
|
||||
union(['a', 'a'], ['b', 'c']);
|
||||
//=> ['a', 'b', 'c']
|
||||
```
|
||||
|
||||
## Related projects
|
||||
|
||||
* [arr-diff](https://www.npmjs.com/package/arr-diff): Returns an array with only the unique values from the first array, by excluding all… [more](https://www.npmjs.com/package/arr-diff) | [homepage](https://github.com/jonschlinkert/arr-diff)
|
||||
* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter)
|
||||
* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten)
|
||||
* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map)
|
||||
* [arr-pluck](https://www.npmjs.com/package/arr-pluck): Retrieves the value of a specified property from all elements in the collection. | [homepage](https://github.com/jonschlinkert/arr-pluck)
|
||||
* [arr-reduce](https://www.npmjs.com/package/arr-reduce): Fast array reduce that also loops over sparse elements. | [homepage](https://github.com/jonschlinkert/arr-reduce)
|
||||
* [array-unique](https://www.npmjs.com/package/array-unique): Return an array free of duplicate values. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique)
|
||||
|
||||
## Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/arr-union/issues/new).
|
||||
|
||||
## Building docs
|
||||
|
||||
Generate readme and API documentation with [verb](https://github.com/verbose/verb):
|
||||
|
||||
```sh
|
||||
$ npm i verb && npm run docs
|
||||
```
|
||||
|
||||
Or, if [verb](https://github.com/verbose/verb) is installed globally:
|
||||
|
||||
```sh
|
||||
$ verb
|
||||
```
|
||||
|
||||
## Running tests
|
||||
|
||||
Install dev dependencies:
|
||||
|
||||
```sh
|
||||
$ npm i -d && npm test
|
||||
```
|
||||
|
||||
## Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2016 [Jon Schlinkert](https://github.com/jonschlinkert)
|
||||
Released under the [MIT license](https://github.com/jonschlinkert/arr-union/blob/master/LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on February 23, 2016._
|
||||
29
node_modules/gulp-terser/node_modules/arr-union/index.js
generated
vendored
Normal file
29
node_modules/gulp-terser/node_modules/arr-union/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = function union(init) {
|
||||
if (!Array.isArray(init)) {
|
||||
throw new TypeError('arr-union expects the first argument to be an array.');
|
||||
}
|
||||
|
||||
var len = arguments.length;
|
||||
var i = 0;
|
||||
|
||||
while (++i < len) {
|
||||
var arg = arguments[i];
|
||||
if (!arg) continue;
|
||||
|
||||
if (!Array.isArray(arg)) {
|
||||
arg = [arg];
|
||||
}
|
||||
|
||||
for (var j = 0; j < arg.length; j++) {
|
||||
var ele = arg[j];
|
||||
|
||||
if (init.indexOf(ele) >= 0) {
|
||||
continue;
|
||||
}
|
||||
init.push(ele);
|
||||
}
|
||||
}
|
||||
return init;
|
||||
};
|
||||
76
node_modules/gulp-terser/node_modules/arr-union/package.json
generated
vendored
Normal file
76
node_modules/gulp-terser/node_modules/arr-union/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
{
|
||||
"name": "arr-union",
|
||||
"description": "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.",
|
||||
"version": "3.1.0",
|
||||
"homepage": "https://github.com/jonschlinkert/arr-union",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"repository": "jonschlinkert/arr-union",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/arr-union/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ansi-bold": "^0.1.1",
|
||||
"array-union": "^1.0.1",
|
||||
"array-unique": "^0.2.1",
|
||||
"benchmarked": "^0.1.4",
|
||||
"gulp-format-md": "^0.1.7",
|
||||
"minimist": "^1.1.1",
|
||||
"mocha": "*",
|
||||
"should": "*"
|
||||
},
|
||||
"keywords": [
|
||||
"add",
|
||||
"append",
|
||||
"array",
|
||||
"arrays",
|
||||
"combine",
|
||||
"concat",
|
||||
"extend",
|
||||
"union",
|
||||
"uniq",
|
||||
"unique",
|
||||
"util",
|
||||
"utility",
|
||||
"utils"
|
||||
],
|
||||
"verb": {
|
||||
"run": true,
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"arr-diff",
|
||||
"arr-flatten",
|
||||
"arr-filter",
|
||||
"arr-map",
|
||||
"arr-pluck",
|
||||
"arr-reduce",
|
||||
"array-unique"
|
||||
]
|
||||
},
|
||||
"reflinks": [
|
||||
"verb",
|
||||
"array-union"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
||||
21
node_modules/gulp-terser/node_modules/extend-shallow/LICENSE
generated
vendored
Normal file
21
node_modules/gulp-terser/node_modules/extend-shallow/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2015, 2017, Jon Schlinkert.
|
||||
|
||||
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.
|
||||
97
node_modules/gulp-terser/node_modules/extend-shallow/README.md
generated
vendored
Normal file
97
node_modules/gulp-terser/node_modules/extend-shallow/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
# extend-shallow [](https://www.npmjs.com/package/extend-shallow) [](https://npmjs.org/package/extend-shallow) [](https://npmjs.org/package/extend-shallow) [](https://travis-ci.org/jonschlinkert/extend-shallow)
|
||||
|
||||
> Extend an object with the properties of additional objects. node.js/javascript util.
|
||||
|
||||
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save extend-shallow
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var extend = require('extend-shallow');
|
||||
|
||||
extend({a: 'b'}, {c: 'd'})
|
||||
//=> {a: 'b', c: 'd'}
|
||||
```
|
||||
|
||||
Pass an empty object to shallow clone:
|
||||
|
||||
```js
|
||||
var obj = {};
|
||||
extend(obj, {a: 'b'}, {c: 'd'})
|
||||
//=> {a: 'b', c: 'd'}
|
||||
```
|
||||
|
||||
## About
|
||||
|
||||
<details>
|
||||
<summary><strong>Contributing</strong></summary>
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Running Tests</strong></summary>
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Building docs</strong></summary>
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Related projects
|
||||
|
||||
You might also be interested in these projects:
|
||||
|
||||
* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.")
|
||||
* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js")
|
||||
* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.")
|
||||
* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.")
|
||||
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")
|
||||
* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.")
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| --- | --- |
|
||||
| 33 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 1 | [pdehaan](https://github.com/pdehaan) |
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._
|
||||
60
node_modules/gulp-terser/node_modules/extend-shallow/index.js
generated
vendored
Normal file
60
node_modules/gulp-terser/node_modules/extend-shallow/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
'use strict';
|
||||
|
||||
var isExtendable = require('is-extendable');
|
||||
var assignSymbols = require('assign-symbols');
|
||||
|
||||
module.exports = Object.assign || function(obj/*, objects*/) {
|
||||
if (obj === null || typeof obj === 'undefined') {
|
||||
throw new TypeError('Cannot convert undefined or null to object');
|
||||
}
|
||||
if (!isObject(obj)) {
|
||||
obj = {};
|
||||
}
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var val = arguments[i];
|
||||
if (isString(val)) {
|
||||
val = toObject(val);
|
||||
}
|
||||
if (isObject(val)) {
|
||||
assign(obj, val);
|
||||
assignSymbols(obj, val);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
|
||||
function assign(a, b) {
|
||||
for (var key in b) {
|
||||
if (hasOwn(b, key)) {
|
||||
a[key] = b[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function isString(val) {
|
||||
return (val && typeof val === 'string');
|
||||
}
|
||||
|
||||
function toObject(str) {
|
||||
var obj = {};
|
||||
for (var i in str) {
|
||||
obj[i] = str[i];
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
function isObject(val) {
|
||||
return (val && typeof val === 'object') || isExtendable(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the given `key` is an own property of `obj`.
|
||||
*/
|
||||
|
||||
function hasOwn(obj, key) {
|
||||
return Object.prototype.hasOwnProperty.call(obj, key);
|
||||
}
|
||||
|
||||
function isEnum(obj, key) {
|
||||
return Object.prototype.propertyIsEnumerable.call(obj, key);
|
||||
}
|
||||
83
node_modules/gulp-terser/node_modules/extend-shallow/package.json
generated
vendored
Normal file
83
node_modules/gulp-terser/node_modules/extend-shallow/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
{
|
||||
"name": "extend-shallow",
|
||||
"description": "Extend an object with the properties of additional objects. node.js/javascript util.",
|
||||
"version": "3.0.2",
|
||||
"homepage": "https://github.com/jonschlinkert/extend-shallow",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"contributors": [
|
||||
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
|
||||
"Peter deHaan (http://about.me/peterdehaan)"
|
||||
],
|
||||
"repository": "jonschlinkert/extend-shallow",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/extend-shallow/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"assign-symbols": "^1.0.0",
|
||||
"is-extendable": "^1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"array-slice": "^1.0.0",
|
||||
"benchmarked": "^2.0.0",
|
||||
"for-own": "^1.0.0",
|
||||
"gulp-format-md": "^1.0.0",
|
||||
"is-plain-object": "^2.0.4",
|
||||
"kind-of": "^6.0.1",
|
||||
"minimist": "^1.2.0",
|
||||
"mocha": "^3.5.3",
|
||||
"object-assign": "^4.1.1"
|
||||
},
|
||||
"keywords": [
|
||||
"assign",
|
||||
"clone",
|
||||
"extend",
|
||||
"merge",
|
||||
"obj",
|
||||
"object",
|
||||
"object-assign",
|
||||
"object.assign",
|
||||
"prop",
|
||||
"properties",
|
||||
"property",
|
||||
"props",
|
||||
"shallow",
|
||||
"util",
|
||||
"utility",
|
||||
"utils",
|
||||
"value"
|
||||
],
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"extend-shallow",
|
||||
"for-in",
|
||||
"for-own",
|
||||
"is-plain-object",
|
||||
"isobject",
|
||||
"kind-of"
|
||||
]
|
||||
},
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
||||
21
node_modules/gulp-terser/node_modules/plugin-error/LICENSE
generated
vendored
Normal file
21
node_modules/gulp-terser/node_modules/plugin-error/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other contributors
|
||||
|
||||
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.
|
||||
69
node_modules/gulp-terser/node_modules/plugin-error/README.md
generated
vendored
Normal file
69
node_modules/gulp-terser/node_modules/plugin-error/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<p align="center">
|
||||
<a href="http://gulpjs.com">
|
||||
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
# plugin-error
|
||||
|
||||
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
|
||||
|
||||
Error handling for Vinyl plugins.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var PluginError = require('plugin-error');
|
||||
|
||||
var err = new PluginError('test', {
|
||||
message: 'something broke'
|
||||
});
|
||||
|
||||
var err = new PluginError({
|
||||
plugin: 'test',
|
||||
message: 'something broke'
|
||||
});
|
||||
|
||||
var err = new PluginError('test', 'something broke');
|
||||
|
||||
var err = new PluginError('test', 'something broke', { showStack: true });
|
||||
|
||||
var existingError = new Error('OMG');
|
||||
var err = new PluginError('test', existingError, { showStack: true });
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### `new PluginError(pluginName, message[, options])`
|
||||
|
||||
Error constructor that takes:
|
||||
* `pluginName` - a `String` that should be the module name of your plugin
|
||||
* `message` - a `String` message or an existing `Error` object
|
||||
* `options` - an `Object` of your options
|
||||
|
||||
**Behavior:**
|
||||
|
||||
* By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error.
|
||||
* If you pass an error object as the message the stack will be pulled from that, otherwise one will be created.
|
||||
* If you pass in a custom stack string you need to include the message along with that.
|
||||
* Error properties will be included in `err.toString()`, but may be omitted by including `{ showProperties: false }` in the options.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
[downloads-image]: http://img.shields.io/npm/dm/plugin-error.svg
|
||||
[npm-url]: https://www.npmjs.com/package/plugin-error
|
||||
[npm-image]: http://img.shields.io/npm/v/plugin-error.svg
|
||||
|
||||
[travis-url]: https://travis-ci.org/gulpjs/plugin-error
|
||||
[travis-image]: http://img.shields.io/travis/gulpjs/plugin-error.svg?label=travis-ci
|
||||
|
||||
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/plugin-error
|
||||
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/plugin-error.svg?label=appveyor
|
||||
|
||||
[coveralls-url]: https://coveralls.io/r/gulpjs/plugin-error
|
||||
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/plugin-error/master.svg
|
||||
|
||||
[gitter-url]: https://gitter.im/gulpjs/gulp
|
||||
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
|
||||
114
node_modules/gulp-terser/node_modules/plugin-error/index.d.ts
generated
vendored
Normal file
114
node_modules/gulp-terser/node_modules/plugin-error/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
declare namespace PluginError {
|
||||
interface Constructor {
|
||||
/**
|
||||
* @param plugin Plugin name
|
||||
* @param error Base error
|
||||
* @param options Error options
|
||||
*/
|
||||
new <E extends Error>(plugin: string, error: E, options?: Options): PluginError<E>;
|
||||
|
||||
/**
|
||||
* @param plugin Plugin name
|
||||
* @param error Base error or error message
|
||||
* @param options Error options
|
||||
*/
|
||||
new <E extends Error = Error>(plugin: string, error: E | string, options: Options): PluginError<E | {[K in keyof E]: undefined}>;
|
||||
|
||||
/**
|
||||
* @param plugin Plugin name
|
||||
* @param error Base error, error message, or options with message
|
||||
*/
|
||||
new <E extends Error = Error>(plugin: string, error: E | string | (Options & {message: string})): PluginError<E | {[K in keyof E]: undefined}>;
|
||||
|
||||
/**
|
||||
* @param options Options with plugin name and message
|
||||
*/
|
||||
new(options: Options & {plugin: string, message: string}): PluginError;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
/**
|
||||
* Error name
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* Error message
|
||||
*/
|
||||
message?: any;
|
||||
|
||||
/**
|
||||
* File name where the error occurred
|
||||
*/
|
||||
fileName?: string;
|
||||
|
||||
|
||||
/**
|
||||
* Line number where the error occurred
|
||||
*/
|
||||
lineNumber?: number;
|
||||
|
||||
/**
|
||||
* Error properties will be included in err.toString(). Can be omitted by
|
||||
* setting this to false.
|
||||
*
|
||||
* Default: `true`
|
||||
*/
|
||||
showProperties?: boolean;
|
||||
|
||||
/**
|
||||
* By default the stack will not be shown. Set this to true if you think the
|
||||
* stack is important for your error.
|
||||
*
|
||||
* Default: `false`
|
||||
*/
|
||||
showStack?: boolean;
|
||||
|
||||
/**
|
||||
* Error stack to use for `err.toString()` if `showStack` is `true`.
|
||||
* By default it uses the `stack` of the original error if you used one, otherwise it captures a new stack.
|
||||
*/
|
||||
stack?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* The `SimplePluginError` interface defines the properties available on all the the instances of `PluginError`.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
interface SimplePluginError extends Error {
|
||||
/**
|
||||
* Plugin name
|
||||
*/
|
||||
plugin: string;
|
||||
|
||||
/**
|
||||
* Boolean controlling if the stack will be shown in `err.toString()`.
|
||||
*/
|
||||
showStack: boolean;
|
||||
|
||||
/**
|
||||
* Boolean controlling if properties will be shown in `err.toString()`.
|
||||
*/
|
||||
showProperties: boolean;
|
||||
|
||||
/**
|
||||
* File name where the error occurred
|
||||
*/
|
||||
fileName?: string;
|
||||
|
||||
/**
|
||||
* Line number where the error occurred
|
||||
*/
|
||||
lineNumber?: number;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstraction for error handling for Vinyl plugins
|
||||
*/
|
||||
type PluginError<T = {}> = PluginError.SimplePluginError & T;
|
||||
|
||||
declare const PluginError: PluginError.Constructor;
|
||||
|
||||
export = PluginError;
|
||||
190
node_modules/gulp-terser/node_modules/plugin-error/index.js
generated
vendored
Normal file
190
node_modules/gulp-terser/node_modules/plugin-error/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,190 @@
|
|||
var util = require('util');
|
||||
var colors = require('ansi-colors');
|
||||
var extend = require('extend-shallow');
|
||||
var differ = require('arr-diff');
|
||||
var union = require('arr-union');
|
||||
|
||||
var nonEnum = ['message', 'name', 'stack'];
|
||||
var ignored = union(nonEnum, ['__safety', '_stack', 'plugin', 'showProperties', 'showStack']);
|
||||
var props = ['fileName', 'lineNumber', 'message', 'name', 'plugin', 'showProperties', 'showStack', 'stack'];
|
||||
|
||||
function PluginError(plugin, message, options) {
|
||||
if (!(this instanceof PluginError)) {
|
||||
throw new Error('Call PluginError using new');
|
||||
}
|
||||
|
||||
Error.call(this);
|
||||
var opts = setDefaults(plugin, message, options);
|
||||
var self = this;
|
||||
|
||||
// If opts has an error, get details from it
|
||||
if (typeof opts.error === 'object') {
|
||||
var keys = union(Object.keys(opts.error), nonEnum);
|
||||
|
||||
// These properties are not enumerable, so we have to add them explicitly.
|
||||
keys.forEach(function(prop) {
|
||||
self[prop] = opts.error[prop];
|
||||
});
|
||||
}
|
||||
|
||||
// Opts object can override
|
||||
props.forEach(function(prop) {
|
||||
if (prop in opts) {
|
||||
this[prop] = opts[prop];
|
||||
}
|
||||
}, this);
|
||||
|
||||
// Defaults
|
||||
if (!this.name) {
|
||||
this.name = 'Error';
|
||||
}
|
||||
if (!this.stack) {
|
||||
|
||||
/**
|
||||
* `Error.captureStackTrace` appends a stack property which
|
||||
* relies on the toString method of the object it is applied to.
|
||||
*
|
||||
* Since we are using our own toString method which controls when
|
||||
* to display the stack trace, if we don't go through this safety
|
||||
* object we'll get stack overflow problems.
|
||||
*/
|
||||
|
||||
var safety = {};
|
||||
safety.toString = function() {
|
||||
return this._messageWithDetails() + '\nStack:';
|
||||
}.bind(this);
|
||||
|
||||
Error.captureStackTrace(safety, arguments.callee || this.constructor);
|
||||
this.__safety = safety;
|
||||
}
|
||||
if (!this.plugin) {
|
||||
throw new Error('Missing plugin name');
|
||||
}
|
||||
if (!this.message) {
|
||||
throw new Error('Missing error message');
|
||||
}
|
||||
}
|
||||
|
||||
util.inherits(PluginError, Error);
|
||||
|
||||
/**
|
||||
* Output a formatted message with details
|
||||
*/
|
||||
|
||||
PluginError.prototype._messageWithDetails = function() {
|
||||
var msg = 'Message:\n ' + this.message;
|
||||
var details = this._messageDetails();
|
||||
if (details !== '') {
|
||||
msg += '\n' + details;
|
||||
}
|
||||
return msg;
|
||||
};
|
||||
|
||||
/**
|
||||
* Output actual message details
|
||||
*/
|
||||
|
||||
PluginError.prototype._messageDetails = function() {
|
||||
if (!this.showProperties) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var props = differ(Object.keys(this), ignored);
|
||||
var len = props.length;
|
||||
|
||||
if (len === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var res = '';
|
||||
var i = 0;
|
||||
while (len--) {
|
||||
var prop = props[i++];
|
||||
res += ' ';
|
||||
res += prop + ': ' + this[prop];
|
||||
res += '\n';
|
||||
}
|
||||
return 'Details:\n' + res;
|
||||
};
|
||||
|
||||
/**
|
||||
* Override the `toString` method
|
||||
*/
|
||||
|
||||
PluginError.prototype.toString = function() {
|
||||
var detailsWithStack = function(stack) {
|
||||
return this._messageWithDetails() + '\nStack:\n' + stack;
|
||||
}.bind(this);
|
||||
|
||||
var msg = '';
|
||||
if (this.showStack) {
|
||||
// If there is no wrapped error, use the stack captured in the PluginError ctor
|
||||
if (this.__safety) {
|
||||
msg = this.__safety.stack;
|
||||
|
||||
} else if (this._stack) {
|
||||
msg = detailsWithStack(this._stack);
|
||||
|
||||
} else {
|
||||
// Stack from wrapped error
|
||||
msg = detailsWithStack(this.stack);
|
||||
}
|
||||
return message(msg, this);
|
||||
}
|
||||
|
||||
msg = this._messageWithDetails();
|
||||
return message(msg, this);
|
||||
};
|
||||
|
||||
// Format the output message
|
||||
function message(msg, thisArg) {
|
||||
var sig = colors.red(thisArg.name);
|
||||
sig += ' in plugin ';
|
||||
sig += '"' + colors.cyan(thisArg.plugin) + '"';
|
||||
sig += '\n';
|
||||
sig += msg;
|
||||
return sig;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set default options based on arguments.
|
||||
*/
|
||||
|
||||
function setDefaults(plugin, message, opts) {
|
||||
if (typeof plugin === 'object') {
|
||||
return defaults(plugin);
|
||||
}
|
||||
opts = opts || {};
|
||||
if (message instanceof Error) {
|
||||
opts.error = message;
|
||||
} else if (typeof message === 'object') {
|
||||
opts = message;
|
||||
} else {
|
||||
opts.message = message;
|
||||
}
|
||||
opts.plugin = plugin;
|
||||
return defaults(opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Extend default options with:
|
||||
*
|
||||
* - `showStack`: default=false
|
||||
* - `showProperties`: default=true
|
||||
*
|
||||
* @param {Object} `opts` Options to extend
|
||||
* @return {Object}
|
||||
*/
|
||||
|
||||
function defaults(opts) {
|
||||
return extend({
|
||||
showStack: false,
|
||||
showProperties: true,
|
||||
}, opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Expose `PluginError`
|
||||
*/
|
||||
|
||||
module.exports = PluginError;
|
||||
51
node_modules/gulp-terser/node_modules/plugin-error/package.json
generated
vendored
Normal file
51
node_modules/gulp-terser/node_modules/plugin-error/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"name": "plugin-error",
|
||||
"version": "1.0.1",
|
||||
"description": "Error handling for Vinyl plugins.",
|
||||
"author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)",
|
||||
"contributors": [
|
||||
"Jon Schlinkert <jon.schlinkert@sellside.com>",
|
||||
"Blaine Bublitz <blaine.bublitz@gmail.com>"
|
||||
],
|
||||
"repository": "gulpjs/plugin-error",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
},
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"index.d.ts",
|
||||
"index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"lint": "eslint . && jscs index.js test/",
|
||||
"pretest": "npm run lint",
|
||||
"test": "mocha --async-only && npm run test-types",
|
||||
"test-types": "tsc -p test/types",
|
||||
"cover": "istanbul cover _mocha --report lcovonly",
|
||||
"coveralls": "npm run cover && istanbul-coveralls"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-colors": "^1.0.1",
|
||||
"arr-diff": "^4.0.0",
|
||||
"arr-union": "^3.1.0",
|
||||
"extend-shallow": "^3.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^1.7.3",
|
||||
"eslint-config-gulp": "^2.0.0",
|
||||
"expect": "^1.20.2",
|
||||
"istanbul": "^0.4.3",
|
||||
"istanbul-coveralls": "^1.0.3",
|
||||
"jscs": "^2.3.5",
|
||||
"jscs-preset-gulp": "^1.0.0",
|
||||
"mocha": "^3.0.0",
|
||||
"typescript": "^2.6.2"
|
||||
},
|
||||
"keywords": [
|
||||
"error",
|
||||
"plugin",
|
||||
"gulp-util"
|
||||
]
|
||||
}
|
||||
9
node_modules/gulp-terser/node_modules/through2/LICENSE.md
generated
vendored
Normal file
9
node_modules/gulp-terser/node_modules/through2/LICENSE.md
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# The MIT License (MIT)
|
||||
|
||||
**Copyright (c) Rod Vagg (the "Original Author") and additional contributors**
|
||||
|
||||
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.
|
||||
140
node_modules/gulp-terser/node_modules/through2/README.md
generated
vendored
Normal file
140
node_modules/gulp-terser/node_modules/through2/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
# through2
|
||||
|
||||

|
||||
|
||||
[](https://nodei.co/npm/through2/)
|
||||
|
||||
**A tiny wrapper around Node.js streams.Transform (Streams2/3) to avoid explicit subclassing noise**
|
||||
|
||||
Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.
|
||||
|
||||
```js
|
||||
fs.createReadStream('ex.txt')
|
||||
.pipe(through2(function (chunk, enc, callback) {
|
||||
for (let i = 0; i < chunk.length; i++)
|
||||
if (chunk[i] == 97)
|
||||
chunk[i] = 122 // swap 'a' for 'z'
|
||||
|
||||
this.push(chunk)
|
||||
|
||||
callback()
|
||||
}))
|
||||
.pipe(fs.createWriteStream('out.txt'))
|
||||
.on('finish', () => doSomethingSpecial())
|
||||
```
|
||||
|
||||
Or object streams:
|
||||
|
||||
```js
|
||||
const all = []
|
||||
|
||||
fs.createReadStream('data.csv')
|
||||
.pipe(csv2())
|
||||
.pipe(through2.obj(function (chunk, enc, callback) {
|
||||
const data = {
|
||||
name : chunk[0]
|
||||
, address : chunk[3]
|
||||
, phone : chunk[10]
|
||||
}
|
||||
this.push(data)
|
||||
|
||||
callback()
|
||||
}))
|
||||
.on('data', (data) => {
|
||||
all.push(data)
|
||||
})
|
||||
.on('end', () => {
|
||||
doSomethingSpecial(all)
|
||||
})
|
||||
```
|
||||
|
||||
Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.
|
||||
|
||||
## Do you need this?
|
||||
|
||||
Since Node.js introduced [Simplified Stream Construction](https://nodejs.org/api/stream.html#stream_simplified_construction), many uses of **through2** have become redundant. Consider whether you really need to use **through2** or just want to use the `'readable-stream'` package, or the core `'stream'` package (which is derived from `'readable-stream'`):
|
||||
|
||||
```js
|
||||
const { Transform } = require('readable-stream')
|
||||
|
||||
const transformer = new Transform({
|
||||
transform(chunk, enc, callback) {
|
||||
// ...
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>
|
||||
|
||||
Consult the **[stream.Transform](https://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).
|
||||
|
||||
### options
|
||||
|
||||
The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).
|
||||
|
||||
The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:
|
||||
|
||||
```js
|
||||
fs.createReadStream('/tmp/important.dat')
|
||||
.pipe(through2({ objectMode: true, allowHalfOpen: false },
|
||||
(chunk, enc, cb) => {
|
||||
cb(null, 'wut?') // note we can use the second argument on the callback
|
||||
// to provide data as an alternative to this.push('wut?')
|
||||
}
|
||||
))
|
||||
.pipe(fs.createWriteStream('/tmp/wut.txt'))
|
||||
```
|
||||
|
||||
### transformFunction
|
||||
|
||||
The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.
|
||||
|
||||
To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on.
|
||||
|
||||
Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error.
|
||||
|
||||
If you **do not provide a `transformFunction`** then you will get a simple pass-through stream.
|
||||
|
||||
### flushFunction
|
||||
|
||||
The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.
|
||||
|
||||
```js
|
||||
fs.createReadStream('/tmp/important.dat')
|
||||
.pipe(through2(
|
||||
(chunk, enc, cb) => cb(null, chunk), // transform is a noop
|
||||
function (cb) { // flush function
|
||||
this.push('tacking on an extra buffer to the end');
|
||||
cb();
|
||||
}
|
||||
))
|
||||
.pipe(fs.createWriteStream('/tmp/wut.txt'));
|
||||
```
|
||||
|
||||
<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b>
|
||||
|
||||
Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.
|
||||
|
||||
```js
|
||||
const FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {
|
||||
if (record.temp != null && record.unit == "F") {
|
||||
record.temp = ( ( record.temp - 32 ) * 5 ) / 9
|
||||
record.unit = "C"
|
||||
}
|
||||
this.push(record)
|
||||
callback()
|
||||
})
|
||||
|
||||
// Create instances of FToC like so:
|
||||
const converter = new FToC()
|
||||
// Or:
|
||||
const converter = FToC()
|
||||
// Or specify/override options when you instantiate, if you prefer:
|
||||
const converter = FToC({objectMode: true})
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
**through2** is Copyright © Rod Vagg and additional contributors and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.
|
||||
38
node_modules/gulp-terser/node_modules/through2/package.json
generated
vendored
Normal file
38
node_modules/gulp-terser/node_modules/through2/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"name": "through2",
|
||||
"version": "4.0.2",
|
||||
"description": "A tiny wrapper around Node.js streams.Transform (Streams2/3) to avoid explicit subclassing noise",
|
||||
"main": "through2.js",
|
||||
"scripts": {
|
||||
"test:node": "hundreds mocha test/test.js",
|
||||
"test:browser": "node -e 'process.exit(process.version.startsWith(\"v8.\") ? 0 : 1)' || polendina --cleanup --runner=mocha test/test.js",
|
||||
"test": "npm run lint && npm run test:node && npm run test:browser",
|
||||
"lint": "standard",
|
||||
"coverage": "c8 --reporter=text --reporter=html mocha test/test.js && npx st -d coverage -p 8888"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/rvagg/through2.git"
|
||||
},
|
||||
"keywords": [
|
||||
"stream",
|
||||
"streams2",
|
||||
"through",
|
||||
"transform"
|
||||
],
|
||||
"author": "Rod Vagg <r@va.gg> (https://github.com/rvagg)",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"readable-stream": "3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bl": "^4.0.2",
|
||||
"buffer": "^5.6.0",
|
||||
"chai": "^4.2.0",
|
||||
"hundreds": "~0.0.7",
|
||||
"mocha": "^7.2.0",
|
||||
"polendina": "^1.0.0",
|
||||
"standard": "^14.3.4",
|
||||
"stream-spigot": "^3.0.6"
|
||||
}
|
||||
}
|
||||
83
node_modules/gulp-terser/node_modules/through2/through2.js
generated
vendored
Normal file
83
node_modules/gulp-terser/node_modules/through2/through2.js
generated
vendored
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
const { Transform } = require('readable-stream')
|
||||
|
||||
function inherits (fn, sup) {
|
||||
fn.super_ = sup
|
||||
fn.prototype = Object.create(sup.prototype, {
|
||||
constructor: { value: fn, enumerable: false, writable: true, configurable: true }
|
||||
})
|
||||
}
|
||||
|
||||
// create a new export function, used by both the main export and
|
||||
// the .ctor export, contains common logic for dealing with arguments
|
||||
function through2 (construct) {
|
||||
return (options, transform, flush) => {
|
||||
if (typeof options === 'function') {
|
||||
flush = transform
|
||||
transform = options
|
||||
options = {}
|
||||
}
|
||||
|
||||
if (typeof transform !== 'function') {
|
||||
// noop
|
||||
transform = (chunk, enc, cb) => cb(null, chunk)
|
||||
}
|
||||
|
||||
if (typeof flush !== 'function') {
|
||||
flush = null
|
||||
}
|
||||
|
||||
return construct(options, transform, flush)
|
||||
}
|
||||
}
|
||||
|
||||
// main export, just make me a transform stream!
|
||||
const make = through2((options, transform, flush) => {
|
||||
const t2 = new Transform(options)
|
||||
|
||||
t2._transform = transform
|
||||
|
||||
if (flush) {
|
||||
t2._flush = flush
|
||||
}
|
||||
|
||||
return t2
|
||||
})
|
||||
|
||||
// make me a reusable prototype that I can `new`, or implicitly `new`
|
||||
// with a constructor call
|
||||
const ctor = through2((options, transform, flush) => {
|
||||
function Through2 (override) {
|
||||
if (!(this instanceof Through2)) {
|
||||
return new Through2(override)
|
||||
}
|
||||
|
||||
this.options = Object.assign({}, options, override)
|
||||
|
||||
Transform.call(this, this.options)
|
||||
|
||||
this._transform = transform
|
||||
if (flush) {
|
||||
this._flush = flush
|
||||
}
|
||||
}
|
||||
|
||||
inherits(Through2, Transform)
|
||||
|
||||
return Through2
|
||||
})
|
||||
|
||||
const obj = through2(function (options, transform, flush) {
|
||||
const t2 = new Transform(Object.assign({ objectMode: true, highWaterMark: 16 }, options))
|
||||
|
||||
t2._transform = transform
|
||||
|
||||
if (flush) {
|
||||
t2._flush = flush
|
||||
}
|
||||
|
||||
return t2
|
||||
})
|
||||
|
||||
module.exports = make
|
||||
module.exports.ctor = ctor
|
||||
module.exports.obj = obj
|
||||
Loading…
Add table
Add a link
Reference in a new issue