Install yarn

This commit is contained in:
Jay Trees 2022-04-08 12:55:35 +02:00
parent 0453e84836
commit 1fde8a81be
1927 changed files with 82144 additions and 83317 deletions

10
node_modules/plugin-error/LICENSE generated vendored
View file

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2015 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other contributors
Copyright (c) 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
@ -9,13 +9,13 @@ 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 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.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

91
node_modules/plugin-error/README.md generated vendored
View file

@ -1,20 +1,39 @@
<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](https://badge.fury.io/js/plugin-error.svg)](http://badge.fury.io/js/plugin-error) [![Build Status](https://travis-ci.org/jonschlinkert/plugin-error.svg)](https://travis-ci.org/jonschlinkert/plugin-error)
# plugin-error
> Error handling for vinyl plugins. Just an abstraction of what's in gulp-util with minor changes.
[![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]
Install with [npm](https://www.npmjs.com/)
Error handling for Vinyl plugins.
```sh
$ npm i plugin-error --save
```
## Usage
```js
var PluginError = require('plugin-error');
```
### new PluginError(pluginName, message[, options]);
**Params**
* `pluginName` should be the module name of your plugin
* `message` **{String|Object}**: may be a string or an existing error object
* `options` **{Object}**
**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.
**Examples**
All of the following are acceptable forms of instantiation:
```javascript
var err = new PluginError('test', {
message: 'something broke'
});
@ -26,44 +45,44 @@ var err = new PluginError({
var err = new PluginError('test', 'something broke');
var err = new PluginError('test', 'something broke', { showStack: true });
var err = new PluginError('test', 'something broke', {showStack: true});
var existingError = new Error('OMG');
var err = new PluginError('test', existingError, { showStack: true });
var err = new PluginError('test', existingError, {showStack: true});
```
## API
## Related projects
### `new PluginError(pluginName, message[, options])`
* [assemble](http://assemble.io): Static site generator for Grunt.js, Yeoman and Node.js. Used by Zurb Foundation, Zurb Ink, H5BP/Effeckt,… [more](http://assemble.io)
* [gulp-util](https://github.com/wearefractal/gulp-util#readme): Utility functions for gulp plugins
* [gulp](http://gulpjs.com): The streaming build system
* [generate](https://github.com/generate/generate): Project generator, for node.js.
* [verb](https://github.com/assemble/verb): Documentation generator for GitHub projects. Extremely powerful, easy to use, can generate anything from API… [more](https://github.com/assemble/verb)
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
## Running tests
**Behavior:**
Install dev dependencies:
* 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.
```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/plugin-error/issues/new)
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
MIT
Copyright © 2015 Jon Schlinkert
Released under the MIT license.
[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
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 31, 2015._

114
node_modules/plugin-error/index.d.ts generated vendored
View file

@ -1,114 +0,0 @@
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;

69
node_modules/plugin-error/index.js generated vendored
View file

@ -1,9 +1,22 @@
/*!
* plugin-error <https://github.com/jonschlinkert/plugin-error>
*
* Copyright (c) 2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
var util = require('util');
var colors = require('ansi-colors');
var red = require('ansi-red');
var cyan = require('ansi-cyan');
var extend = require('extend-shallow');
var differ = require('arr-diff');
var union = require('arr-union');
/**
* Based on gulp-util PluginError (MIT Licensed)
* See: https://github.com/wearefractal/gulp-util
*/
var nonEnum = ['message', 'name', 'stack'];
var ignored = union(nonEnum, ['__safety', '_stack', 'plugin', 'showProperties', 'showStack']);
var props = ['fileName', 'lineNumber', 'message', 'name', 'plugin', 'showProperties', 'showStack', 'stack'];
@ -17,7 +30,7 @@ function PluginError(plugin, message, options) {
var opts = setDefaults(plugin, message, options);
var self = this;
// If opts has an error, get details from it
// if opts has an error, get details from it
if (typeof opts.error === 'object') {
var keys = union(Object.keys(opts.error), nonEnum);
@ -27,17 +40,13 @@ function PluginError(plugin, message, options) {
});
}
// Opts object can override
// opts object can override
props.forEach(function(prop) {
if (prop in opts) {
this[prop] = opts[prop];
}
if (prop in opts) this[prop] = opts[prop];
}, this);
// Defaults
if (!this.name) {
this.name = 'Error';
}
// defaults
if (!this.name) this.name = 'Error';
if (!this.stack) {
/**
@ -57,12 +66,8 @@ function PluginError(plugin, message, options) {
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');
}
if (!this.plugin) throw new Error('Missing plugin name');
if (!this.message) throw new Error('Missing error message');
}
util.inherits(PluginError, Error);
@ -74,9 +79,7 @@ util.inherits(PluginError, Error);
PluginError.prototype._messageWithDetails = function() {
var msg = 'Message:\n ' + this.message;
var details = this._messageDetails();
if (details !== '') {
msg += '\n' + details;
}
if (details !== '') msg += '\n' + details;
return msg;
};
@ -85,19 +88,14 @@ PluginError.prototype._messageWithDetails = function() {
*/
PluginError.prototype._messageDetails = function() {
if (!this.showProperties) {
return '';
}
if (!this.showProperties) return '';
var props = differ(Object.keys(this), ignored);
var len = props.length;
if (len === 0) {
return '';
}
if (len === 0) return '';
var res = '';
var i = 0;
var res = '', i = 0;
while (len--) {
var prop = props[i++];
res += ' ';
@ -111,14 +109,14 @@ PluginError.prototype._messageDetails = function() {
* Override the `toString` method
*/
PluginError.prototype.toString = function() {
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 there is no wrapped error, use the stack captured in the PluginError ctor
if (this.__safety) {
msg = this.__safety.stack;
@ -130,17 +128,17 @@ PluginError.prototype.toString = function() {
msg = detailsWithStack(this.stack);
}
return message(msg, this);
}
}
msg = this._messageWithDetails();
return message(msg, this);
};
// Format the output message
// format the output message
function message(msg, thisArg) {
var sig = colors.red(thisArg.name);
var sig = red(thisArg.name);
sig += ' in plugin ';
sig += '"' + colors.cyan(thisArg.plugin) + '"';
sig += '"' + cyan(thisArg.plugin) + '"';
sig += '\n';
sig += msg;
return sig;
@ -177,10 +175,7 @@ function setDefaults(plugin, message, opts) {
*/
function defaults(opts) {
return extend({
showStack: false,
showProperties: true,
}, opts);
return extend({showStack: false, showProperties: true}, opts);
}
/**

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.

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._

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,52 @@
{
"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": "1.1.0",
"homepage": "https://github.com/jonschlinkert/arr-diff",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"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": {
"arr-flatten": "^1.0.1",
"array-slice": "^0.2.3"
},
"devDependencies": {
"array-differ": "^1.0.0",
"benchmarked": "^0.1.4",
"chalk": "^1.1.1",
"mocha": "^2.2.5",
"should": "^7.0.4"
},
"keywords": [
"arr",
"array",
"diff",
"differ",
"difference"
],
"verb": {
"related": {
"list": [
"arr-flatten",
"array-filter",
"array-intersection"
]
}
}
}

View file

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2014-2017, Jon Schlinkert.
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

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,53 @@
{
"name": "arr-union",
"description": "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.",
"version": "2.1.0",
"homepage": "https://github.com/jonschlinkert/arr-union",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"repository": {
"type": "git",
"url": "git://github.com/jonschlinkert/arr-union.git"
},
"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": {
"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"
},
"keywords": [
"add",
"append",
"array",
"arrays",
"combine",
"concat",
"extend",
"union",
"uniq",
"unique",
"util",
"utility",
"utils"
]
}

View file

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2015-2017, Jon Schlinkert.
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
@ -18,4 +18,4 @@ 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.
THE SOFTWARE.

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._

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,43 @@
{
"name": "array-slice",
"description": "Array-slice method. Slices `array` from the `start` index up to, but not including, the `end` index.",
"version": "0.2.3",
"homepage": "https://github.com/jonschlinkert/array-slice",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"repository": {
"type": "git",
"url": "git://github.com/jonschlinkert/array-slice.git"
},
"bugs": {
"url": "https://github.com/jonschlinkert/array-slice/issues"
},
"license": {
"type": "MIT",
"url": "https://github.com/jonschlinkert/array-slice/blob/master/LICENSE"
},
"files": [
"index.js"
],
"main": "index.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha"
},
"devDependencies": {
"mocha": "*",
"should": "^5.2.0"
},
"keywords": [
"array",
"javascript",
"js",
"slice",
"util",
"utils"
]
}

View file

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2014-2015, 2017, Jon Schlinkert.
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

View file

@ -1,15 +1,19 @@
# extend-shallow [![NPM version](https://img.shields.io/npm/v/extend-shallow.svg?style=flat)](https://www.npmjs.com/package/extend-shallow) [![NPM monthly downloads](https://img.shields.io/npm/dm/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![NPM total downloads](https://img.shields.io/npm/dt/extend-shallow.svg?style=flat)](https://npmjs.org/package/extend-shallow) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/extend-shallow.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/extend-shallow)
# 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.
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/):
Install with [npm](https://www.npmjs.com/)
```sh
$ npm install --save extend-shallow
$ npm i extend-shallow --save
```
## Running tests
Install dev dependencies:
```sh
$ npm i -d && npm test
```
## Usage
@ -29,69 +33,27 @@ extend(obj, {a: 'b'}, {c: 'd'})
//=> {a: 'b', c: 'd'}
```
## About
## Related
<details>
<summary><strong>Contributing</strong></summary>
* [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.
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
## Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
### License
## License
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).
Copyright © 2015 Jon Schlinkert
Released under the MIT license.
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 21, 2015._

View file

@ -1,60 +1,36 @@
'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);
}
var typeOf = require('kind-of');
/**
* Returns true if the given `key` is an own property of `obj`.
* Expose `extend`
*/
function hasOwn(obj, key) {
return Object.prototype.hasOwnProperty.call(obj, key);
}
module.exports = extend;
function isEnum(obj, key) {
return Object.prototype.propertyIsEnumerable.call(obj, key);
}
/**
* 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

@ -1,81 +1,52 @@
{
"_args": [
[
"extend-shallow@3.0.2",
"F:\\laragon\\www\\wishthis"
]
],
"_from": "extend-shallow@3.0.2",
"_id": "extend-shallow@3.0.2",
"_inBundle": false,
"_integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
"_location": "/plugin-error/extend-shallow",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "extend-shallow@3.0.2",
"name": "extend-shallow",
"escapedName": "extend-shallow",
"rawSpec": "3.0.2",
"saveSpec": null,
"fetchSpec": "3.0.2"
},
"_requiredBy": [
"/plugin-error"
],
"_resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
"_spec": "3.0.2",
"_where": "F:\\laragon\\www\\wishthis",
"name": "extend-shallow",
"description": "Extend an object with the properties of additional objects. node.js/javascript util.",
"version": "1.1.4",
"homepage": "https://github.com/jonschlinkert/extend-shallow",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"repository": {
"type": "git",
"url": "git://github.com/jonschlinkert/extend-shallow.git"
},
"bugs": {
"url": "https://github.com/jonschlinkert/extend-shallow/issues"
},
"contributors": [
{
"name": "Jon Schlinkert",
"url": "http://twitter.com/jonschlinkert"
},
{
"name": "Peter deHaan",
"url": "http://about.me/peterdehaan"
}
],
"dependencies": {
"assign-symbols": "^1.0.0",
"is-extendable": "^1.0.1"
},
"description": "Extend an object with the properties of additional objects. node.js/javascript util.",
"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"
},
"engines": {
"node": ">=0.10.0"
},
"license": "MIT",
"files": [
"index.js"
],
"homepage": "https://github.com/jonschlinkert/extend-shallow",
"main": "index.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha"
},
"dependencies": {
"kind-of": "^1.1.0"
},
"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"
},
"keywords": [
"assign",
"clone",
"extend",
"javascript",
"js",
"keys",
"merge",
"obj",
"object",
"object-assign",
"object.assign",
"prop",
"properties",
"property",
@ -85,39 +56,5 @@
"utility",
"utils",
"value"
],
"license": "MIT",
"main": "index.js",
"name": "extend-shallow",
"repository": {
"type": "git",
"url": "git+https://github.com/jonschlinkert/extend-shallow.git"
},
"scripts": {
"test": "mocha"
},
"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
}
},
"version": "3.0.2"
]
}

View file

@ -1,88 +0,0 @@
# is-extendable [![NPM version](https://img.shields.io/npm/v/is-extendable.svg?style=flat)](https://www.npmjs.com/package/is-extendable) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![NPM total downloads](https://img.shields.io/npm/dt/is-extendable.svg?style=flat)](https://npmjs.org/package/is-extendable) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-extendable.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-extendable)
> Returns true if a value is a plain object, array or function.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save is-extendable
```
## Usage
```js
var isExtendable = require('is-extendable');
```
Returns true if the value is any of the following:
* array
* plain object
* function
## Notes
All objects in JavaScript can have keys, but it's a pain to check for this, since we ether need to verify that the value is not `null` or `undefined` and:
* the value is not a primitive, or
* that the object is a plain object, function or array
Also note that an `extendable` object is not the same as an [extensible object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible), which is one that (in es6) is not sealed, frozen, or marked as non-extensible using `preventExtensions`.
## Release history
### v1.0.0 - 2017/07/20
**Breaking changes**
* No longer considers date, regex or error objects to be extendable
## About
### Related projects
* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.")
* [is-equal-shallow](https://www.npmjs.com/package/is-equal-shallow): Does a shallow comparison of two objects, returning false if the keys or values differ. | [homepage](https://github.com/jonschlinkert/is-equal-shallow "Does a shallow comparison of two objects, returning false if the keys or values differ.")
* [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.")
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### 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.6.0, on July 20, 2017._

View file

@ -1,5 +0,0 @@
export = isExtendable;
declare function isExtendable(val: any): boolean;
declare namespace isExtendable {}

View file

@ -1,14 +0,0 @@
/*!
* is-extendable <https://github.com/jonschlinkert/is-extendable>
*
* Copyright (c) 2015-2017, Jon Schlinkert.
* Released under the MIT License.
*/
'use strict';
var isPlainObject = require('is-plain-object');
module.exports = function isExtendable(val) {
return isPlainObject(val) || typeof val === 'function' || Array.isArray(val);
};

View file

@ -1,101 +0,0 @@
{
"_args": [
[
"is-extendable@1.0.1",
"F:\\laragon\\www\\wishthis"
]
],
"_from": "is-extendable@1.0.1",
"_id": "is-extendable@1.0.1",
"_inBundle": false,
"_integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
"_location": "/plugin-error/is-extendable",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "is-extendable@1.0.1",
"name": "is-extendable",
"escapedName": "is-extendable",
"rawSpec": "1.0.1",
"saveSpec": null,
"fetchSpec": "1.0.1"
},
"_requiredBy": [
"/plugin-error/extend-shallow"
],
"_resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
"_spec": "1.0.1",
"_where": "F:\\laragon\\www\\wishthis",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/is-extendable/issues"
},
"dependencies": {
"is-plain-object": "^2.0.4"
},
"description": "Returns true if a value is a plain object, array or function.",
"devDependencies": {
"gulp-format-md": "^1.0.0",
"mocha": "^3.4.2"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js",
"index.d.ts"
],
"homepage": "https://github.com/jonschlinkert/is-extendable",
"keywords": [
"array",
"assign",
"check",
"date",
"extend",
"extendable",
"extensible",
"function",
"is",
"object",
"regex",
"test"
],
"license": "MIT",
"main": "index.js",
"name": "is-extendable",
"repository": {
"type": "git",
"url": "git+https://github.com/jonschlinkert/is-extendable.git"
},
"scripts": {
"test": "mocha"
},
"types": "index.d.ts",
"verb": {
"related": {
"list": [
"assign-deep",
"is-equal-shallow",
"is-plain-object",
"isobject",
"kind-of"
]
},
"toc": false,
"layout": "default",
"tasks": [
"readme"
],
"plugins": [
"gulp-format-md"
],
"lint": {
"reflinks": true
}
},
"version": "1.0.1"
}

View file

@ -1,104 +0,0 @@
# is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object)
> Returns true if an object was created by the `Object` constructor.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save is-plain-object
```
Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null.
## Usage
```js
var isPlainObject = require('is-plain-object');
```
**true** when created by the `Object` constructor.
```js
isPlainObject(Object.create({}));
//=> true
isPlainObject(Object.create(Object.prototype));
//=> true
isPlainObject({foo: 'bar'});
//=> true
isPlainObject({});
//=> true
```
**false** when not created by the `Object` constructor.
```js
isPlainObject(1);
//=> false
isPlainObject(['foo', 'bar']);
//=> false
isPlainObject([]);
//=> false
isPlainObject(new Foo);
//=> false
isPlainObject(null);
//=> false
isPlainObject(Object.create(null));
//=> false
```
## About
### Related projects
* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.")
* [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.")
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 17 | [jonschlinkert](https://github.com/jonschlinkert) |
| 6 | [stevenvachon](https://github.com/stevenvachon) |
| 3 | [onokumus](https://github.com/onokumus) |
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
### 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.6.0, on July 11, 2017._

View file

@ -1,5 +0,0 @@
export = isPlainObject;
declare function isPlainObject(o: any): boolean;
declare namespace isPlainObject {}

View file

@ -1,37 +0,0 @@
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
'use strict';
var isObject = require('isobject');
function isObjectObject(o) {
return isObject(o) === true
&& Object.prototype.toString.call(o) === '[object Object]';
}
module.exports = function isPlainObject(o) {
var ctor,prot;
if (isObjectObject(o) === false) return false;
// If has modified constructor
ctor = o.constructor;
if (typeof ctor !== 'function') return false;
// If has modified prototype
prot = ctor.prototype;
if (isObjectObject(prot) === false) return false;
// If constructor does not have an Object-specific method
if (prot.hasOwnProperty('isPrototypeOf') === false) {
return false;
}
// Most likely a plain Object
return true;
};

View file

@ -1,124 +0,0 @@
{
"_args": [
[
"is-plain-object@2.0.4",
"F:\\laragon\\www\\wishthis"
]
],
"_from": "is-plain-object@2.0.4",
"_id": "is-plain-object@2.0.4",
"_inBundle": false,
"_integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
"_location": "/plugin-error/is-plain-object",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "is-plain-object@2.0.4",
"name": "is-plain-object",
"escapedName": "is-plain-object",
"rawSpec": "2.0.4",
"saveSpec": null,
"fetchSpec": "2.0.4"
},
"_requiredBy": [
"/plugin-error/is-extendable"
],
"_resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
"_spec": "2.0.4",
"_where": "F:\\laragon\\www\\wishthis",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/is-plain-object/issues"
},
"contributors": [
{
"name": "Jon Schlinkert",
"url": "http://twitter.com/jonschlinkert"
},
{
"name": "Osman Nuri Okumuş",
"url": "http://onokumus.com"
},
{
"name": "Steven Vachon",
"url": "https://svachon.com"
},
{
"url": "https://github.com/wtgtybhertgeghgtwtg"
}
],
"dependencies": {
"isobject": "^3.0.1"
},
"description": "Returns true if an object was created by the `Object` constructor.",
"devDependencies": {
"browserify": "^14.4.0",
"chai": "^4.0.2",
"gulp-format-md": "^1.0.0",
"mocha": "^3.4.2",
"mocha-phantomjs": "^4.1.0",
"phantomjs": "^2.1.7",
"uglify-js": "^3.0.24"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.d.ts",
"index.js"
],
"homepage": "https://github.com/jonschlinkert/is-plain-object",
"keywords": [
"check",
"is",
"is-object",
"isobject",
"javascript",
"kind",
"kind-of",
"object",
"plain",
"type",
"typeof",
"value"
],
"license": "MIT",
"main": "index.js",
"name": "is-plain-object",
"repository": {
"type": "git",
"url": "git+https://github.com/jonschlinkert/is-plain-object.git"
},
"scripts": {
"browserify": "browserify index.js --standalone isPlainObject | uglifyjs --compress --mangle -o browser/is-plain-object.js",
"test": "npm run test_node && npm run browserify && npm run test_browser",
"test_browser": "mocha-phantomjs test/browser.html",
"test_node": "mocha"
},
"types": "index.d.ts",
"verb": {
"toc": false,
"layout": "default",
"tasks": [
"readme"
],
"plugins": [
"gulp-format-md"
],
"related": {
"list": [
"is-number",
"isobject",
"kind-of"
]
},
"lint": {
"reflinks": true
}
},
"version": "2.0.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,59 @@
{
"name": "kind-of",
"description": "Get the native type of a value.",
"version": "1.1.0",
"homepage": "https://github.com/jonschlinkert/kind-of",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"repository": {
"type": "git",
"url": "git://github.com/jonschlinkert/kind-of.git"
},
"bugs": {
"url": "https://github.com/jonschlinkert/kind-of/issues"
},
"license": {
"type": "MIT",
"url": "https://github.com/jonschlinkert/kind-of/blob/master/LICENSE"
},
"files": ["index.js"],
"main": "index.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha"
},
"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"
},
"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"
]
}

View file

@ -1,104 +1,43 @@
{
"_args": [
[
"plugin-error@1.0.1",
"F:\\laragon\\www\\wishthis"
]
],
"_from": "plugin-error@1.0.1",
"_id": "plugin-error@1.0.1",
"_inBundle": false,
"_integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==",
"_location": "/plugin-error",
"_phantomChildren": {
"assign-symbols": "1.0.0",
"isobject": "3.0.1"
},
"_requested": {
"type": "version",
"registry": true,
"raw": "plugin-error@1.0.1",
"name": "plugin-error",
"escapedName": "plugin-error",
"rawSpec": "1.0.1",
"saveSpec": null,
"fetchSpec": "1.0.1"
},
"_requiredBy": [
"/gulp-autoprefixer",
"/gulp-clean-css",
"/gulp-git",
"/gulp-json-editor",
"/gulp-less",
"/gulp-rtlcss"
],
"_resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz",
"_spec": "1.0.1",
"_where": "F:\\laragon\\www\\wishthis",
"author": {
"name": "Gulp Team",
"email": "team@gulpjs.com",
"url": "http://gulpjs.com/"
},
"bugs": {
"url": "https://github.com/gulpjs/plugin-error/issues"
},
"contributors": [
{
"name": "Jon Schlinkert",
"email": "jon.schlinkert@sellside.com"
},
{
"name": "Blaine Bublitz",
"email": "blaine.bublitz@gmail.com"
}
],
"dependencies": {
"ansi-colors": "^1.0.1",
"arr-diff": "^4.0.0",
"arr-union": "^3.1.0",
"extend-shallow": "^3.0.2"
},
"description": "Error handling for Vinyl plugins.",
"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"
},
"engines": {
"node": ">= 0.10"
},
"files": [
"LICENSE",
"index.d.ts",
"index.js"
],
"homepage": "https://github.com/gulpjs/plugin-error#readme",
"keywords": [
"error",
"plugin",
"gulp-util"
],
"license": "MIT",
"main": "index.js",
"name": "plugin-error",
"description": "Error handling for vinyl plugins. Just an abstraction of what's in gulp-util with minor changes.",
"version": "0.1.2",
"homepage": "https://github.com/jonschlinkert/plugin-error",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gulpjs/plugin-error.git"
"url": "git://github.com/jonschlinkert/plugin-error.git"
},
"bugs": {
"url": "https://github.com/jonschlinkert/plugin-error/issues"
},
"license": "MIT",
"files": [
"index.js"
],
"main": "index.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"cover": "istanbul cover _mocha --report lcovonly",
"coveralls": "npm run cover && istanbul-coveralls",
"lint": "eslint . && jscs index.js test/",
"pretest": "npm run lint",
"test": "mocha --async-only && npm run test-types",
"test-types": "tsc -p test/types"
"test": "mocha"
},
"version": "1.0.1"
"dependencies": {
"ansi-cyan": "^0.1.1",
"ansi-red": "^0.1.1",
"arr-diff": "^1.0.1",
"arr-union": "^2.0.1",
"extend-shallow": "^1.1.2"
},
"devDependencies": {
"mocha": "*",
"should": "*"
},
"keywords": [
"error",
"plugin"
]
}