mirror of
https://github.com/cachix/install-nix-action.git
synced 2025-06-08 09:54:28 +00:00
v6
This commit is contained in:
parent
cd5893b2c6
commit
70742d22d9
6774 changed files with 1602535 additions and 1 deletions
21
node_modules/split-string/LICENSE
generated
vendored
Normal file
21
node_modules/split-string/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015-2017, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
321
node_modules/split-string/README.md
generated
vendored
Normal file
321
node_modules/split-string/README.md
generated
vendored
Normal file
|
@ -0,0 +1,321 @@
|
|||
# split-string [](https://www.npmjs.com/package/split-string) [](https://npmjs.org/package/split-string) [](https://npmjs.org/package/split-string) [](https://travis-ci.org/jonschlinkert/split-string)
|
||||
|
||||
> Split a string on a character except when the character is escaped.
|
||||
|
||||
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save split-string
|
||||
```
|
||||
|
||||
<!-- section: Why use this? -->
|
||||
|
||||
<details>
|
||||
<summary><strong>Why use this?</strong></summary>
|
||||
|
||||
<br>
|
||||
|
||||
Although it's easy to split on a string:
|
||||
|
||||
```js
|
||||
console.log('a.b.c'.split('.'));
|
||||
//=> ['a', 'b', 'c']
|
||||
```
|
||||
|
||||
It's more challenging to split a string whilst respecting escaped or quoted characters.
|
||||
|
||||
**Bad**
|
||||
|
||||
```js
|
||||
console.log('a\\.b.c'.split('.'));
|
||||
//=> ['a\\', 'b', 'c']
|
||||
|
||||
console.log('"a.b.c".d'.split('.'));
|
||||
//=> ['"a', 'b', 'c"', 'd']
|
||||
```
|
||||
|
||||
**Good**
|
||||
|
||||
```js
|
||||
var split = require('split-string');
|
||||
console.log(split('a\\.b.c'));
|
||||
//=> ['a.b', 'c']
|
||||
|
||||
console.log(split('"a.b.c".d'));
|
||||
//=> ['a.b.c', 'd']
|
||||
```
|
||||
|
||||
See the [options](#options) to learn how to choose the separator or retain quotes or escaping.
|
||||
|
||||
<br>
|
||||
|
||||
</details>
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var split = require('split-string');
|
||||
|
||||
split('a.b.c');
|
||||
//=> ['a', 'b', 'c']
|
||||
|
||||
// respects escaped characters
|
||||
split('a.b.c\\.d');
|
||||
//=> ['a', 'b', 'c.d']
|
||||
|
||||
// respects double-quoted strings
|
||||
split('a."b.c.d".e');
|
||||
//=> ['a', 'b.c.d', 'e']
|
||||
```
|
||||
|
||||
**Brackets**
|
||||
|
||||
Also respects brackets [unless disabled](#optionsbrackets):
|
||||
|
||||
```js
|
||||
split('a (b c d) e', ' ');
|
||||
//=> ['a', '(b c d)', 'e']
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### options.brackets
|
||||
|
||||
**Type**: `object|boolean`
|
||||
|
||||
**Default**: `undefined`
|
||||
|
||||
**Description**
|
||||
|
||||
If enabled, split-string will not split inside brackets. The following brackets types are supported when `options.brackets` is `true`,
|
||||
|
||||
```js
|
||||
{
|
||||
'<': '>',
|
||||
'(': ')',
|
||||
'[': ']',
|
||||
'{': '}'
|
||||
}
|
||||
```
|
||||
|
||||
Or, if object of brackets must be passed, each property on the object must be a bracket type, where the property key is the opening delimiter and property value is the closing delimiter.
|
||||
|
||||
**Examples**
|
||||
|
||||
```js
|
||||
// no bracket support by default
|
||||
split('a.{b.c}');
|
||||
//=> [ 'a', '{b', 'c}' ]
|
||||
|
||||
// support all basic bracket types: "<>{}[]()"
|
||||
split('a.{b.c}', {brackets: true});
|
||||
//=> [ 'a', '{b.c}' ]
|
||||
|
||||
// also supports nested brackets
|
||||
split('a.{b.{c.d}.e}.f', {brackets: true});
|
||||
//=> [ 'a', '{b.{c.d}.e}', 'f' ]
|
||||
|
||||
// support only the specified brackets
|
||||
split('[a.b].(c.d)', {brackets: {'[': ']'}});
|
||||
//=> [ '[a.b]', '(c', 'd)' ]
|
||||
```
|
||||
|
||||
### options.sep
|
||||
|
||||
**Type**: `string`
|
||||
|
||||
**Default**: `.`
|
||||
|
||||
The separator/character to split on.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
split('a.b,c', {sep: ','});
|
||||
//=> ['a.b', 'c']
|
||||
|
||||
// you can also pass the separator as string as the last argument
|
||||
split('a.b,c', ',');
|
||||
//=> ['a.b', 'c']
|
||||
```
|
||||
|
||||
### options.keepEscaping
|
||||
|
||||
**Type**: `boolean`
|
||||
|
||||
**Default**: `undefined`
|
||||
|
||||
Keep backslashes in the result.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
split('a.b\\.c');
|
||||
//=> ['a', 'b.c']
|
||||
|
||||
split('a.b.\\c', {keepEscaping: true});
|
||||
//=> ['a', 'b\.c']
|
||||
```
|
||||
|
||||
### options.keepQuotes
|
||||
|
||||
**Type**: `boolean`
|
||||
|
||||
**Default**: `undefined`
|
||||
|
||||
Keep single- or double-quotes in the result.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
split('a."b.c.d".e');
|
||||
//=> ['a', 'b.c.d', 'e']
|
||||
|
||||
split('a."b.c.d".e', {keepQuotes: true});
|
||||
//=> ['a', '"b.c.d"', 'e']
|
||||
|
||||
split('a.\'b.c.d\'.e', {keepQuotes: true});
|
||||
//=> ['a', '\'b.c.d\'', 'e']
|
||||
```
|
||||
|
||||
### options.keepDoubleQuotes
|
||||
|
||||
**Type**: `boolean`
|
||||
|
||||
**Default**: `undefined`
|
||||
|
||||
Keep double-quotes in the result.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
split('a."b.c.d".e');
|
||||
//=> ['a', 'b.c.d', 'e']
|
||||
|
||||
split('a."b.c.d".e', {keepDoubleQuotes: true});
|
||||
//=> ['a', '"b.c.d"', 'e']
|
||||
```
|
||||
|
||||
### options.keepSingleQuotes
|
||||
|
||||
**Type**: `boolean`
|
||||
|
||||
**Default**: `undefined`
|
||||
|
||||
Keep single-quotes in the result.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
split('a.\'b.c.d\'.e');
|
||||
//=> ['a', 'b.c.d', 'e']
|
||||
|
||||
split('a.\'b.c.d\'.e', {keepSingleQuotes: true});
|
||||
//=> ['a', '\'b.c.d\'', 'e']
|
||||
```
|
||||
|
||||
## Customizer
|
||||
|
||||
**Type**: `function`
|
||||
|
||||
**Default**: `undefined`
|
||||
|
||||
Pass a function as the last argument to customize how tokens are added to the array.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
var arr = split('a.b', function(tok) {
|
||||
if (tok.arr[tok.arr.length - 1] === 'a') {
|
||||
tok.split = false;
|
||||
}
|
||||
});
|
||||
console.log(arr);
|
||||
//=> ['a.b']
|
||||
```
|
||||
|
||||
**Properties**
|
||||
|
||||
The `tok` object has the following properties:
|
||||
|
||||
* `tok.val` (string) The current value about to be pushed onto the result array
|
||||
* `tok.idx` (number) the current index in the string
|
||||
* `tok.str` (string) the entire string
|
||||
* `tok.arr` (array) the result array
|
||||
|
||||
## Release history
|
||||
|
||||
### v3.0.0 - 2017-06-17
|
||||
|
||||
**Added**
|
||||
|
||||
* adds support for brackets
|
||||
|
||||
## 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:
|
||||
|
||||
* [deromanize](https://www.npmjs.com/package/deromanize): Convert roman numerals to arabic numbers (useful for books, outlines, documentation, slide decks, etc) | [homepage](https://github.com/jonschlinkert/deromanize "Convert roman numerals to arabic numbers (useful for books, outlines, documentation, slide decks, etc)")
|
||||
* [randomatic](https://www.npmjs.com/package/randomatic): Generate randomized strings of a specified length using simple character sequences. The original generate-password. | [homepage](https://github.com/jonschlinkert/randomatic "Generate randomized strings of a specified length using simple character sequences. The original generate-password.")
|
||||
* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string "Repeat the given string n times. Fastest implementation for repeating a string.")
|
||||
* [romanize](https://www.npmjs.com/package/romanize): Convert numbers to roman numerals (useful for books, outlines, documentation, slide decks, etc) | [homepage](https://github.com/jonschlinkert/romanize "Convert numbers to roman numerals (useful for books, outlines, documentation, slide decks, etc)")
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| --- | --- |
|
||||
| 28 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 9 | [doowb](https://github.com/doowb) |
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._
|
171
node_modules/split-string/index.js
generated
vendored
Normal file
171
node_modules/split-string/index.js
generated
vendored
Normal file
|
@ -0,0 +1,171 @@
|
|||
/*!
|
||||
* split-string <https://github.com/jonschlinkert/split-string>
|
||||
*
|
||||
* Copyright (c) 2015-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var extend = require('extend-shallow');
|
||||
|
||||
module.exports = function(str, options, fn) {
|
||||
if (typeof str !== 'string') {
|
||||
throw new TypeError('expected a string');
|
||||
}
|
||||
|
||||
if (typeof options === 'function') {
|
||||
fn = options;
|
||||
options = null;
|
||||
}
|
||||
|
||||
// allow separator to be defined as a string
|
||||
if (typeof options === 'string') {
|
||||
options = { sep: options };
|
||||
}
|
||||
|
||||
var opts = extend({sep: '.'}, options);
|
||||
var quotes = opts.quotes || ['"', "'", '`'];
|
||||
var brackets;
|
||||
|
||||
if (opts.brackets === true) {
|
||||
brackets = {
|
||||
'<': '>',
|
||||
'(': ')',
|
||||
'[': ']',
|
||||
'{': '}'
|
||||
};
|
||||
} else if (opts.brackets) {
|
||||
brackets = opts.brackets;
|
||||
}
|
||||
|
||||
var tokens = [];
|
||||
var stack = [];
|
||||
var arr = [''];
|
||||
var sep = opts.sep;
|
||||
var len = str.length;
|
||||
var idx = -1;
|
||||
var closeIdx;
|
||||
|
||||
function expected() {
|
||||
if (brackets && stack.length) {
|
||||
return brackets[stack[stack.length - 1]];
|
||||
}
|
||||
}
|
||||
|
||||
while (++idx < len) {
|
||||
var ch = str[idx];
|
||||
var next = str[idx + 1];
|
||||
var tok = { val: ch, idx: idx, arr: arr, str: str };
|
||||
tokens.push(tok);
|
||||
|
||||
if (ch === '\\') {
|
||||
tok.val = keepEscaping(opts, str, idx) === true ? (ch + next) : next;
|
||||
tok.escaped = true;
|
||||
if (typeof fn === 'function') {
|
||||
fn(tok);
|
||||
}
|
||||
arr[arr.length - 1] += tok.val;
|
||||
idx++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (brackets && brackets[ch]) {
|
||||
stack.push(ch);
|
||||
var e = expected();
|
||||
var i = idx + 1;
|
||||
|
||||
if (str.indexOf(e, i + 1) !== -1) {
|
||||
while (stack.length && i < len) {
|
||||
var s = str[++i];
|
||||
if (s === '\\') {
|
||||
s++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (quotes.indexOf(s) !== -1) {
|
||||
i = getClosingQuote(str, s, i + 1);
|
||||
continue;
|
||||
}
|
||||
|
||||
e = expected();
|
||||
if (stack.length && str.indexOf(e, i + 1) === -1) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (brackets[s]) {
|
||||
stack.push(s);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (e === s) {
|
||||
stack.pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closeIdx = i;
|
||||
if (closeIdx === -1) {
|
||||
arr[arr.length - 1] += ch;
|
||||
continue;
|
||||
}
|
||||
|
||||
ch = str.slice(idx, closeIdx + 1);
|
||||
tok.val = ch;
|
||||
tok.idx = idx = closeIdx;
|
||||
}
|
||||
|
||||
if (quotes.indexOf(ch) !== -1) {
|
||||
closeIdx = getClosingQuote(str, ch, idx + 1);
|
||||
if (closeIdx === -1) {
|
||||
arr[arr.length - 1] += ch;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (keepQuotes(ch, opts) === true) {
|
||||
ch = str.slice(idx, closeIdx + 1);
|
||||
} else {
|
||||
ch = str.slice(idx + 1, closeIdx);
|
||||
}
|
||||
|
||||
tok.val = ch;
|
||||
tok.idx = idx = closeIdx;
|
||||
}
|
||||
|
||||
if (typeof fn === 'function') {
|
||||
fn(tok, tokens);
|
||||
ch = tok.val;
|
||||
idx = tok.idx;
|
||||
}
|
||||
|
||||
if (tok.val === sep && tok.split !== false) {
|
||||
arr.push('');
|
||||
continue;
|
||||
}
|
||||
|
||||
arr[arr.length - 1] += tok.val;
|
||||
}
|
||||
|
||||
return arr;
|
||||
};
|
||||
|
||||
function getClosingQuote(str, ch, i, brackets) {
|
||||
var idx = str.indexOf(ch, i);
|
||||
if (str.charAt(idx - 1) === '\\') {
|
||||
return getClosingQuote(str, ch, idx + 1);
|
||||
}
|
||||
return idx;
|
||||
}
|
||||
|
||||
function keepQuotes(ch, opts) {
|
||||
if (opts.keepDoubleQuotes === true && ch === '"') return true;
|
||||
if (opts.keepSingleQuotes === true && ch === "'") return true;
|
||||
return opts.keepQuotes;
|
||||
}
|
||||
|
||||
function keepEscaping(opts, str, idx) {
|
||||
if (typeof opts.keepEscaping === 'function') {
|
||||
return opts.keepEscaping(str, idx);
|
||||
}
|
||||
return opts.keepEscaping === true || str[idx + 1] === '\\';
|
||||
}
|
21
node_modules/split-string/node_modules/extend-shallow/LICENSE
generated
vendored
Normal file
21
node_modules/split-string/node_modules/extend-shallow/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2015, 2017, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
97
node_modules/split-string/node_modules/extend-shallow/README.md
generated
vendored
Normal file
97
node_modules/split-string/node_modules/extend-shallow/README.md
generated
vendored
Normal file
|
@ -0,0 +1,97 @@
|
|||
# extend-shallow [](https://www.npmjs.com/package/extend-shallow) [](https://npmjs.org/package/extend-shallow) [](https://npmjs.org/package/extend-shallow) [](https://travis-ci.org/jonschlinkert/extend-shallow)
|
||||
|
||||
> Extend an object with the properties of additional objects. node.js/javascript util.
|
||||
|
||||
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save extend-shallow
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var extend = require('extend-shallow');
|
||||
|
||||
extend({a: 'b'}, {c: 'd'})
|
||||
//=> {a: 'b', c: 'd'}
|
||||
```
|
||||
|
||||
Pass an empty object to shallow clone:
|
||||
|
||||
```js
|
||||
var obj = {};
|
||||
extend(obj, {a: 'b'}, {c: 'd'})
|
||||
//=> {a: 'b', c: 'd'}
|
||||
```
|
||||
|
||||
## About
|
||||
|
||||
<details>
|
||||
<summary><strong>Contributing</strong></summary>
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Running Tests</strong></summary>
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Building docs</strong></summary>
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Related projects
|
||||
|
||||
You might also be interested in these projects:
|
||||
|
||||
* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.")
|
||||
* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js")
|
||||
* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.")
|
||||
* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.")
|
||||
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")
|
||||
* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.")
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| --- | --- |
|
||||
| 33 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 1 | [pdehaan](https://github.com/pdehaan) |
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 19, 2017._
|
60
node_modules/split-string/node_modules/extend-shallow/index.js
generated
vendored
Normal file
60
node_modules/split-string/node_modules/extend-shallow/index.js
generated
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
'use strict';
|
||||
|
||||
var isExtendable = require('is-extendable');
|
||||
var assignSymbols = require('assign-symbols');
|
||||
|
||||
module.exports = Object.assign || function(obj/*, objects*/) {
|
||||
if (obj === null || typeof obj === 'undefined') {
|
||||
throw new TypeError('Cannot convert undefined or null to object');
|
||||
}
|
||||
if (!isObject(obj)) {
|
||||
obj = {};
|
||||
}
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var val = arguments[i];
|
||||
if (isString(val)) {
|
||||
val = toObject(val);
|
||||
}
|
||||
if (isObject(val)) {
|
||||
assign(obj, val);
|
||||
assignSymbols(obj, val);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
|
||||
function assign(a, b) {
|
||||
for (var key in b) {
|
||||
if (hasOwn(b, key)) {
|
||||
a[key] = b[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function isString(val) {
|
||||
return (val && typeof val === 'string');
|
||||
}
|
||||
|
||||
function toObject(str) {
|
||||
var obj = {};
|
||||
for (var i in str) {
|
||||
obj[i] = str[i];
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
function isObject(val) {
|
||||
return (val && typeof val === 'object') || isExtendable(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the given `key` is an own property of `obj`.
|
||||
*/
|
||||
|
||||
function hasOwn(obj, key) {
|
||||
return Object.prototype.hasOwnProperty.call(obj, key);
|
||||
}
|
||||
|
||||
function isEnum(obj, key) {
|
||||
return Object.prototype.propertyIsEnumerable.call(obj, key);
|
||||
}
|
83
node_modules/split-string/node_modules/extend-shallow/package.json
generated
vendored
Normal file
83
node_modules/split-string/node_modules/extend-shallow/package.json
generated
vendored
Normal file
|
@ -0,0 +1,83 @@
|
|||
{
|
||||
"name": "extend-shallow",
|
||||
"description": "Extend an object with the properties of additional objects. node.js/javascript util.",
|
||||
"version": "3.0.2",
|
||||
"homepage": "https://github.com/jonschlinkert/extend-shallow",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"contributors": [
|
||||
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
|
||||
"Peter deHaan (http://about.me/peterdehaan)"
|
||||
],
|
||||
"repository": "jonschlinkert/extend-shallow",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/extend-shallow/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"assign-symbols": "^1.0.0",
|
||||
"is-extendable": "^1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"array-slice": "^1.0.0",
|
||||
"benchmarked": "^2.0.0",
|
||||
"for-own": "^1.0.0",
|
||||
"gulp-format-md": "^1.0.0",
|
||||
"is-plain-object": "^2.0.4",
|
||||
"kind-of": "^6.0.1",
|
||||
"minimist": "^1.2.0",
|
||||
"mocha": "^3.5.3",
|
||||
"object-assign": "^4.1.1"
|
||||
},
|
||||
"keywords": [
|
||||
"assign",
|
||||
"clone",
|
||||
"extend",
|
||||
"merge",
|
||||
"obj",
|
||||
"object",
|
||||
"object-assign",
|
||||
"object.assign",
|
||||
"prop",
|
||||
"properties",
|
||||
"property",
|
||||
"props",
|
||||
"shallow",
|
||||
"util",
|
||||
"utility",
|
||||
"utils",
|
||||
"value"
|
||||
],
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"extend-shallow",
|
||||
"for-in",
|
||||
"for-own",
|
||||
"is-plain-object",
|
||||
"isobject",
|
||||
"kind-of"
|
||||
]
|
||||
},
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
21
node_modules/split-string/node_modules/is-extendable/LICENSE
generated
vendored
Normal file
21
node_modules/split-string/node_modules/is-extendable/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015-2017, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
88
node_modules/split-string/node_modules/is-extendable/README.md
generated
vendored
Normal file
88
node_modules/split-string/node_modules/is-extendable/README.md
generated
vendored
Normal file
|
@ -0,0 +1,88 @@
|
|||
# is-extendable [](https://www.npmjs.com/package/is-extendable) [](https://npmjs.org/package/is-extendable) [](https://npmjs.org/package/is-extendable) [](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._
|
5
node_modules/split-string/node_modules/is-extendable/index.d.ts
generated
vendored
Normal file
5
node_modules/split-string/node_modules/is-extendable/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
export = isExtendable;
|
||||
|
||||
declare function isExtendable(val: any): boolean;
|
||||
|
||||
declare namespace isExtendable {}
|
14
node_modules/split-string/node_modules/is-extendable/index.js
generated
vendored
Normal file
14
node_modules/split-string/node_modules/is-extendable/index.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/*!
|
||||
* 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);
|
||||
};
|
67
node_modules/split-string/node_modules/is-extendable/package.json
generated
vendored
Normal file
67
node_modules/split-string/node_modules/is-extendable/package.json
generated
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"name": "is-extendable",
|
||||
"description": "Returns true if a value is a plain object, array or function.",
|
||||
"version": "1.0.1",
|
||||
"homepage": "https://github.com/jonschlinkert/is-extendable",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"repository": "jonschlinkert/is-extendable",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/is-extendable/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-plain-object": "^2.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^1.0.0",
|
||||
"mocha": "^3.4.2"
|
||||
},
|
||||
"keywords": [
|
||||
"array",
|
||||
"assign",
|
||||
"check",
|
||||
"date",
|
||||
"extend",
|
||||
"extendable",
|
||||
"extensible",
|
||||
"function",
|
||||
"is",
|
||||
"object",
|
||||
"regex",
|
||||
"test"
|
||||
],
|
||||
"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
|
||||
}
|
||||
}
|
||||
}
|
65
node_modules/split-string/package.json
generated
vendored
Normal file
65
node_modules/split-string/package.json
generated
vendored
Normal file
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
"name": "split-string",
|
||||
"description": "Split a string on a character except when the character is escaped.",
|
||||
"version": "3.1.0",
|
||||
"homepage": "https://github.com/jonschlinkert/split-string",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"contributors": [
|
||||
"Brian Woodward (https://twitter.com/doowb)",
|
||||
"Jon Schlinkert (http://twitter.com/jonschlinkert)"
|
||||
],
|
||||
"repository": "jonschlinkert/split-string",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/split-string/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"extend-shallow": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^1.0.0",
|
||||
"mocha": "^3.5.3"
|
||||
},
|
||||
"keywords": [
|
||||
"character",
|
||||
"escape",
|
||||
"split",
|
||||
"string"
|
||||
],
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"titles": [
|
||||
".",
|
||||
"install",
|
||||
"Why use this?"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"deromanize",
|
||||
"randomatic",
|
||||
"repeat-string",
|
||||
"romanize"
|
||||
]
|
||||
},
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue