A new start

This commit is contained in:
2018-11-24 14:43:59 +01:00
commit 3c32c8a37a
24054 changed files with 1376258 additions and 0 deletions

24
node_modules/plugin-error/node_modules/arr-diff/LICENSE generated vendored Executable file
View File

@@ -0,0 +1,24 @@
The MIT License (MIT)
Copyright (c) 2014-2015 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.

75
node_modules/plugin-error/node_modules/arr-diff/README.md generated vendored Executable file
View File

@@ -0,0 +1,75 @@
# arr-diff [![NPM version](https://badge.fury.io/js/arr-diff.svg)](http://badge.fury.io/js/arr-diff) [![Build Status](https://travis-ci.org/jonschlinkert/arr-diff.svg)](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 i arr-diff --save
```
Install with [bower](http://bower.io/)
```sh
$ bower install arr-diff --save
```
## API
### [diff](index.js#L33)
Return the difference between the first array and additional arrays.
**Params**
* `a` **{Array}**
* `b` **{Array}**
* `returns` **{Array}**
**Example**
```js
var diff = require('arr-diff');
var a = ['a', 'b', 'c', 'd'];
var b = ['b', 'c'];
console.log(diff(a, b))
//=> ['a', 'd']
```
## 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)
* [array-filter](https://www.npmjs.com/package/array-filter): Array#filter for older browsers. | [homepage](https://github.com/juliangruber/array-filter)
* [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://www.npmjs.com/package/array-intersection) | [homepage](https://github.com/jonschlinkert/array-intersection)
## Running tests
Install dev dependencies:
```sh
$ npm i -d && npm test
```
## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/arr-diff/issues/new).
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
Copyright © 2015 Jon Schlinkert
Released under the MIT license.
***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 23, 2015._

58
node_modules/plugin-error/node_modules/arr-diff/index.js generated vendored Executable file
View File

@@ -0,0 +1,58 @@
/*!
* arr-diff <https://github.com/jonschlinkert/arr-diff>
*
* Copyright (c) 2014 Jon Schlinkert, contributors.
* Licensed under the MIT License
*/
'use strict';
var flatten = require('arr-flatten');
var slice = require('array-slice');
/**
* Return the difference between the first array and
* additional arrays.
*
* ```js
* var diff = require('{%= name %}');
*
* var a = ['a', 'b', 'c', 'd'];
* var b = ['b', 'c'];
*
* console.log(diff(a, b))
* //=> ['a', 'd']
* ```
*
* @param {Array} `a`
* @param {Array} `b`
* @return {Array}
* @api public
*/
function diff(arr, arrays) {
var argsLen = arguments.length;
var len = arr.length, i = -1;
var res = [], arrays;
if (argsLen === 1) {
return arr;
}
if (argsLen > 2) {
arrays = flatten(slice(arguments, 1));
}
while (++i < len) {
if (!~arrays.indexOf(arr[i])) {
res.push(arr[i]);
}
}
return res;
}
/**
* Expose `diff`
*/
module.exports = diff;

View File

@@ -0,0 +1,80 @@
{
"_from": "arr-diff@^1.0.1",
"_id": "arr-diff@1.1.0",
"_inBundle": false,
"_integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=",
"_location": "/plugin-error/arr-diff",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "arr-diff@^1.0.1",
"name": "arr-diff",
"escapedName": "arr-diff",
"rawSpec": "^1.0.1",
"saveSpec": null,
"fetchSpec": "^1.0.1"
},
"_requiredBy": [
"/plugin-error"
],
"_resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz",
"_shasum": "687c32758163588fef7de7b36fabe495eb1a399a",
"_spec": "arr-diff@^1.0.1",
"_where": "/var/www/html/autocompletion/node_modules/plugin-error",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/arr-diff/issues"
},
"bundleDependencies": false,
"dependencies": {
"arr-flatten": "^1.0.1",
"array-slice": "^0.2.3"
},
"deprecated": false,
"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.",
"devDependencies": {
"array-differ": "^1.0.0",
"benchmarked": "^0.1.4",
"chalk": "^1.1.1",
"mocha": "^2.2.5",
"should": "^7.0.4"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/jonschlinkert/arr-diff",
"keywords": [
"arr",
"array",
"diff",
"differ",
"difference"
],
"license": "MIT",
"main": "index.js",
"name": "arr-diff",
"repository": {
"type": "git",
"url": "git+https://github.com/jonschlinkert/arr-diff.git"
},
"scripts": {
"test": "mocha"
},
"verb": {
"related": {
"list": [
"arr-flatten",
"array-filter",
"array-intersection"
]
}
},
"version": "1.1.0"
}

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014-2015, 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.

View File

@@ -0,0 +1,85 @@
# arr-union [![NPM version](https://badge.fury.io/js/arr-union.svg)](http://badge.fury.io/js/arr-union) [![Build Status](https://travis-ci.org/jonschlinkert/arr-union.svg)](https://travis-ci.org/jonschlinkert/arr-union)
> Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.
This library is **15-20 times faster** and more performant (scales better) than [array-union](https://github.com/sindresorhus/array-union), which just uses `[].concat.apply([], arguments)`.
## Benchmarks
See the [benchmarks](./benchmark).
```bash
#1: five-arrays.js
array-union.js x 245,487 ops/sec ±0.99% (96 runs sampled)
current.js x 5,267,661 ops/sec ±0.63% (98 runs sampled)
#2: ten-arrays.js
array-union.js x 134,784 ops/sec ±0.51% (94 runs sampled)
current.js x 1,919,143 ops/sec ±0.45% (100 runs sampled)
#3: two-arrays.js
array-union.js x 308,374 ops/sec ±0.75% (96 runs sampled)
current.js x 7,361,915 ops/sec ±0.67% (95 runs sampled)
```
## Install
Install with [npm](https://www.npmjs.com/)
```sh
$ npm i arr-union --save
```
## 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']
```
## Other array utilities
* [arr-diff](https://github.com/jonschlinkert/arr-diff): Returns an array with only the unique values from the first array, by excluding all… [more](https://github.com/jonschlinkert/arr-diff)
* [arr-flatten](https://github.com/jonschlinkert/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten.
* [arr-filter](https://github.com/jonschlinkert/arr-filter): Faster alternative to javascript's native filter method.
* [arr-map](https://github.com/jonschlinkert/arr-map): Faster, node.js focused alternative to JavaScript's native array map.
* [arr-pluck](https://github.com/jonschlinkert/arr-pluck): Retrieves the value of a specified property from all elements in the collection.
* [arr-reduce](https://github.com/jonschlinkert/arr-reduce): Fast array reduce that also loops over sparse elements.
* [array-unique](https://github.com/jonschlinkert/array-unique): Return an array free of duplicate values. Fastest ES5 implementation.
## Running tests
Install dev dependencies:
```sh
$ npm i -d && npm test
```
## 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)
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
Copyright © 2015 Jon Schlinkert
Released under the MIT license.
***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 15, 2015._

View File

@@ -0,0 +1,30 @@
/*!
* arr-union <https://github.com/jonschlinkert/arr-union>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
module.exports = function union(arr) {
var len = arguments.length;
var res = [], i = 0;
while (len--) {
var arg = arrayify(arguments[i++]);
for (var j = 0; j < arg.length; j++) {
var ele = arg[j];
if (res.indexOf(ele) === -1) {
res.push(ele);
}
}
}
return res;
};
function arrayify(val) {
return Array.isArray(val) ? val : [val];
}

View File

@@ -0,0 +1,78 @@
{
"_from": "arr-union@^2.0.1",
"_id": "arr-union@2.1.0",
"_inBundle": false,
"_integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=",
"_location": "/plugin-error/arr-union",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "arr-union@^2.0.1",
"name": "arr-union",
"escapedName": "arr-union",
"rawSpec": "^2.0.1",
"saveSpec": null,
"fetchSpec": "^2.0.1"
},
"_requiredBy": [
"/plugin-error"
],
"_resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz",
"_shasum": "20f9eab5ec70f5c7d215b1077b1c39161d292c7d",
"_spec": "arr-union@^2.0.1",
"_where": "/var/www/html/autocompletion/node_modules/plugin-error",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/arr-union/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.",
"devDependencies": {
"array-union": "^1.0.1",
"array-unique": "^0.2.1",
"benchmarked": "^0.1.3",
"chalk": "^1.0.0",
"minimist": "^1.1.1",
"mocha": "^2.2.1",
"should": "^5.2.0",
"verb": "^0.8.6"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/jonschlinkert/arr-union",
"keywords": [
"add",
"append",
"array",
"arrays",
"combine",
"concat",
"extend",
"union",
"uniq",
"unique",
"util",
"utility",
"utils"
],
"license": "MIT",
"main": "index.js",
"name": "arr-union",
"repository": {
"type": "git",
"url": "git://github.com/jonschlinkert/arr-union.git"
},
"scripts": {
"test": "mocha"
},
"version": "2.1.0"
}

21
node_modules/plugin-error/node_modules/array-slice/LICENSE generated vendored Executable file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014-2015, Jon Schlinkert.Copyright (c) 2012-2015, The Dojo Foundation.copyright (c) 2009-2015, Jeremy Ashkenas.
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.

54
node_modules/plugin-error/node_modules/array-slice/README.md generated vendored Executable file
View File

@@ -0,0 +1,54 @@
# array-slice [![NPM version](https://badge.fury.io/js/array-slice.svg)](http://badge.fury.io/js/array-slice) [![Build Status](https://travis-ci.org/jonschlinkert/array-slice.svg)](https://travis-ci.org/jonschlinkert/array-slice)
> Array-slice method. Slices `array` from the `start` index up to, but not including, the `end` index.
This function is used instead of `Array#slice` to support node lists in IE < 9 and to ensure dense arrays are returned.
## Install with [npm](npmjs.org)
```bash
npm i array-slice --save
```
## Usage
```js
var slice = require('array-slice');
var arr = ['a', 'b', 'd', 'e', 'f', 'g', 'h', 'i', 'j'];
slice(arr, 3, 6);
//=> ['e', 'f', 'g']
```
## Useful array utils
* [arr-diff](https://github.com/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.
* [arr-filter](https://github.com/jonschlinkert/arr-filter): Faster alternative to javascript's native filter method.
* [arr-flatten](https://github.com/jonschlinkert/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten.
* [arr-union](https://github.com/jonschlinkert/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.
* [array-unique](https://github.com/jonschlinkert/array-unique): Return an array free of duplicate values. Fastest ES5 implementation.
* [array-intersection](https://github.com/jonschlinkert/array-intersection): Return an array with the unique values present in _all_ given arrays using strict equality for comparisons.
## Running tests
Install dev dependencies:
```bash
npm i -d && npm test
```
## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/array-slice/issues)
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
Copyright (c) 2015 Jon Schlinkert
Released under the MIT license
***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on April 07, 2015._

36
node_modules/plugin-error/node_modules/array-slice/index.js generated vendored Executable file
View File

@@ -0,0 +1,36 @@
/*!
* array-slice <https://github.com/jonschlinkert/array-slice>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
module.exports = function slice(arr, start, end) {
var len = arr.length >>> 0;
var range = [];
start = idx(arr, start);
end = idx(arr, end, len);
while (start < end) {
range.push(arr[start++]);
}
return range;
};
function idx(arr, pos, end) {
var len = arr.length >>> 0;
if (pos == null) {
pos = end || 0;
} else if (pos < 0) {
pos = Math.max(len + pos, 0);
} else {
pos = Math.min(pos, len);
}
return pos;
}

View File

@@ -0,0 +1,68 @@
{
"_from": "array-slice@^0.2.3",
"_id": "array-slice@0.2.3",
"_inBundle": false,
"_integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=",
"_location": "/plugin-error/array-slice",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "array-slice@^0.2.3",
"name": "array-slice",
"escapedName": "array-slice",
"rawSpec": "^0.2.3",
"saveSpec": null,
"fetchSpec": "^0.2.3"
},
"_requiredBy": [
"/plugin-error/arr-diff"
],
"_resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz",
"_shasum": "dd3cfb80ed7973a75117cdac69b0b99ec86186f5",
"_spec": "array-slice@^0.2.3",
"_where": "/var/www/html/autocompletion/node_modules/plugin-error/node_modules/arr-diff",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/array-slice/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Array-slice method. Slices `array` from the `start` index up to, but not including, the `end` index.",
"devDependencies": {
"mocha": "*",
"should": "^5.2.0"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/jonschlinkert/array-slice",
"keywords": [
"array",
"javascript",
"js",
"slice",
"util",
"utils"
],
"license": {
"type": "MIT",
"url": "https://github.com/jonschlinkert/array-slice/blob/master/LICENSE"
},
"main": "index.js",
"name": "array-slice",
"repository": {
"type": "git",
"url": "git://github.com/jonschlinkert/array-slice.git"
},
"scripts": {
"test": "mocha"
},
"version": "0.2.3"
}

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014-2015, 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.

View File

@@ -0,0 +1,59 @@
# extend-shallow [![NPM version](https://badge.fury.io/js/extend-shallow.svg)](http://badge.fury.io/js/extend-shallow) [![Build Status](https://travis-ci.org/jonschlinkert/extend-shallow.svg)](https://travis-ci.org/jonschlinkert/extend-shallow)
> Extend an object with the properties of additional objects. node.js/javascript util.
Install with [npm](https://www.npmjs.com/)
```sh
$ npm i extend-shallow --save
```
## Running tests
Install dev dependencies:
```sh
$ npm i -d && npm test
```
## 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'}
```
## Related
* [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util.
* [for-own](https://github.com/jonschlinkert/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own)
* [for-in](https://github.com/jonschlinkert/for-in): Iterate over the own and inherited enumerable properties of an objecte, and return an object… [more](https://github.com/jonschlinkert/for-in)
* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor.
* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null.
* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value.
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
Copyright © 2015 Jon Schlinkert
Released under the MIT license.
***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 21, 2015._

View File

@@ -0,0 +1,36 @@
'use strict';
var typeOf = require('kind-of');
/**
* Expose `extend`
*/
module.exports = extend;
/**
* Extend `o` with properties of other `objects`.
*
* @param {Object} `o` The target object. Pass an empty object to shallow clone.
* @param {Object} `objects`
* @return {Object}
*/
function extend(o) {
if (typeOf(o) !== 'object') { return {}; }
var args = arguments;
var len = args.length - 1;
for (var i = 0; i < len; i++) {
var obj = args[i + 1];
if (typeOf(obj) === 'object' && typeOf(obj) !== 'regexp') {
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
o[key] = obj[key];
}
}
}
}
return o;
};

View File

@@ -0,0 +1,85 @@
{
"_from": "extend-shallow@^1.1.2",
"_id": "extend-shallow@1.1.4",
"_inBundle": false,
"_integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=",
"_location": "/plugin-error/extend-shallow",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "extend-shallow@^1.1.2",
"name": "extend-shallow",
"escapedName": "extend-shallow",
"rawSpec": "^1.1.2",
"saveSpec": null,
"fetchSpec": "^1.1.2"
},
"_requiredBy": [
"/plugin-error"
],
"_resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz",
"_shasum": "19d6bf94dfc09d76ba711f39b872d21ff4dd9071",
"_spec": "extend-shallow@^1.1.2",
"_where": "/var/www/html/autocompletion/node_modules/plugin-error",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/extend-shallow/issues"
},
"bundleDependencies": false,
"dependencies": {
"kind-of": "^1.1.0"
},
"deprecated": false,
"description": "Extend an object with the properties of additional objects. node.js/javascript util.",
"devDependencies": {
"array-slice": "^0.2.2",
"benchmarked": "^0.1.3",
"chalk": "^0.5.1",
"for-own": "^0.1.2",
"glob": "^4.3.1",
"is-plain-object": "^2.0.0",
"minimist": "^1.1.0",
"mocha": "*",
"should": "^5.0.1"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/jonschlinkert/extend-shallow",
"keywords": [
"extend",
"javascript",
"js",
"keys",
"merge",
"obj",
"object",
"prop",
"properties",
"property",
"props",
"shallow",
"util",
"utility",
"utils",
"value"
],
"license": "MIT",
"main": "index.js",
"name": "extend-shallow",
"repository": {
"type": "git",
"url": "git://github.com/jonschlinkert/extend-shallow.git"
},
"scripts": {
"test": "mocha"
},
"version": "1.1.4"
}

View File

@@ -0,0 +1,155 @@
# kind-of [![NPM version](https://badge.fury.io/js/kind-of.svg)](http://badge.fury.io/js/kind-of) [![Build Status](https://travis-ci.org/jonschlinkert/kind-of.svg)](https://travis-ci.org/jonschlinkert/kind-of)
> Get the native type of a value.
## Install with [npm](npmjs.org)
```bash
npm i kind-of --save
```
## Usage
```js
var kindOf = require('kind-of');
kindOf(undefined);
//=> 'undefined'
kindOf(null);
//=> 'null'
kindOf(true);
//=> 'boolean'
kindOf(false);
//=> 'boolean'
kindOf(new Boolean(true));
//=> 'boolean'
kindOf(new Buffer(''));
//=> 'buffer'
kindOf(42);
//=> 'number'
kindOf(new Number(42));
//=> 'number'
kindOf("string");
//=> 'string'
kindOf(arguments);
//=> 'arguments'
kindOf({});
//=> 'object'
kindOf(new Test());
//=> 'object'
kindOf(new Date());
//=> 'date'
kindOf([]);
//=> 'array'
kindOf([1, 2, 3]);
//=> 'array'
kindOf(new Array());
//=> 'array'
kindOf(/[\s\S]+/);
//=> 'regexp'
kindOf(new RegExp('^' + 'foo$'));
//=> 'regexp'
kindOf(function () {});
//=> 'function'
kindOf(new Function());
//=> 'function'
```
## Run tests
Install dev dependencies:
```bash
npm i -d && npm test
```
## Benchmarks
Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of).
```bash
#1: array.js
kind-of x 21,578,944 ops/sec ±1.01% (97 runs sampled)
(lib) type-of x 4,593,840 ops/sec ±0.76% (92 runs sampled)
(lib) typeof x 5,786,776 ops/sec ±0.71% (97 runs sampled)
#2: boolean.js
kind-of x 25,189,600 ops/sec ±0.60% (97 runs sampled)
(lib) type-of x 2,751,076 ops/sec ±0.78% (100 runs sampled)
(lib) typeof x 4,390,312 ops/sec ±0.61% (99 runs sampled)
#3: date.js
kind-of x 8,862,303 ops/sec ±0.77% (99 runs sampled)
(lib) type-of x 6,239,662 ops/sec ±0.67% (94 runs sampled)
(lib) typeof x 6,180,922 ops/sec ±0.59% (97 runs sampled)
#4: function.js
kind-of x 19,685,336 ops/sec ±1.67% (95 runs sampled)
(lib) type-of x 6,648,551 ops/sec ±0.93% (95 runs sampled)
(lib) typeof x 6,631,967 ops/sec ±1.05% (92 runs sampled)
#5: null.js
kind-of x 24,155,010 ops/sec ±0.95% (91 runs sampled)
(lib) type-of x 12,854,583 ops/sec ±0.69% (94 runs sampled)
(lib) typeof x 8,182,952 ops/sec ±0.48% (99 runs sampled)
#6: number.js
kind-of x 20,993,521 ops/sec ±0.37% (98 runs sampled)
(lib) type-of x 2,112,716 ops/sec ±0.73% (96 runs sampled)
(lib) typeof x 4,492,943 ops/sec ±0.68% (96 runs sampled)
#7: object.js
kind-of x 3,686,169 ops/sec ±0.85% (96 runs sampled)
(lib) type-of x 3,661,833 ops/sec ±0.73% (98 runs sampled)
(lib) typeof x 6,159,847 ops/sec ±0.72% (98 runs sampled)
#8: regex.js
kind-of x 10,780,535 ops/sec ±0.75% (95 runs sampled)
(lib) type-of x 5,380,781 ops/sec ±0.83% (92 runs sampled)
(lib) typeof x 5,852,558 ops/sec ±0.67% (95 runs sampled)
#9: string.js
kind-of x 19,713,570 ops/sec ±0.69% (91 runs sampled)
(lib) type-of x 4,017,753 ops/sec ±0.85% (98 runs sampled)
(lib) typeof x 4,370,984 ops/sec ±0.62% (100 runs sampled)
#10: undef.js
kind-of x 23,250,387 ops/sec ±0.88% (91 runs sampled)
(lib) type-of x 13,725,183 ops/sec ±0.62% (91 runs sampled)
(lib) typeof x 20,549,334 ops/sec ±0.74% (97 runs sampled)
```
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
Copyright (c) 2014-2015 Jon Schlinkert
Released under the MIT license
***
_This file was generated by [verb](https://github.com/assemble/verb) on February 09, 2015._

View File

@@ -0,0 +1,45 @@
var toString = Object.prototype.toString;
/**
* Get the native `typeof` a value.
*
* @param {*} `val`
* @return {*} Native javascript type
*/
module.exports = function kindOf(val) {
if (val === undefined) {
return 'undefined';
}
if (val === null) {
return 'null';
}
if (val === true || val === false || val instanceof Boolean) {
return 'boolean';
}
if (typeof val !== 'object') {
return typeof val;
}
if (Array.isArray(val)) {
return 'array';
}
var type = toString.call(val);
if (val instanceof RegExp || type === '[object RegExp]') {
return 'regexp';
}
if (val instanceof Date || type === '[object Date]') {
return 'date';
}
if (type === '[object Function]') {
return 'function';
}
if (type === '[object Arguments]') {
return 'arguments';
}
if (typeof Buffer !== 'undefined' && Buffer.isBuffer(val)) {
return 'buffer';
}
return type.slice(8, -1).toLowerCase();
};

View File

@@ -0,0 +1,86 @@
{
"_from": "kind-of@^1.1.0",
"_id": "kind-of@1.1.0",
"_inBundle": false,
"_integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=",
"_location": "/plugin-error/kind-of",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "kind-of@^1.1.0",
"name": "kind-of",
"escapedName": "kind-of",
"rawSpec": "^1.1.0",
"saveSpec": null,
"fetchSpec": "^1.1.0"
},
"_requiredBy": [
"/plugin-error/extend-shallow"
],
"_resolved": "http://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz",
"_shasum": "140a3d2d41a36d2efcfa9377b62c24f8495a5c44",
"_spec": "kind-of@^1.1.0",
"_where": "/var/www/html/autocompletion/node_modules/plugin-error/node_modules/extend-shallow",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/kind-of/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Get the native type of a value.",
"devDependencies": {
"benchmarked": "^0.1.3",
"chalk": "^0.5.1",
"glob": "^4.3.5",
"should": "^4.6.1",
"type-of": "^2.0.1",
"typeof": "^1.0.0"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/jonschlinkert/kind-of",
"keywords": [
"arguments",
"array",
"boolean",
"check",
"date",
"function",
"is",
"is-type",
"is-type-of",
"kind",
"kind-of",
"number",
"object",
"regexp",
"string",
"test",
"type",
"type-of",
"typeof",
"types"
],
"license": {
"type": "MIT",
"url": "https://github.com/jonschlinkert/kind-of/blob/master/LICENSE"
},
"main": "index.js",
"name": "kind-of",
"repository": {
"type": "git",
"url": "git://github.com/jonschlinkert/kind-of.git"
},
"scripts": {
"test": "mocha"
},
"version": "1.1.0"
}