micromatch
Advanced tools
Comparing version 2.2.0 to 2.3.0
56
index.js
@@ -10,8 +10,2 @@ /*! | ||
var diff = require('arr-diff'); | ||
var typeOf = require('kind-of'); | ||
var omit = require('object.omit'); | ||
var unique = require('array-unique'); | ||
var cache = require('regex-cache'); | ||
var isGlob = require('is-glob'); | ||
var expand = require('./lib/expand'); | ||
@@ -53,3 +47,3 @@ var utils = require('./lib/utils'); | ||
} | ||
return diff(keep, omit); | ||
return utils.diff(keep, omit); | ||
} | ||
@@ -71,3 +65,3 @@ | ||
function match(files, pattern, opts) { | ||
if (typeOf(files) !== 'string' && !Array.isArray(files)) { | ||
if (utils.typeOf(files) !== 'string' && !Array.isArray(files)) { | ||
throw new Error(msg('match', 'files', 'a string or array')); | ||
@@ -82,3 +76,3 @@ } | ||
if (typeof pattern === 'string' && opts.nonegate !== true) { | ||
if (typeof pattern === 'string') { | ||
negate = pattern.charAt(0) === '!'; | ||
@@ -88,2 +82,8 @@ if (negate) { | ||
} | ||
// we need to remove the character regardless, | ||
// so the above logic is still needed | ||
if (opts.nonegate === true) { | ||
negate = false; | ||
} | ||
} | ||
@@ -114,3 +114,3 @@ | ||
// if `negate` was defined, diff negated files | ||
if (negate) { res = diff(files, res); } | ||
if (negate) { res = utils.diff(files, res); } | ||
@@ -120,8 +120,8 @@ // if `ignore` was defined, diff ignored filed | ||
pattern = opts.ignore; | ||
opts = omit(opts, ['ignore']); | ||
res = diff(res, micromatch(res, pattern, opts)); | ||
opts = utils.omit(opts, ['ignore']); | ||
res = utils.diff(res, micromatch(res, pattern, opts)); | ||
} | ||
if (opts.nodupes) { | ||
return unique(res); | ||
return utils.unique(res); | ||
} | ||
@@ -194,3 +194,3 @@ return res; | ||
fp = utils.unixify(fp, opts); | ||
if (typeOf(pattern) === 'object') { | ||
if (utils.typeOf(pattern) === 'object') { | ||
return matcher(fp, pattern); | ||
@@ -215,3 +215,3 @@ } | ||
if (opts.contains && !isGlob(pattern)) { | ||
if (opts.contains && !utils.isGlob(pattern)) { | ||
return fp.indexOf(pattern) !== -1; | ||
@@ -260,3 +260,3 @@ } | ||
function matchKeys(obj, glob, options) { | ||
if (typeOf(obj) !== 'object') { | ||
if (utils.typeOf(obj) !== 'object') { | ||
throw new TypeError(msg('matchKeys', 'first argument', 'an object')); | ||
@@ -297,2 +297,6 @@ } | ||
if (typeof pattern !== 'string') { | ||
throw new TypeError(msg('matcher', 'pattern', 'a string, regex, or function')); | ||
} | ||
// strings, all the way down... | ||
@@ -302,3 +306,3 @@ pattern = utils.unixify(pattern, opts); | ||
// pattern is a non-glob string | ||
if (!isGlob(pattern)) { | ||
if (!utils.isGlob(pattern)) { | ||
return utils.matchPath(pattern, opts); | ||
@@ -333,6 +337,2 @@ } | ||
function toRegex(glob, options) { | ||
if (typeOf(glob) !== 'string') { | ||
throw new Error(msg('toRegex', 'glob', 'a string')); | ||
} | ||
// clone options to prevent mutating the original object | ||
@@ -357,5 +357,8 @@ var opts = Object.create(options || {}); | ||
} catch (err) { | ||
var msg = 'micromatch invalid regex: (' + re + ')'; | ||
if (opts.strict) throw new SyntaxError(msg + err); | ||
err.reason = 'micromatch invalid regex: (' + re + ')'; | ||
if (opts.strict) throw new SyntaxError(err); | ||
} | ||
// we're only here if a bad pattern was used and the user | ||
// passed `options.silent`, match nothing | ||
return /$^/; | ||
@@ -388,3 +391,6 @@ } | ||
function makeRe(glob, opts) { | ||
return cache(toRegex, glob, opts); | ||
if (utils.typeOf(glob) !== 'string') { | ||
throw new Error(msg('makeRe', 'glob', 'a string')); | ||
} | ||
return utils.cache(toRegex, glob, opts); | ||
} | ||
@@ -416,3 +422,3 @@ | ||
micromatch.any = any; | ||
micromatch.braces = micromatch.braceExpand = require('braces'); | ||
micromatch.braces = micromatch.braceExpand = utils.braces; | ||
micromatch.contains = contains; | ||
@@ -419,0 +425,0 @@ micromatch.expand = expand; |
'use strict'; | ||
var reverse = function(object, prepender) { | ||
var chars = {}, unesc, temp; | ||
function reverse(object, prepender) { | ||
return Object.keys(object).reduce(function(reversed, key) { | ||
@@ -9,6 +11,4 @@ var newKey = prepender ? prepender + key : key; // Optionally prepend a string to key. | ||
}, {}); | ||
}; | ||
} | ||
var chars = {}; | ||
/** | ||
@@ -51,3 +51,3 @@ * Regex for common characters | ||
chars.UNESC = reverse(chars.ESC, '\\'); | ||
chars.UNESC = unesc || (unesc = reverse(chars.ESC, '\\')); | ||
@@ -67,4 +67,4 @@ chars.ESC_TEMP = { | ||
chars.TEMP = reverse(chars.ESC_TEMP); | ||
chars.TEMP = temp || (temp = reverse(chars.ESC_TEMP)); | ||
module.exports = chars; |
@@ -37,2 +37,7 @@ /*! | ||
if (!utils.isGlob(pattern)) { | ||
glob.pattern = glob.pattern.replace(/([\/.])/g, '\\$1'); | ||
return glob; | ||
} | ||
if (typeof opts.braces !== 'boolean' && typeof opts.nobraces !== 'boolean') { | ||
@@ -42,7 +47,2 @@ opts.braces = true; | ||
// return early if glob pattern matches special patterns | ||
if (specialCase(pattern) && opts.safemode) { | ||
return new RegExp(utils.escapeRe(pattern), 'g'); | ||
} | ||
if (glob.pattern === '.*') { | ||
@@ -56,10 +56,2 @@ return { | ||
if (glob.pattern === '.') { | ||
return { | ||
pattern: '\\.', | ||
tokens: tok, | ||
options: opts | ||
}; | ||
} | ||
if (glob.pattern === '*') { | ||
@@ -108,9 +100,2 @@ return { | ||
// expand brackets, e.g `[[:alpha:]]` | ||
glob.track('before brackets'); | ||
if (tok.is.brackets) { | ||
glob.brackets(); | ||
} | ||
glob.track('after brackets'); | ||
// expand braces, e.g `{1..5}` | ||
@@ -130,6 +115,14 @@ glob.track('before braces'); | ||
// expand brackets, e.g `[[:alpha:]]` | ||
glob.track('before brackets'); | ||
if (tok.is.brackets) { | ||
glob.brackets(); | ||
} | ||
glob.track('after brackets'); | ||
// special patterns | ||
glob._replace('[!', '[^'); | ||
glob._replace('(?', '(%~'); | ||
glob._replace('[]', '\\[\\]'); | ||
glob._replace(/\[\]/, '\\[\\]'); | ||
glob._replace('/[', '/' + (opts.dot ? dotfiles : nodot) + '[', true); | ||
@@ -165,2 +158,3 @@ glob._replace('/?', '/' + (opts.dot ? dotfiles : nodot) + '[^/]', true); | ||
glob.pattern = collapse(glob.pattern, '**/'); | ||
glob._replace('/**/', '(?:/' + globstar(opts.dot) + '/|/)', true); | ||
glob._replace(/\*{2,}/g, '**'); | ||
@@ -222,5 +216,3 @@ | ||
if (glob.pattern.length > 1) { | ||
if (glob.pattern.indexOf('\\/') === 0 && glob.pattern.indexOf('\\/' + nodot) !== 0) { | ||
glob.pattern = '\\/' + nodot + glob.pattern.slice(2); | ||
} else if (/^[\[?*]/.test(glob.pattern)) { | ||
if (/^[\[?*]/.test(glob.pattern)) { | ||
// only prepend the string if we don't want to match dotfiles | ||
@@ -235,14 +227,2 @@ glob.pattern = (opts.dot ? dotfiles : nodot) + glob.pattern; | ||
/** | ||
* Special cases. This is somewhat of a placeholder | ||
* for more advanced logic. | ||
*/ | ||
function specialCase(glob) { | ||
if (glob === '\\') { | ||
return true; | ||
} | ||
return false; | ||
} | ||
/** | ||
* Collapse repeated character sequences. | ||
@@ -249,0 +229,0 @@ * |
'use strict'; | ||
var braces = require('braces'); | ||
var brackets = require('expand-brackets'); | ||
var extglob = require('extglob'); | ||
var parse = require('parse-glob'); | ||
var chars = require('./chars'); | ||
var utils = require('./utils'); | ||
@@ -13,5 +10,6 @@ /** | ||
module.exports = Glob; | ||
function Glob(pattern, options) { | ||
var Glob = module.exports = function Glob(pattern, options) { | ||
if (!(this instanceof Glob)) { | ||
return new Glob(pattern, options); | ||
} | ||
this.options = options || {}; | ||
@@ -22,3 +20,3 @@ this.pattern = pattern; | ||
this.init(pattern); | ||
} | ||
}; | ||
@@ -48,20 +46,4 @@ /** | ||
/** | ||
* Return true if the glob pattern has the given | ||
* `ch`aracter. | ||
* | ||
* @param {String} `pattern` | ||
* @param {String} `ch` | ||
* @return {Boolean} | ||
*/ | ||
Glob.prototype.has = function(pattern, ch) { | ||
if (ch instanceof RegExp) { | ||
return ch.test(pattern); | ||
} | ||
return pattern.indexOf(ch) !== -1; | ||
}; | ||
/** | ||
* Return true if `glob.pattern` was negated | ||
* with `!`. Also removes the `!` from the pattern. | ||
* with `!`, also remove the `!` from the pattern. | ||
* | ||
@@ -72,3 +54,2 @@ * @return {Boolean} | ||
Glob.prototype.isNegated = function() { | ||
if (this.tokens.isNegated) return true; | ||
if (this.pattern.charCodeAt(0) === 33 /* '!' */) { | ||
@@ -100,3 +81,3 @@ this.pattern = this.pattern.slice(1); | ||
// expand brace patterns and join the resulting array | ||
var expanded = braces(this.pattern, this.options); | ||
var expanded = utils.braces(this.pattern, this.options); | ||
this.pattern = expanded.join('|'); | ||
@@ -112,3 +93,3 @@ } | ||
if (this.options.nobrackets !== true) { | ||
this.pattern = brackets(this.pattern); | ||
this.pattern = utils.brackets(this.pattern); | ||
} | ||
@@ -122,4 +103,6 @@ }; | ||
Glob.prototype.extglob = function() { | ||
if (this.options.noextglob !== true) { | ||
this.pattern = extglob(this.pattern, {escape: true}); | ||
if (this.options.noextglob === true) return; | ||
if (utils.isExtglob(this.pattern)) { | ||
this.pattern = utils.extglob(this.pattern, {escape: true}); | ||
} | ||
@@ -129,7 +112,7 @@ }; | ||
/** | ||
* Parse the given glob `pattern` or `glob.pattern` | ||
* Parse the given pattern | ||
*/ | ||
Glob.prototype.parse = function(pattern) { | ||
this.tokens = parse(pattern || this.pattern, true); | ||
this.tokens = utils.parseGlob(pattern || this.pattern, true); | ||
return this.tokens; | ||
@@ -157,3 +140,3 @@ }; | ||
this.pattern = this.pattern.split(a).join(b); | ||
} else if (a instanceof RegExp) { | ||
} else { | ||
this.pattern = this.pattern.replace(a, b); | ||
@@ -160,0 +143,0 @@ } |
@@ -6,10 +6,36 @@ 'use strict'; | ||
var win32 = process && process.platform === 'win32'; | ||
var utils = require('lazy-cache')(require); | ||
/** | ||
* Expose `utils` | ||
* Temporarily re-assign require to trick browserify | ||
* into recognizing lazy-cached deps. | ||
*/ | ||
var utils = module.exports; | ||
var fn = require; | ||
require = utils; | ||
/** | ||
* Lazily required module dependencies | ||
*/ | ||
require('arr-diff', 'diff'); | ||
require('array-unique', 'unique'); | ||
require('braces'); | ||
require('expand-brackets', 'brackets'); | ||
require('extglob'); | ||
require('is-extglob'); | ||
require('is-glob', 'isGlob'); | ||
require('kind-of', 'typeOf'); | ||
require('normalize-path', 'normalize'); | ||
require('object.omit', 'omit'); | ||
require('parse-glob'); | ||
require('regex-cache', 'cache'); | ||
/** | ||
* Get the filename of a filepath | ||
* | ||
* @param {String} `string` | ||
* @return {String} | ||
*/ | ||
utils.filename = function filename(fp) { | ||
@@ -20,14 +46,38 @@ var seg = fp.match(fileRe()); | ||
/** | ||
* Returns a function that returns true if the given | ||
* pattern is the same as a given `filepath` | ||
* | ||
* @param {String} `pattern` | ||
* @return {Function} | ||
*/ | ||
utils.isPath = function isPath(pattern, opts) { | ||
return function (fp) { | ||
return utils.unixify(fp, opts) === pattern; | ||
return pattern === utils.unixify(fp, opts); | ||
}; | ||
}; | ||
/** | ||
* Returns a function that returns true if the given | ||
* pattern contains a `filepath` | ||
* | ||
* @param {String} `pattern` | ||
* @return {Function} | ||
*/ | ||
utils.hasPath = function hasPath(pattern, opts) { | ||
return function (fp) { | ||
return utils.unixify(fp, opts).indexOf(pattern) !== -1; | ||
return utils.unixify(pattern, opts).indexOf(fp) !== -1; | ||
}; | ||
}; | ||
/** | ||
* Returns a function that returns true if the given | ||
* pattern matches or contains a `filepath` | ||
* | ||
* @param {String} `pattern` | ||
* @return {Function} | ||
*/ | ||
utils.matchPath = function matchPath(pattern, opts) { | ||
@@ -40,2 +90,10 @@ var fn = (opts && opts.contains) | ||
/** | ||
* Returns a function that returns true if the given | ||
* regex matches the `filename` of a file path. | ||
* | ||
* @param {RegExp} `re` | ||
* @return {Boolean} | ||
*/ | ||
utils.hasFilename = function hasFilename(re) { | ||
@@ -69,3 +127,3 @@ return function (fp) { | ||
if (opts && opts.unixify === true || win32 || path.sep === '\\') { | ||
return fp.split('\\').join('/'); | ||
return utils.normalize(fp, false); | ||
} | ||
@@ -93,1 +151,13 @@ if (opts && opts.unescape === true) { | ||
}; | ||
/** | ||
* Restore `require` | ||
*/ | ||
require = fn; | ||
/** | ||
* Expose `utils` | ||
*/ | ||
module.exports = utils; |
{ | ||
"name": "micromatch", | ||
"description": "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just use `micromatch.isMatch()` instead of `minimatch()`, or use `micromatch()` instead of `multimatch()`.", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"homepage": "https://github.com/jonschlinkert/micromatch", | ||
@@ -21,16 +21,18 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"scripts": { | ||
"test": "mocha", | ||
"prepublish": "browserify -o browser.js -e index.js" | ||
"test": "mocha" | ||
}, | ||
"dependencies": { | ||
"arr-diff": "^1.0.1", | ||
"arr-diff": "^1.1.0", | ||
"array-unique": "^0.2.1", | ||
"braces": "^1.8.0", | ||
"expand-brackets": "^0.1.1", | ||
"extglob": "^0.3.0", | ||
"braces": "^1.8.1", | ||
"expand-brackets": "^0.1.4", | ||
"extglob": "^0.3.1", | ||
"filename-regex": "^2.0.0", | ||
"is-glob": "^1.1.3", | ||
"kind-of": "^1.1.0", | ||
"object.omit": "^1.1.0", | ||
"parse-glob": "^3.0.1", | ||
"is-extglob": "^1.0.0", | ||
"is-glob": "^2.0.1", | ||
"kind-of": "^2.0.1", | ||
"lazy-cache": "^0.2.3", | ||
"normalize-path": "^2.0.0", | ||
"object.omit": "^2.0.0", | ||
"parse-glob": "^3.0.4", | ||
"regex-cache": "^0.4.2" | ||
@@ -40,10 +42,15 @@ }, | ||
"benchmarked": "^0.1.4", | ||
"browserify": "^9.0.8", | ||
"chalk": "^1.0.0", | ||
"minimatch": "^2.0.4", | ||
"minimist": "^1.1.1", | ||
"mocha": "^2.2.4", | ||
"browserify": "^11.2.0", | ||
"chalk": "^1.1.1", | ||
"gulp": "^3.9.0", | ||
"gulp-istanbul": "^0.10.1", | ||
"gulp-jshint": "^1.11.2", | ||
"gulp-mocha": "^2.1.3", | ||
"jshint-stylish": "^2.0.1", | ||
"minimatch": "^3.0.0", | ||
"minimist": "^1.2.0", | ||
"mocha": "^2.3.3", | ||
"multimatch": "^2.0.0", | ||
"should": "^6.0.1", | ||
"write": "^0.2.0" | ||
"should": "^7.1.0", | ||
"write": "^0.2.1" | ||
}, | ||
@@ -50,0 +57,0 @@ "keywords": [ |
@@ -55,3 +55,3 @@ # micromatch [![NPM version](https://badge.fury.io/js/micromatch.svg)](http://badge.fury.io/js/micromatch) [![Build Status](https://travis-ci.org/jonschlinkert/micromatch.svg)](https://travis-ci.org/jonschlinkert/micromatch) | ||
_(Table of contents generated by [verb](https://github.com/assemble/verb))_ | ||
_(Table of contents generated by [verb](https://github.com/verbose/verb))_ | ||
@@ -62,5 +62,5 @@ <!-- tocstop --> | ||
Micromatch is [10-55x faster](#benchmarks) than [minimatch](https://github.com/isaacs/minimatch#readme), resulting from a combination of caching, tokenization, parsing, runtime compilation and regex optimization strategies. | ||
Micromatch is [10-55x faster](#benchmarks) than [minimatch](https://github.com/isaacs/minimatch), resulting from a combination of caching, tokenization, parsing, runtime compilation and regex optimization strategies. | ||
* [Drop-in replacement](#switch-from-minimatch) for [minimatch](https://github.com/isaacs/minimatch#readme) and [multimatch](https://github.com/sindresorhus/multimatch) | ||
* [Drop-in replacement](#switch-from-minimatch) for [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch) | ||
* Built-in support for multiple glob patterns, like `['foo/*.js', '!bar.js']` | ||
@@ -111,3 +111,3 @@ * Better support for the Bash 4.3 specification, and less buggy | ||
* when the pattern is a string, [minimatch](https://github.com/isaacs/minimatch#readme) behavior is used, so patterns are **inclusive by default**. | ||
* when the pattern is a string, [minimatch](https://github.com/isaacs/minimatch) behavior is used, so patterns are **inclusive by default**. | ||
* when an array of patterns is passed, [multimatch](https://github.com/sindresorhus/multimatch) behavior is used, so patterns are **exclusive by default** | ||
@@ -328,3 +328,3 @@ | ||
Match dotfiles. Same behavior as [minimatch](https://github.com/isaacs/minimatch#readme). | ||
Match dotfiles. Same behavior as [minimatch](https://github.com/isaacs/minimatch). | ||
@@ -372,3 +372,3 @@ Type: `{Boolean}` | ||
Allow glob patterns without slashes to match a file path based on its basename. . Same behavior as [minimatch](https://github.com/isaacs/minimatch#readme). | ||
Allow glob patterns without slashes to match a file path based on its basename. . Same behavior as [minimatch](https://github.com/isaacs/minimatch). | ||
@@ -391,3 +391,3 @@ Type: `{Boolean}` | ||
Don't expand braces in glob patterns. Same behavior as [minimatch](https://github.com/isaacs/minimatch#readme) `nobrace`. | ||
Don't expand braces in glob patterns. Same behavior as [minimatch](https://github.com/isaacs/minimatch) `nobrace`. | ||
@@ -422,3 +422,3 @@ Type: `{Boolean}` | ||
Use a case-insensitive regex for matching files. Same behavior as [minimatch](https://github.com/isaacs/minimatch#readme). | ||
Use a case-insensitive regex for matching files. Same behavior as [minimatch](https://github.com/isaacs/minimatch). | ||
@@ -431,3 +431,3 @@ Type: `{Boolean}` | ||
If `true`, when no matches are found the actual (array-ified) glob pattern is returned instead of an empty array. Same behavior as [minimatch](https://github.com/isaacs/minimatch#readme). | ||
If `true`, when no matches are found the actual (array-ified) glob pattern is returned instead of an empty array. Same behavior as [minimatch](https://github.com/isaacs/minimatch). | ||
@@ -527,56 +527,56 @@ Type: `{Boolean}` | ||
As of July 24, 2015: | ||
As of October 03, 2015: | ||
```bash | ||
#1: basename-braces | ||
micromatch x 28,335 ops/sec ±0.49% (96 runs sampled) | ||
minimatch x 3,496 ops/sec ±0.76% (98 runs sampled) | ||
micromatch x 26,420 ops/sec ±0.89% (91 runs sampled) | ||
minimatch x 3,507 ops/sec ±0.64% (97 runs sampled) | ||
#2: basename | ||
micromatch x 28,602 ops/sec ±0.46% (96 runs sampled) | ||
minimatch x 4,389 ops/sec ±0.38% (98 runs sampled) | ||
micromatch x 25,315 ops/sec ±0.82% (93 runs sampled) | ||
minimatch x 4,398 ops/sec ±0.86% (94 runs sampled) | ||
#3: braces-no-glob | ||
micromatch x 405,445 ops/sec ±0.64% (91 runs sampled) | ||
minimatch x 31,078 ops/sec ±0.45% (95 runs sampled) | ||
micromatch x 341,254 ops/sec ±0.78% (93 runs sampled) | ||
minimatch x 30,197 ops/sec ±1.12% (91 runs sampled) | ||
#4: braces | ||
micromatch x 81,977 ops/sec ±0.36% (99 runs sampled) | ||
minimatch x 2,986 ops/sec ±0.41% (100 runs sampled) | ||
micromatch x 54,649 ops/sec ±0.74% (94 runs sampled) | ||
minimatch x 3,095 ops/sec ±0.82% (95 runs sampled) | ||
#5: immediate | ||
micromatch x 20,753 ops/sec ±0.36% (101 runs sampled) | ||
minimatch x 4,233 ops/sec ±0.34% (100 runs sampled) | ||
micromatch x 16,719 ops/sec ±0.79% (95 runs sampled) | ||
minimatch x 4,348 ops/sec ±0.86% (96 runs sampled) | ||
#6: large | ||
micromatch x 755 ops/sec ±0.53% (97 runs sampled) | ||
minimatch x 17.06 ops/sec ±0.25% (46 runs sampled) | ||
micromatch x 721 ops/sec ±0.77% (94 runs sampled) | ||
minimatch x 17.73 ops/sec ±1.08% (50 runs sampled) | ||
#7: long | ||
micromatch x 7,009 ops/sec ±0.33% (100 runs sampled) | ||
minimatch x 592 ops/sec ±0.39% (96 runs sampled) | ||
micromatch x 5,051 ops/sec ±0.87% (97 runs sampled) | ||
minimatch x 628 ops/sec ±0.83% (94 runs sampled) | ||
#8: mid | ||
micromatch x 60,071 ops/sec ±0.48% (97 runs sampled) | ||
minimatch x 1,853 ops/sec ±0.72% (99 runs sampled) | ||
micromatch x 51,280 ops/sec ±0.80% (95 runs sampled) | ||
minimatch x 1,923 ops/sec ±0.84% (95 runs sampled) | ||
#9: multi-patterns | ||
micromatch x 24,308 ops/sec ±0.67% (98 runs sampled) | ||
minimatch x 2,169 ops/sec ±0.62% (96 runs sampled) | ||
micromatch x 22,440 ops/sec ±0.97% (94 runs sampled) | ||
minimatch x 2,481 ops/sec ±1.10% (94 runs sampled) | ||
#10: no-glob | ||
micromatch x 552,116 ops/sec ±0.35% (96 runs sampled) | ||
minimatch x 55,957 ops/sec ±0.32% (94 runs sampled) | ||
micromatch x 722,823 ops/sec ±1.30% (87 runs sampled) | ||
minimatch x 52,967 ops/sec ±1.09% (94 runs sampled) | ||
#11: range | ||
micromatch x 321,030 ops/sec ±0.62% (95 runs sampled) | ||
minimatch x 14,247 ops/sec ±0.59% (100 runs sampled) | ||
micromatch x 243,471 ops/sec ±0.79% (94 runs sampled) | ||
minimatch x 11,736 ops/sec ±0.82% (96 runs sampled) | ||
#12: shallow | ||
micromatch x 253,455 ops/sec ±0.52% (99 runs sampled) | ||
minimatch x 21,169 ops/sec ±0.54% (97 runs sampled) | ||
micromatch x 190,874 ops/sec ±0.98% (95 runs sampled) | ||
minimatch x 21,699 ops/sec ±0.81% (97 runs sampled) | ||
#13: short | ||
micromatch x 661,874 ops/sec ±0.42% (96 runs sampled) | ||
minimatch x 60,228 ops/sec ±0.45% (97 runs sampled) | ||
micromatch x 496,393 ops/sec ±3.86% (90 runs sampled) | ||
minimatch x 53,765 ops/sec ±0.75% (95 runs sampled) | ||
``` | ||
@@ -594,3 +594,3 @@ | ||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/micromatch/issues/new) | ||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/micromatch/issues/new). | ||
@@ -601,10 +601,10 @@ Please be sure to run the benchmarks before/after any code changes to judge the impact before you do a PR. thanks! | ||
* [braces](https://github.com/jonschlinkert/braces): Fastest brace expansion for node.js, with the most complete… [more](https://github.com/jonschlinkert/braces) | ||
* [extglob](https://github.com/jonschlinkert/extglob): Convert extended globs to regex-compatible strings. Add (almost) the… [more](https://github.com/jonschlinkert/extglob) | ||
* [expand-brackets](https://github.com/jonschlinkert/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | ||
* [expand-range](https://github.com/jonschlinkert/expand-range): Fast, bash-like range expansion. Expand a range of numbers… [more](https://github.com/jonschlinkert/expand-range) | ||
* [fill-range](https://github.com/jonschlinkert/fill-range): Fill in a range of numbers or letters, optionally… [more](https://github.com/jonschlinkert/fill-range) | ||
* [gulp-micromatch](https://github.com/tunnckoCore/gulp-micromatch#readme): micromatch as gulp plugin. Filtering vinyl files with glob… [more](https://github.com/tunnckoCore/gulp-micromatch#readme) | ||
* [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a… [more](https://github.com/jonschlinkert/is-glob) | ||
* [parse-glob](https://github.com/jonschlinkert/parse-glob): Parse a glob pattern into an object of tokens. | ||
* [braces](https://www.npmjs.com/package/braces): Fastest brace expansion for node.js, with the most complete… [more](https://www.npmjs.com/package/braces) | [homepage](https://github.com/jonschlinkert/braces) | ||
* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets) | ||
* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers… [more](https://www.npmjs.com/package/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range) | ||
* [extglob](https://www.npmjs.com/package/extglob): Convert extended globs to regex-compatible strings. Add (almost) the… [more](https://www.npmjs.com/package/extglob) | [homepage](https://github.com/jonschlinkert/extglob) | ||
* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally… [more](https://www.npmjs.com/package/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range) | ||
* [gulp-micromatch](https://www.npmjs.com/package/gulp-micromatch): Filter vinyl files with glob patterns, string, regexp, array,… [more](https://www.npmjs.com/package/gulp-micromatch) | [homepage](https://github.com/tunnckocore/gulp-micromatch) | ||
* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a… [more](https://www.npmjs.com/package/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob) | ||
* [parse-glob](https://www.npmjs.com/package/parse-glob): Parse a glob pattern into an object of tokens. | [homepage](https://github.com/jonschlinkert/parse-glob) | ||
@@ -625,4 +625,4 @@ ## Author | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 24, 2015._ | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 03, 2015._ | ||
<!-- deps:mocha browserify --> | ||
<!-- deps:mocha browserify --> |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
47109
963
14
14
616
2
+ Addedis-extglob@^1.0.0
+ Addedlazy-cache@^0.2.3
+ Addednormalize-path@^2.0.0
+ Addedis-extendable@0.1.1(transitive)
+ Addedkind-of@2.0.1(transitive)
+ Addedlazy-cache@0.2.7(transitive)
+ Addednormalize-path@2.1.1(transitive)
+ Addedobject.omit@2.0.1(transitive)
+ Addedremove-trailing-separator@1.1.0(transitive)
- Removedis-glob@1.1.3(transitive)
- Removedisobject@1.0.2(transitive)
- Removedkind-of@1.1.0(transitive)
- Removedobject.omit@1.1.0(transitive)
Updatedarr-diff@^1.1.0
Updatedbraces@^1.8.1
Updatedexpand-brackets@^0.1.4
Updatedextglob@^0.3.1
Updatedis-glob@^2.0.1
Updatedkind-of@^2.0.1
Updatedobject.omit@^2.0.0
Updatedparse-glob@^3.0.4