chore: update deps
This commit is contained in:
150
node_modules/is-glob/index.js
generated
vendored
150
node_modules/is-glob/index.js
generated
vendored
@ -1,150 +0,0 @@
|
||||
/*!
|
||||
* is-glob <https://github.com/jonschlinkert/is-glob>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
var isExtglob = require('is-extglob');
|
||||
var chars = { '{': '}', '(': ')', '[': ']'};
|
||||
var strictCheck = function(str) {
|
||||
if (str[0] === '!') {
|
||||
return true;
|
||||
}
|
||||
var index = 0;
|
||||
var pipeIndex = -2;
|
||||
var closeSquareIndex = -2;
|
||||
var closeCurlyIndex = -2;
|
||||
var closeParenIndex = -2;
|
||||
var backSlashIndex = -2;
|
||||
while (index < str.length) {
|
||||
if (str[index] === '*') {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') {
|
||||
if (closeSquareIndex < index) {
|
||||
closeSquareIndex = str.indexOf(']', index);
|
||||
}
|
||||
if (closeSquareIndex > index) {
|
||||
if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
|
||||
return true;
|
||||
}
|
||||
backSlashIndex = str.indexOf('\\', index);
|
||||
if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') {
|
||||
closeCurlyIndex = str.indexOf('}', index);
|
||||
if (closeCurlyIndex > index) {
|
||||
backSlashIndex = str.indexOf('\\', index);
|
||||
if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') {
|
||||
closeParenIndex = str.indexOf(')', index);
|
||||
if (closeParenIndex > index) {
|
||||
backSlashIndex = str.indexOf('\\', index);
|
||||
if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') {
|
||||
if (pipeIndex < index) {
|
||||
pipeIndex = str.indexOf('|', index);
|
||||
}
|
||||
if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') {
|
||||
closeParenIndex = str.indexOf(')', pipeIndex);
|
||||
if (closeParenIndex > pipeIndex) {
|
||||
backSlashIndex = str.indexOf('\\', pipeIndex);
|
||||
if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (str[index] === '\\') {
|
||||
var open = str[index + 1];
|
||||
index += 2;
|
||||
var close = chars[open];
|
||||
|
||||
if (close) {
|
||||
var n = str.indexOf(close, index);
|
||||
if (n !== -1) {
|
||||
index = n + 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (str[index] === '!') {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
index++;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
var relaxedCheck = function(str) {
|
||||
if (str[0] === '!') {
|
||||
return true;
|
||||
}
|
||||
var index = 0;
|
||||
while (index < str.length) {
|
||||
if (/[*?{}()[\]]/.test(str[index])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (str[index] === '\\') {
|
||||
var open = str[index + 1];
|
||||
index += 2;
|
||||
var close = chars[open];
|
||||
|
||||
if (close) {
|
||||
var n = str.indexOf(close, index);
|
||||
if (n !== -1) {
|
||||
index = n + 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (str[index] === '!') {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
index++;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
module.exports = function isGlob(str, options) {
|
||||
if (typeof str !== 'string' || str === '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isExtglob(str)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var check = strictCheck;
|
||||
|
||||
// optionally relax check
|
||||
if (options && options.strict === false) {
|
||||
check = relaxedCheck;
|
||||
}
|
||||
|
||||
return check(str);
|
||||
};
|
81
node_modules/is-glob/package.json
generated
vendored
81
node_modules/is-glob/package.json
generated
vendored
@ -1,81 +0,0 @@
|
||||
{
|
||||
"name": "is-glob",
|
||||
"description": "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 better user experience.",
|
||||
"version": "4.0.3",
|
||||
"homepage": "https://github.com/micromatch/is-glob",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"contributors": [
|
||||
"Brian Woodward (https://twitter.com/doowb)",
|
||||
"Daniel Perez (https://tuvistavie.com)",
|
||||
"Jon Schlinkert (http://twitter.com/jonschlinkert)"
|
||||
],
|
||||
"repository": "micromatch/is-glob",
|
||||
"bugs": {
|
||||
"url": "https://github.com/micromatch/is-glob/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha && node benchmark.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-extglob": "^2.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^0.1.10",
|
||||
"mocha": "^3.0.2"
|
||||
},
|
||||
"keywords": [
|
||||
"bash",
|
||||
"braces",
|
||||
"check",
|
||||
"exec",
|
||||
"expression",
|
||||
"extglob",
|
||||
"glob",
|
||||
"globbing",
|
||||
"globstar",
|
||||
"is",
|
||||
"match",
|
||||
"matches",
|
||||
"pattern",
|
||||
"regex",
|
||||
"regular",
|
||||
"string",
|
||||
"test"
|
||||
],
|
||||
"verb": {
|
||||
"layout": "default",
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"assemble",
|
||||
"base",
|
||||
"update",
|
||||
"verb"
|
||||
]
|
||||
},
|
||||
"reflinks": [
|
||||
"assemble",
|
||||
"bach",
|
||||
"base",
|
||||
"composer",
|
||||
"gulp",
|
||||
"has-glob",
|
||||
"is-valid-glob",
|
||||
"micromatch",
|
||||
"npm",
|
||||
"scaffold",
|
||||
"verb",
|
||||
"vinyl"
|
||||
]
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user