Initial commit
This commit is contained in:
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.
|
||||
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.
|
||||
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);
|
||||
}
|
||||
54
node_modules/split-string/node_modules/extend-shallow/package.json
generated
vendored
Normal file
54
node_modules/split-string/node_modules/extend-shallow/package.json
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"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)",
|
||||
"repository": "jonschlinkert/extend-shallow",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"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.
|
||||
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);
|
||||
};
|
||||
47
node_modules/split-string/node_modules/is-extendable/package.json
generated
vendored
Normal file
47
node_modules/split-string/node_modules/is-extendable/package.json
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"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",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-plain-object": "^2.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^1.0.0",
|
||||
"mocha": "^3.4.2"
|
||||
},
|
||||
"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
|
||||
}
|
||||
}
|
||||
}
|
||||
49
node_modules/split-string/package.json
generated
vendored
Normal file
49
node_modules/split-string/package.json
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"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)",
|
||||
"repository": "jonschlinkert/split-string",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"extend-shallow": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^1.0.0",
|
||||
"mocha": "^3.5.3"
|
||||
},
|
||||
"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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user