Galerie und tage

This commit is contained in:
2021-11-23 17:56:26 +01:00
parent ff35366279
commit 5f873bee89
4693 changed files with 149659 additions and 301447 deletions

24
node_modules/expand-range/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,24 @@
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.

145
node_modules/expand-range/README.md generated vendored Normal file
View File

@@ -0,0 +1,145 @@
# expand-range [![NPM version](https://img.shields.io/npm/v/expand-range.svg?style=flat)](https://www.npmjs.com/package/expand-range) [![NPM downloads](https://img.shields.io/npm/dm/expand-range.svg?style=flat)](https://npmjs.org/package/expand-range) [![Build Status](https://img.shields.io/travis/jonschlinkert/expand-range.svg?style=flat)](https://travis-ci.org/jonschlinkert/expand-range)
Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install expand-range --save
```
Wraps [fill-range] to do range expansion using `..` separated strings. See [fill-range] for the full list of options and features.
## Example usage
```js
var expand = require('expand-range');
```
**Params**
```js
expand(start, stop, increment);
```
* `start`: the number or letter to start with
* `end`: the number or letter to end with
* `increment`: optionally pass the increment to use. works for letters or numbers
**Examples**
```js
expand('a..e')
//=> ['a', 'b', 'c', 'd', 'e']
expand('a..e..2')
//=> ['a', 'c', 'e']
expand('A..E..2')
//=> ['A', 'C', 'E']
expand('1..3')
//=> ['1', '2', '3']
expand('0..-5')
//=> [ '0', '-1', '-2', '-3', '-4', '-5' ]
expand('-9..9..3')
//=> [ '-9', '-6', '-3', '0', '3', '6', '9' ])
expand('-1..-10..-2')
//=> [ '-1', '-3', '-5', '-7', '-9' ]
expand('1..10..2')
//=> [ '1', '3', '5', '7', '9' ]
```
### Custom function
Optionally pass a custom function as the second argument:
```js
expand('a..e', function (val, isNumber, pad, i) {
if (!isNumber) {
return String.fromCharCode(val) + i;
}
return val;
});
//=> ['a0', 'b1', 'c2', 'd3', 'e4']
```
## Benchmarks
```sh
# benchmark/fixtures/alpha-lower.js (29 bytes)
brace-expansion x 145,653 ops/sec ±0.89% (87 runs sampled)
expand-range x 453,213 ops/sec ±1.66% (85 runs sampled)
minimatch x 152,193 ops/sec ±1.17% (86 runs sampled)
# benchmark/fixtures/alpha-upper.js (29 bytes)
brace-expansion x 149,975 ops/sec ±1.10% (88 runs sampled)
expand-range x 459,390 ops/sec ±1.27% (84 runs sampled)
minimatch x 155,253 ops/sec ±1.25% (88 runs sampled)
# benchmark/fixtures/padded.js (33 bytes)
brace-expansion x 14,694 ops/sec ±1.37% (85 runs sampled)
expand-range x 169,393 ops/sec ±1.76% (80 runs sampled)
minimatch x 15,052 ops/sec ±1.15% (88 runs sampled)
# benchmark/fixtures/range.js (29 bytes)
brace-expansion x 142,968 ops/sec ±1.35% (86 runs sampled)
expand-range x 465,579 ops/sec ±1.43% (86 runs sampled)
minimatch x 126,872 ops/sec ±1.18% (90 runs sampled)
```
## Related projects
You might also be interested in these projects:
* [braces](https://www.npmjs.com/package/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces… [more](https://www.npmjs.com/package/braces) | [homepage](https://github.com/jonschlinkert/braces)
* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier to… [more](https://www.npmjs.com/package/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range)
* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch)
## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/expand-range/issues/new).
## Building docs
Generate readme and API documentation with [verb](https://github.com/verbose/verb):
```sh
$ npm install verb && npm run docs
```
Or, if [verb](https://github.com/verbose/verb) is installed globally:
```sh
$ verb
```
## Running tests
Install dev dependencies:
```sh
$ npm install -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/expand-range/blob/master/LICENSE).
***
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 05, 2016._

43
node_modules/expand-range/index.js generated vendored Normal file
View File

@@ -0,0 +1,43 @@
/*!
* expand-range <https://github.com/jonschlinkert/expand-range>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT license.
*/
'use strict';
var fill = require('fill-range');
module.exports = function expandRange(str, options, fn) {
if (typeof str !== 'string') {
throw new TypeError('expand-range expects a string.');
}
if (typeof options === 'function') {
fn = options;
options = {};
}
if (typeof options === 'boolean') {
options = {};
options.makeRe = true;
}
// create arguments to pass to fill-range
var opts = options || {};
var args = str.split('..');
var len = args.length;
if (len > 3) { return str; }
// if only one argument, it can't expand so return it
if (len === 1) { return args; }
// if `true`, tell fill-range to regexify the string
if (typeof fn === 'boolean' && fn === true) {
opts.makeRe = true;
}
args.push(opts);
return fill.apply(null, args.concat(fn));
};

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014-2018, 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,317 @@
# fill-range [![NPM version](https://img.shields.io/npm/v/fill-range.svg?style=flat)](https://www.npmjs.com/package/fill-range) [![NPM monthly downloads](https://img.shields.io/npm/dm/fill-range.svg?style=flat)](https://npmjs.org/package/fill-range) [![NPM total downloads](https://img.shields.io/npm/dt/fill-range.svg?style=flat)](https://npmjs.org/package/fill-range) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/fill-range.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/fill-range)
> Fill in a range of numbers or letters, optionally passing an increment or multiplier to use.
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)
- [Usage](#usage)
* [Invalid ranges](#invalid-ranges)
* [Custom function](#custom-function)
* [Special characters](#special-characters)
+ [plus](#plus)
+ [pipe and tilde](#pipe-and-tilde)
+ [angle bracket](#angle-bracket)
+ [question mark](#question-mark)
- [About](#about)
_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save fill-range
```
## Usage
```js
var range = require('fill-range');
range('a', 'e');
//=> ['a', 'b', 'c', 'd', 'e']
```
**Params**
```js
range(start, stop, step, options, fn);
```
* `start`: **{String|Number}** the number or letter to start with
* `end`: **{String|Number}** the number or letter to end with
* `step`: **{String|Number}** optionally pass the step to use. works for letters or numbers.
* `options`: **{Object}**:
- `makeRe`: return a regex-compatible string (still returned as an array for consistency)
- `step`: pass the step on the options as an alternative to passing it as an argument
- `silent`: `true` by default, set to false to throw errors for invalid ranges.
* `fn`: **{Function}** optionally [pass a function](#custom-function) to modify each character
**Examples**
```js
range(1, 3)
//=> ['1', '2', '3']
range('1', '3')
//=> ['1', '2', '3']
range('0', '-5')
//=> [ '0', '-1', '-2', '-3', '-4', '-5' ]
range(-9, 9, 3)
//=> [ '-9', '-6', '-3', '0', '3', '6', '9' ])
range('-1', '-10', '-2')
//=> [ '-1', '-3', '-5', '-7', '-9' ]
range('1', '10', '2')
//=> [ '1', '3', '5', '7', '9' ]
range('a', 'e')
//=> ['a', 'b', 'c', 'd', 'e']
range('a', 'e', 2)
//=> ['a', 'c', 'e']
range('A', 'E', 2)
//=> ['A', 'C', 'E']
```
### Invalid ranges
When an invalid range is passed, `null` is returned.
```js
range('1.1', '2');
//=> null
range('a', '2');
//=> null
range(1, 10, 'foo');
//=> null
```
If you want errors to be throw, pass `silent: false` on the options:
### Custom function
Optionally pass a custom function as the third or fourth argument:
```js
range('a', 'e', function (val, isNumber, pad, i) {
if (!isNumber) {
return String.fromCharCode(val) + i;
}
return val;
});
//=> ['a0', 'b1', 'c2', 'd3', 'e4']
```
### Special characters
A special character may be passed as the third arg instead of a step increment. These characters can be pretty useful for brace expansion, creating file paths, test fixtures and similar use case.
```js
range('a', 'z', SPECIAL_CHARACTER_HERE);
```
**Supported characters**
* `+`: repeat the given string `n` times
* `|`: create a regex-ready string, instead of an array
* `>`: join values to single array element
* `?`: randomize the given pattern using [randomatic]
#### plus
Character: _(`+`)_
Repeat the first argument the number of times passed on the second argument.
**Examples:**
```js
range('a', 3, '+');
//=> ['a', 'a', 'a']
range('abc', 2, '+');
//=> ['abc', 'abc']
```
#### pipe and tilde
Characters: _(`|` and `~`)_
Creates a regex-capable string (either a logical `or` or a character class) from the expanded arguments.
**Examples:**
```js
range('a', 'c', '|');
//=> ['(a|b|c)'
range('a', 'c', '~');
//=> ['[a-c]'
range('a', 'z', '|5');
//=> ['(a|f|k|p|u|z)'
```
**Automatic separator correction**
To avoid this error:
> `Range out of order in character class`
Fill-range detects invalid sequences and uses the correct syntax. For example:
**invalid** (regex)
If you pass these:
```js
range('a', 'z', '~5');
// which would result in this
//=> ['[a-f-k-p-u-z]']
range('10', '20', '~');
// which would result in this
//=> ['[10-20]']
```
**valid** (regex)
fill-range corrects them to this:
```js
range('a', 'z', '~5');
//=> ['(a|f|k|p|u|z)'
range('10', '20', '~');
//=> ['(10-20)'
```
#### angle bracket
Character: _(`>`)_
Joins all values in the returned array to a single value.
**Examples:**
```js
range('a', 'e', '>');
//=> ['abcde']
range('5', '8', '>');
//=> ['5678']
range('2', '20', '2>');
//=> ['2468101214161820']
```
#### question mark
Character: _(`?`)_
Uses [randomatic] to generate randomized alpha, numeric, or alpha-numeric patterns based on the provided arguments.
**Examples:**
_(actual results would obviously be randomized)_
Generate a 5-character, uppercase, alphabetical string:
```js
range('A', 5, '?');
//=> ['NSHAK']
```
Generate a 5-digit random number:
```js
range('0', 5, '?');
//=> ['36583']
```
Generate a 10-character alpha-numeric string:
```js
range('A0', 10, '?');
//=> ['5YJD60VQNN']
```
See the [randomatic] repo for all available options and or to create issues or feature requests related to randomization.
## 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:
* [braces](https://www.npmjs.com/package/braces): Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support… [more](https://github.com/micromatch/braces) | [homepage](https://github.com/micromatch/braces "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.")
* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used… [more](https://github.com/jonschlinkert/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used by [micromatch].")
* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet")
* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.")
### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 111 | [jonschlinkert](https://github.com/jonschlinkert) |
| 2 | [paulmillr](https://github.com/paulmillr) |
| 1 | [edorivai](https://github.com/edorivai) |
| 1 | [realityking](https://github.com/realityking) |
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
### Author
**Jon Schlinkert**
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
* [GitHub Profile](https://github.com/jonschlinkert)
* [Twitter Profile](https://twitter.com/jonschlinkert)
### License
Copyright © 2018, [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 May 08, 2018._

View File

@@ -0,0 +1,408 @@
/*!
* fill-range <https://github.com/jonschlinkert/fill-range>
*
* Copyright (c) 2014-2018, Jon Schlinkert.
* Released under the MIT License.
*/
'use strict';
var isObject = require('isobject');
var isNumber = require('is-number');
var randomize = require('randomatic');
var repeatStr = require('repeat-string');
var repeat = require('repeat-element');
/**
* Expose `fillRange`
*/
module.exports = fillRange;
/**
* Return a range of numbers or letters.
*
* @param {String} `a` Start of the range
* @param {String} `b` End of the range
* @param {String} `step` Increment or decrement to use.
* @param {Function} `fn` Custom function to modify each element in the range.
* @return {Array}
*/
function fillRange(a, b, step, options, fn) {
if (a == null || b == null) {
throw new Error('fill-range expects the first and second args to be strings.');
}
if (typeof step === 'function') {
fn = step; options = {}; step = null;
}
if (typeof options === 'function') {
fn = options; options = {};
}
if (isObject(step)) {
options = step; step = '';
}
var expand, regex = false, sep = '';
var opts = options || {};
if (typeof opts.silent === 'undefined') {
opts.silent = true;
}
step = step || opts.step;
// store a ref to unmodified arg
var origA = a, origB = b;
b = (b.toString() === '-0') ? 0 : b;
if (opts.optimize || opts.makeRe) {
step = step ? (step += '~') : step;
expand = true;
regex = true;
sep = '~';
}
// handle special step characters
if (typeof step === 'string') {
var match = stepRe().exec(step);
if (match) {
var i = match.index;
var m = match[0];
// repeat string
if (m === '+') {
return repeat(a, b);
// randomize a, `b` times
} else if (m === '?') {
return [randomize(a, b)];
// expand right, no regex reduction
} else if (m === '>') {
step = step.substr(0, i) + step.substr(i + 1);
expand = true;
// expand to an array, or if valid create a reduced
// string for a regex logic `or`
} else if (m === '|') {
step = step.substr(0, i) + step.substr(i + 1);
expand = true;
regex = true;
sep = m;
// expand to an array, or if valid create a reduced
// string for a regex range
} else if (m === '~') {
step = step.substr(0, i) + step.substr(i + 1);
expand = true;
regex = true;
sep = m;
}
} else if (!isNumber(step)) {
if (!opts.silent) {
throw new TypeError('fill-range: invalid step.');
}
return null;
}
}
if (/[.&*()[\]^%$#@!]/.test(a) || /[.&*()[\]^%$#@!]/.test(b)) {
if (!opts.silent) {
throw new RangeError('fill-range: invalid range arguments.');
}
return null;
}
// has neither a letter nor number, or has both letters and numbers
// this needs to be after the step logic
if (!noAlphaNum(a) || !noAlphaNum(b) || hasBoth(a) || hasBoth(b)) {
if (!opts.silent) {
throw new RangeError('fill-range: invalid range arguments.');
}
return null;
}
// validate arguments
var isNumA = isNumber(zeros(a));
var isNumB = isNumber(zeros(b));
if ((!isNumA && isNumB) || (isNumA && !isNumB)) {
if (!opts.silent) {
throw new TypeError('fill-range: first range argument is incompatible with second.');
}
return null;
}
// by this point both are the same, so we
// can use A to check going forward.
var isNum = isNumA;
var num = formatStep(step);
// is the range alphabetical? or numeric?
if (isNum) {
// if numeric, coerce to an integer
a = +a; b = +b;
} else {
// otherwise, get the charCode to expand alpha ranges
a = a.charCodeAt(0);
b = b.charCodeAt(0);
}
// is the pattern descending?
var isDescending = a > b;
// don't create a character class if the args are < 0
if (a < 0 || b < 0) {
expand = false;
regex = false;
}
// detect padding
var padding = isPadded(origA, origB);
var res, pad, arr = [];
var ii = 0;
// character classes, ranges and logical `or`
if (regex) {
if (shouldExpand(a, b, num, isNum, padding, opts)) {
// make sure the correct separator is used
if (sep === '|' || sep === '~') {
sep = detectSeparator(a, b, num, isNum, isDescending);
}
return wrap([origA, origB], sep, opts);
}
}
while (isDescending ? (a >= b) : (a <= b)) {
if (padding && isNum) {
pad = padding(a);
}
// custom function
if (typeof fn === 'function') {
res = fn(a, isNum, pad, ii++);
// letters
} else if (!isNum) {
if (regex && isInvalidChar(a)) {
res = null;
} else {
res = String.fromCharCode(a);
}
// numbers
} else {
res = formatPadding(a, pad);
}
// add result to the array, filtering any nulled values
if (res !== null) arr.push(res);
// increment or decrement
if (isDescending) {
a -= num;
} else {
a += num;
}
}
// now that the array is expanded, we need to handle regex
// character classes, ranges or logical `or` that wasn't
// already handled before the loop
if ((regex || expand) && !opts.noexpand) {
// make sure the correct separator is used
if (sep === '|' || sep === '~') {
sep = detectSeparator(a, b, num, isNum, isDescending);
}
if (arr.length === 1 || a < 0 || b < 0) { return arr; }
return wrap(arr, sep, opts);
}
return arr;
}
/**
* Wrap the string with the correct regex
* syntax.
*/
function wrap(arr, sep, opts) {
if (sep === '~') { sep = '-'; }
var str = arr.join(sep);
var pre = opts && opts.regexPrefix;
// regex logical `or`
if (sep === '|') {
str = pre ? pre + str : str;
str = '(' + str + ')';
}
// regex character class
if (sep === '-') {
str = (pre && pre === '^')
? pre + str
: str;
str = '[' + str + ']';
}
return [str];
}
/**
* Check for invalid characters
*/
function isCharClass(a, b, step, isNum, isDescending) {
if (isDescending) { return false; }
if (isNum) { return a <= 9 && b <= 9; }
if (a < b) { return step === 1; }
return false;
}
/**
* Detect the correct separator to use
*/
function shouldExpand(a, b, num, isNum, padding, opts) {
if (isNum && (a > 9 || b > 9)) { return false; }
return !padding && num === 1 && a < b;
}
/**
* Detect the correct separator to use
*/
function detectSeparator(a, b, step, isNum, isDescending) {
var isChar = isCharClass(a, b, step, isNum, isDescending);
if (!isChar) {
return '|';
}
return '~';
}
/**
* Correctly format the step based on type
*/
function formatStep(step) {
return Math.abs(step >> 0) || 1;
}
/**
* Format padding, taking leading `-` into account
*/
function formatPadding(ch, pad) {
var res = pad ? pad + ch : ch;
if (pad && ch.toString().charAt(0) === '-') {
res = '-' + pad + ch.toString().substr(1);
}
return res.toString();
}
/**
* Check for invalid characters
*/
function isInvalidChar(str) {
var ch = toStr(str);
return ch === '\\'
|| ch === '['
|| ch === ']'
|| ch === '^'
|| ch === '('
|| ch === ')'
|| ch === '`';
}
/**
* Convert to a string from a charCode
*/
function toStr(ch) {
return String.fromCharCode(ch);
}
/**
* Step regex
*/
function stepRe() {
return /\?|>|\||\+|\~/g;
}
/**
* Return true if `val` has either a letter
* or a number
*/
function noAlphaNum(val) {
return /[a-z0-9]/i.test(val);
}
/**
* Return true if `val` has both a letter and
* a number (invalid)
*/
function hasBoth(val) {
return /[a-z][0-9]|[0-9][a-z]/i.test(val);
}
/**
* Normalize zeros for checks
*/
function zeros(val) {
if (/^-*0+$/.test(val.toString())) {
return '0';
}
return val;
}
/**
* Return true if `val` has leading zeros,
* or a similar valid pattern.
*/
function hasZeros(val) {
return /[^.]\.|^-*0+[0-9]/.test(val);
}
/**
* If the string is padded, returns a curried function with
* the a cached padding string, or `false` if no padding.
*
* @param {*} `origA` String or number.
* @return {String|Boolean}
*/
function isPadded(origA, origB) {
if (hasZeros(origA) || hasZeros(origB)) {
var alen = length(origA);
var blen = length(origB);
var len = alen >= blen
? alen
: blen;
return function (a) {
return repeatStr('0', len - length(a));
};
}
return false;
}
/**
* Get the string length of `val`
*/
function length(val) {
return val.toString().length;
}

View File

@@ -0,0 +1,78 @@
{
"name": "fill-range",
"description": "Fill in a range of numbers or letters, optionally passing an increment or multiplier to use.",
"version": "2.2.4",
"homepage": "https://github.com/jonschlinkert/fill-range",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"repository": "jonschlinkert/fill-range",
"bugs": {
"url": "https://github.com/jonschlinkert/fill-range/issues"
},
"license": "MIT",
"files": [
"index.js"
],
"main": "index.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha"
},
"dependencies": {
"is-number": "^2.1.0",
"isobject": "^2.0.0",
"randomatic": "^3.0.0",
"repeat-element": "^1.1.2",
"repeat-string": "^1.5.2"
},
"devDependencies": {
"benchmarked": "^0.1.3",
"chalk": "^0.5.1",
"gulp-format-md": "^1.0.0",
"should": "^13.2.1"
},
"keywords": [
"alpha",
"alphabetical",
"bash",
"brace",
"expand",
"expansion",
"fill",
"glob",
"match",
"matches",
"matching",
"number",
"numerical",
"range",
"ranges",
"sh"
],
"verb": {
"toc": true,
"layout": "default",
"tasks": [
"readme"
],
"plugins": [
"gulp-format-md"
],
"related": {
"list": [
"braces",
"expand-range",
"is-glob",
"micromatch"
]
},
"lint": {
"reflinks": true
},
"reflinks": [
"micromatch",
"randomatic"
]
}
}

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,103 @@
# is-number [![NPM version](https://badge.fury.io/js/is-number.svg)](http://badge.fury.io/js/is-number) [![Build Status](https://travis-ci.org/jonschlinkert/is-number.svg)](https://travis-ci.org/jonschlinkert/is-number)
> Returns true if the value is a number. comprehensive tests.
To understand some of the rationale behind the decisions made in this library (and to learn about some oddities of number evaluation in JavaScript), [see this gist](https://gist.github.com/jonschlinkert/e30c70c713da325d0e81).
## Install
Install with [npm](https://www.npmjs.com/)
```sh
$ npm i is-number --save
```
## Usage
```js
var isNumber = require('is-number');
```
### true
See the [tests](./test.js) for more examples.
```js
isNumber(5e3) //=> 'true'
isNumber(0xff) //=> 'true'
isNumber(-1.1) //=> 'true'
isNumber(0) //=> 'true'
isNumber(1) //=> 'true'
isNumber(1.1) //=> 'true'
isNumber(10) //=> 'true'
isNumber(10.10) //=> 'true'
isNumber(100) //=> 'true'
isNumber('-1.1') //=> 'true'
isNumber('0') //=> 'true'
isNumber('012') //=> 'true'
isNumber('0xff') //=> 'true'
isNumber('1') //=> 'true'
isNumber('1.1') //=> 'true'
isNumber('10') //=> 'true'
isNumber('10.10') //=> 'true'
isNumber('100') //=> 'true'
isNumber('5e3') //=> 'true'
isNumber(parseInt('012')) //=> 'true'
isNumber(parseFloat('012')) //=> 'true'
```
### False
See the [tests](./test.js) for more examples.
```js
isNumber('foo') //=> 'false'
isNumber([1]) //=> 'false'
isNumber([]) //=> 'false'
isNumber(function () {}) //=> 'false'
isNumber(Infinity) //=> 'false'
isNumber(NaN) //=> 'false'
isNumber(new Array('abc')) //=> 'false'
isNumber(new Array(2)) //=> 'false'
isNumber(new Buffer('abc')) //=> 'false'
isNumber(null) //=> 'false'
isNumber(undefined) //=> 'false'
isNumber({abc: 'abc'}) //=> 'false'
```
## Other projects
* [even](https://www.npmjs.com/package/even): Get the even numbered items from an array. | [homepage](https://github.com/jonschlinkert/even)
* [is-even](https://www.npmjs.com/package/is-even): Return true if the given number is even. | [homepage](https://github.com/jonschlinkert/is-even)
* [is-odd](https://www.npmjs.com/package/is-odd): Returns true if the given number is odd. | [homepage](https://github.com/jonschlinkert/is-odd)
* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive)
* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of)
* [odd](https://www.npmjs.com/package/odd): Get the odd numbered items from an array. | [homepage](https://github.com/jonschlinkert/odd)
## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-number/issues/new).
## Run 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 © 2015 Jon Schlinkert
Released under the MIT license.
***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 22, 2015._

View File

@@ -0,0 +1,19 @@
/*!
* is-number <https://github.com/jonschlinkert/is-number>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
var typeOf = require('kind-of');
module.exports = function isNumber(num) {
var type = typeOf(num);
if (type !== 'number' && type !== 'string') {
return false;
}
var n = +num;
return (n - n + 1) >= 0 && num !== '';
};

View File

@@ -0,0 +1,59 @@
{
"name": "is-number",
"description": "Returns true if the value is a number. comprehensive tests.",
"version": "2.1.0",
"homepage": "https://github.com/jonschlinkert/is-number",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"repository": "jonschlinkert/is-number",
"bugs": {
"url": "https://github.com/jonschlinkert/is-number/issues"
},
"license": "MIT",
"files": [
"index.js"
],
"main": "index.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha"
},
"dependencies": {
"kind-of": "^3.0.2"
},
"devDependencies": {
"benchmarked": "^0.1.3",
"chalk": "^0.5.1",
"mocha": "*"
},
"keywords": [
"check",
"coerce",
"coercion",
"integer",
"is",
"is number",
"is-number",
"istype",
"kind of",
"math",
"number",
"test",
"type",
"typeof",
"value"
],
"verb": {
"related": {
"list": [
"kind-of",
"is-primitive",
"even",
"odd",
"is-even",
"is-odd"
]
}
}
}

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

View File

@@ -0,0 +1,112 @@
# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat)](https://travis-ci.org/jonschlinkert/isobject)
Returns true if the value is an object and not an array or null.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install isobject --save
```
Use [is-plain-object](https://github.com/jonschlinkert/is-plain-object) if you want only objects that are created by the `Object` constructor.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install isobject
```
Install with [bower](http://bower.io/)
```sh
$ bower install isobject
```
## Usage
```js
var isObject = require('isobject');
```
**True**
All of the following return `true`:
```js
isObject({});
isObject(Object.create({}));
isObject(Object.create(Object.prototype));
isObject(Object.create(null));
isObject({});
isObject(new Foo);
isObject(/foo/);
```
**False**
All of the following return `false`:
```js
isObject();
isObject(function () {});
isObject(1);
isObject([]);
isObject(undefined);
isObject(null);
```
## Related projects
You might also be interested in these projects:
[merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep)
* [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)
* [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)
* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of)
## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/isobject/issues/new).
## Building docs
Generate readme and API documentation with [verb](https://github.com/verbose/verb):
```sh
$ npm install verb && npm run docs
```
Or, if [verb](https://github.com/verbose/verb) is installed globally:
```sh
$ verb
```
## Running tests
Install dev dependencies:
```sh
$ npm install -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/isobject/blob/master/LICENSE).
***
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on April 25, 2016._

View File

@@ -0,0 +1,14 @@
/*!
* isobject <https://github.com/jonschlinkert/isobject>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
var isArray = require('isarray');
module.exports = function isObject(val) {
return val != null && typeof val === 'object' && isArray(val) === false;
};

View File

@@ -0,0 +1,67 @@
{
"name": "isobject",
"description": "Returns true if the value is an object and not an array or null.",
"version": "2.1.0",
"homepage": "https://github.com/jonschlinkert/isobject",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"repository": "jonschlinkert/isobject",
"bugs": {
"url": "https://github.com/jonschlinkert/isobject/issues"
},
"license": "MIT",
"files": [
"index.js"
],
"main": "index.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha"
},
"dependencies": {
"isarray": "1.0.0"
},
"devDependencies": {
"gulp-format-md": "^0.1.9",
"mocha": "^2.4.5"
},
"keywords": [
"check",
"is",
"is-object",
"isobject",
"kind",
"kind-of",
"kindof",
"native",
"object",
"type",
"typeof",
"value"
],
"verb": {
"related": {
"list": [
"merge-deep",
"extend-shallow",
"is-plain-object",
"kind-of"
]
},
"toc": false,
"layout": "default",
"tasks": [
"readme"
],
"plugins": [
"gulp-format-md"
],
"lint": {
"reflinks": true
},
"reflinks": [
"verb"
]
}
}

21
node_modules/expand-range/node_modules/kind-of/LICENSE generated vendored Normal file
View 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.

View File

@@ -0,0 +1,261 @@
# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of)
> Get the native type of a value.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save kind-of
```
## Install
Install with [bower](https://bower.io/)
```sh
$ bower install kind-of --save
```
## Usage
> es5, browser and es6 ready
```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('str');
//=> 'string'
kindOf(new String('str'));
//=> 'string'
kindOf(arguments);
//=> 'arguments'
kindOf({});
//=> 'object'
kindOf(Object.create(null));
//=> 'object'
kindOf(new Test());
//=> 'object'
kindOf(new Date());
//=> 'date'
kindOf([]);
//=> 'array'
kindOf([1, 2, 3]);
//=> 'array'
kindOf(new Array());
//=> 'array'
kindOf(/foo/);
//=> 'regexp'
kindOf(new RegExp('foo'));
//=> 'regexp'
kindOf(function () {});
//=> 'function'
kindOf(function * () {});
//=> 'function'
kindOf(new Function());
//=> 'function'
kindOf(new Map());
//=> 'map'
kindOf(new WeakMap());
//=> 'weakmap'
kindOf(new Set());
//=> 'set'
kindOf(new WeakSet());
//=> 'weakset'
kindOf(Symbol('str'));
//=> 'symbol'
kindOf(new Int8Array());
//=> 'int8array'
kindOf(new Uint8Array());
//=> 'uint8array'
kindOf(new Uint8ClampedArray());
//=> 'uint8clampedarray'
kindOf(new Int16Array());
//=> 'int16array'
kindOf(new Uint16Array());
//=> 'uint16array'
kindOf(new Int32Array());
//=> 'int32array'
kindOf(new Uint32Array());
//=> 'uint32array'
kindOf(new Float32Array());
//=> 'float32array'
kindOf(new Float64Array());
//=> 'float64array'
```
## Benchmarks
Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of).
Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`.
```bash
#1: array
current x 23,329,397 ops/sec ±0.82% (94 runs sampled)
lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled)
lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled)
#2: boolean
current x 27,197,115 ops/sec ±0.85% (94 runs sampled)
lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled)
lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled)
#3: date
current x 20,190,117 ops/sec ±0.86% (92 runs sampled)
lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled)
lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled)
#4: function
current x 23,855,460 ops/sec ±0.60% (97 runs sampled)
lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled)
lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled)
#5: null
current x 27,061,047 ops/sec ±0.97% (96 runs sampled)
lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled)
lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled)
#6: number
current x 25,075,682 ops/sec ±0.53% (99 runs sampled)
lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled)
lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled)
#7: object
current x 3,348,980 ops/sec ±0.49% (99 runs sampled)
lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled)
lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled)
#8: regex
current x 21,284,827 ops/sec ±0.72% (96 runs sampled)
lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled)
lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled)
#9: string
current x 25,379,234 ops/sec ±0.58% (96 runs sampled)
lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled)
lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled)
#10: undef
current x 27,459,221 ops/sec ±1.01% (93 runs sampled)
lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled)
lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled)
```
## Optimizations
In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library:
1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot.
2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it.
3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'`
## About
### Related projects
* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet")
* [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.")
* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ")
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 59 | [jonschlinkert](https://github.com/jonschlinkert) |
| 2 | [miguelmota](https://github.com/miguelmota) |
| 1 | [dtothefp](https://github.com/dtothefp) |
| 1 | [ksheedlo](https://github.com/ksheedlo) |
| 1 | [pdehaan](https://github.com/pdehaan) |
| 1 | [laggingreflex](https://github.com/laggingreflex) |
### 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 May 16, 2017._

116
node_modules/expand-range/node_modules/kind-of/index.js generated vendored Normal file
View File

@@ -0,0 +1,116 @@
var isBuffer = require('is-buffer');
var toString = Object.prototype.toString;
/**
* Get the native `typeof` a value.
*
* @param {*} `val`
* @return {*} Native javascript type
*/
module.exports = function kindOf(val) {
// primitivies
if (typeof val === 'undefined') {
return 'undefined';
}
if (val === null) {
return 'null';
}
if (val === true || val === false || val instanceof Boolean) {
return 'boolean';
}
if (typeof val === 'string' || val instanceof String) {
return 'string';
}
if (typeof val === 'number' || val instanceof Number) {
return 'number';
}
// functions
if (typeof val === 'function' || val instanceof Function) {
return 'function';
}
// array
if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) {
return 'array';
}
// check for instances of RegExp and Date before calling `toString`
if (val instanceof RegExp) {
return 'regexp';
}
if (val instanceof Date) {
return 'date';
}
// other objects
var type = toString.call(val);
if (type === '[object RegExp]') {
return 'regexp';
}
if (type === '[object Date]') {
return 'date';
}
if (type === '[object Arguments]') {
return 'arguments';
}
if (type === '[object Error]') {
return 'error';
}
// buffer
if (isBuffer(val)) {
return 'buffer';
}
// es6: Map, WeakMap, Set, WeakSet
if (type === '[object Set]') {
return 'set';
}
if (type === '[object WeakSet]') {
return 'weakset';
}
if (type === '[object Map]') {
return 'map';
}
if (type === '[object WeakMap]') {
return 'weakmap';
}
if (type === '[object Symbol]') {
return 'symbol';
}
// typed arrays
if (type === '[object Int8Array]') {
return 'int8array';
}
if (type === '[object Uint8Array]') {
return 'uint8array';
}
if (type === '[object Uint8ClampedArray]') {
return 'uint8clampedarray';
}
if (type === '[object Int16Array]') {
return 'int16array';
}
if (type === '[object Uint16Array]') {
return 'uint16array';
}
if (type === '[object Int32Array]') {
return 'int32array';
}
if (type === '[object Uint32Array]') {
return 'uint32array';
}
if (type === '[object Float32Array]') {
return 'float32array';
}
if (type === '[object Float64Array]') {
return 'float64array';
}
// must be a plain object
return 'object';
};

View File

@@ -0,0 +1,90 @@
{
"name": "kind-of",
"description": "Get the native type of a value.",
"version": "3.2.2",
"homepage": "https://github.com/jonschlinkert/kind-of",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"contributors": [
"David Fox-Powell (https://dtothefp.github.io/me)",
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
"Ken Sheedlo (kensheedlo.com)",
"laggingreflex (https://github.com/laggingreflex)",
"Miguel Mota (https://miguelmota.com)",
"Peter deHaan (http://about.me/peterdehaan)"
],
"repository": "jonschlinkert/kind-of",
"bugs": {
"url": "https://github.com/jonschlinkert/kind-of/issues"
},
"license": "MIT",
"files": [
"index.js"
],
"main": "index.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha",
"prepublish": "browserify -o browser.js -e index.js -s index --bare"
},
"dependencies": {
"is-buffer": "^1.1.5"
},
"devDependencies": {
"ansi-bold": "^0.1.1",
"benchmarked": "^1.0.0",
"browserify": "^14.3.0",
"glob": "^7.1.1",
"gulp-format-md": "^0.1.12",
"mocha": "^3.3.0",
"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",
"of",
"regexp",
"string",
"test",
"type",
"type-of",
"typeof",
"types"
],
"verb": {
"related": {
"list": [
"is-glob",
"is-number",
"is-primitive"
]
},
"toc": false,
"layout": "default",
"tasks": [
"readme"
],
"plugins": [
"gulp-format-md"
],
"lint": {
"reflinks": true
},
"reflinks": [
"verb"
]
}
}

73
node_modules/expand-range/package.json generated vendored Normal file
View File

@@ -0,0 +1,73 @@
{
"name": "expand-range",
"description": "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch.",
"version": "1.8.2",
"homepage": "https://github.com/jonschlinkert/expand-range",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"repository": "jonschlinkert/expand-range",
"bugs": {
"url": "https://github.com/jonschlinkert/expand-range/issues"
},
"license": "MIT",
"files": [
"index.js"
],
"main": "index.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha"
},
"dependencies": {
"fill-range": "^2.1.0"
},
"devDependencies": {
"benchmarked": "^0.2.4",
"brace-expansion": "^1.1.4",
"glob": "^7.0.3",
"gulp-format-md": "^0.1.9",
"minimatch": "^3.0.0",
"mocha": "^2.4.5"
},
"keywords": [
"alpha",
"alphabetical",
"bash",
"brace",
"expand",
"expansion",
"glob",
"match",
"matches",
"matching",
"number",
"numerical",
"range",
"ranges",
"sh"
],
"verb": {
"plugins": [
"gulp-format-md"
],
"reflinks": [
"verb"
],
"toc": false,
"layout": "default",
"lint": {
"reflinks": true
},
"tasks": [
"readme"
],
"related": {
"list": [
"micromatch",
"fill-range",
"braces"
]
}
}
}