micromatch
Advanced tools
Comparing version 2.1.3 to 2.1.4
@@ -147,2 +147,3 @@ /*! | ||
fp = utils.unixify(fp, opts); | ||
while (i < len) { | ||
@@ -182,2 +183,3 @@ var fn = matcher(patterns[i++], opts); | ||
fp = utils.unixify(fp, opts); | ||
if (typeOf(pattern) === 'object') { | ||
@@ -201,2 +203,4 @@ return matcher(fp, pattern); | ||
opts.contains = (pattern !== ''); | ||
fp = utils.unixify(fp, opts); | ||
if (opts.contains && !isGlob(pattern)) { | ||
@@ -223,2 +227,3 @@ return fp.indexOf(pattern) !== -1; | ||
fp = utils.unixify(fp, opts); | ||
patterns = utils.arrayify(patterns); | ||
@@ -294,2 +299,3 @@ var len = patterns.length; | ||
return function(fp) { | ||
fp = utils.unixify(fp, opts); | ||
return re.test(fp); | ||
@@ -296,0 +302,0 @@ }; |
@@ -59,2 +59,3 @@ 'use strict'; | ||
utils.unixify = function unixify(fp, opts) { | ||
if (opts && opts.unixify === false) return fp; | ||
if (opts && opts.unixify === true) { | ||
@@ -65,5 +66,3 @@ win = true; | ||
} | ||
if (win) { | ||
return fp.replace(/[\\\/]+/g, '/'); | ||
} | ||
if (win) return fp.replace(/[\\\/]+/g, '/'); | ||
return fp; | ||
@@ -70,0 +69,0 @@ }; |
{ | ||
"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.1.3", | ||
"version": "2.1.4", | ||
"homepage": "https://github.com/jonschlinkert/micromatch", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -30,3 +30,2 @@ # 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) | ||
## Install with [npm](npmjs.org) | ||
@@ -38,3 +37,2 @@ | ||
## Usage | ||
@@ -407,56 +405,57 @@ | ||
As of March 26, 2015: | ||
As of March 27, 2015: | ||
```bash | ||
#1: basename-braces.js | ||
micromatch.js x 25,776 ops/sec ±0.68% (98 runs sampled) | ||
minimatch.js x 3,335 ops/sec ±1.09% (98 runs sampled) | ||
#1: basename-braces | ||
micromatch x 27,734 ops/sec ±0.75% (93 runs sampled) | ||
minimatch x 3,409 ops/sec ±0.77% (97 runs sampled) | ||
#2: basename.js | ||
micromatch.js x 24,676 ops/sec ±0.56% (95 runs sampled) | ||
minimatch.js x 4,908 ops/sec ±0.95% (97 runs sampled) | ||
#2: basename | ||
micromatch x 26,727 ops/sec ±0.81% (97 runs sampled) | ||
minimatch x 4,122 ops/sec ±0.77% (97 runs sampled) | ||
#3: braces-no-glob.js | ||
micromatch.js x 473,492 ops/sec ±0.64% (96 runs sampled) | ||
minimatch.js x 27,705 ops/sec ±1.78% (91 runs sampled) | ||
#3: braces-no-glob | ||
micromatch x 324,367 ops/sec ±0.62% (95 runs sampled) | ||
minimatch x 29,682 ops/sec ±0.71% (94 runs sampled) | ||
#4: braces.js | ||
micromatch.js x 42,522 ops/sec ±0.63% (97 runs sampled) | ||
minimatch.js x 3,995 ops/sec ±1.36% (95 runs sampled) | ||
#4: braces | ||
micromatch x 63,430 ops/sec ±1.14% (95 runs sampled) | ||
minimatch x 2,749 ops/sec ±0.77% (97 runs sampled) | ||
#5: immediate.js | ||
micromatch.js x 24,048 ops/sec ±0.72% (95 runs sampled) | ||
minimatch.js x 4,786 ops/sec ±1.40% (95 runs sampled) | ||
#5: immediate | ||
micromatch x 21,842 ops/sec ±0.66% (98 runs sampled) | ||
minimatch x 3,638 ops/sec ±0.66% (97 runs sampled) | ||
#6: large.js | ||
micromatch.js x 773 ops/sec ±0.62% (98 runs sampled) | ||
minimatch.js x 27.52 ops/sec ±0.66% (49 runs sampled) | ||
#6: large | ||
micromatch x 802 ops/sec ±0.58% (96 runs sampled) | ||
minimatch x 15.72 ops/sec ±1.25% (42 runs sampled) | ||
#7: long.js | ||
micromatch.js x 7,388 ops/sec ±0.64% (99 runs sampled) | ||
minimatch.js x 608 ops/sec ±0.95% (95 runs sampled) | ||
#7: long | ||
micromatch x 8,061 ops/sec ±0.69% (96 runs sampled) | ||
minimatch x 560 ops/sec ±0.71% (90 runs sampled) | ||
#8: mid.js | ||
micromatch.js x 41,193 ops/sec ±0.74% (99 runs sampled) | ||
minimatch.js x 2,724 ops/sec ±1.09% (97 runs sampled) | ||
#8: mid | ||
micromatch x 67,972 ops/sec ±0.78% (93 runs sampled) | ||
minimatch x 1,745 ops/sec ±0.87% (96 runs sampled) | ||
#9: multi-patterns.js | ||
micromatch.js x 12,909 ops/sec ±0.71% (93 runs sampled) | ||
minimatch.js x 2,798 ops/sec ±1.45% (95 runs sampled) | ||
#9: multi-patterns | ||
micromatch x 25,136 ops/sec ±0.87% (95 runs sampled) | ||
minimatch x 1,986 ops/sec ±1.03% (95 runs sampled) | ||
#10: no-glob.js | ||
micromatch.js x 430,787 ops/sec ±0.66% (98 runs sampled) | ||
minimatch.js x 47,222 ops/sec ±2.19% (86 runs sampled) | ||
#10: no-glob | ||
micromatch x 1,062,274 ops/sec ±0.90% (94 runs sampled) | ||
minimatch x 53,150 ops/sec ±0.85% (96 runs sampled) | ||
#11: range.js | ||
micromatch.js x 474,561 ops/sec ±0.69% (97 runs sampled) | ||
minimatch.js x 10,819 ops/sec ±2.20% (88 runs sampled) | ||
#11: range | ||
micromatch x 270,918 ops/sec ±0.75% (97 runs sampled) | ||
minimatch x 13,548 ops/sec ±0.85% (96 runs sampled) | ||
#12: shallow.js | ||
micromatch.js x 239,098 ops/sec ±0.67% (96 runs sampled) | ||
minimatch.js x 27,782 ops/sec ±2.12% (92 runs sampled) | ||
#12: shallow | ||
micromatch x 198,022 ops/sec ±0.80% (97 runs sampled) | ||
minimatch x 20,093 ops/sec ±0.62% (95 runs sampled) | ||
#13: short.js | ||
micromatch.js x 707,905 ops/sec ±0.97% (97 runs sampled) | ||
minimatch.js x 52,171 ops/sec ±2.45% (84 runs sampled) | ||
#13: short | ||
micromatch x 440,230 ops/sec ±0.84% (97 runs sampled) | ||
minimatch x 58,116 ops/sec ±0.74% (92 runs sampled) | ||
``` | ||
@@ -496,3 +495,3 @@ | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 26, 2015._ | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 27, 2015._ | ||
@@ -499,0 +498,0 @@ [switch]: #switch-from-minimatch |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41714
987
505