micromatch
Advanced tools
Comparing version 2.1.4 to 2.1.5
@@ -224,6 +224,6 @@ /*! | ||
fp = utils.unixify(fp, opts); | ||
patterns = utils.arrayify(patterns); | ||
var len = patterns.length; | ||
fp = utils.unixify(fp, opts); | ||
while (len--) { | ||
@@ -283,2 +283,6 @@ var isMatch = matcher(patterns[len], opts); | ||
} | ||
// strings, all the way down... | ||
pattern = utils.unixify(pattern, opts); | ||
// pattern is a non-glob string | ||
@@ -285,0 +289,0 @@ if (!isGlob(pattern)) { |
@@ -218,2 +218,4 @@ /*! | ||
glob._replace('__UNESC_STAR__', '*'); | ||
glob._replace('%~', '?'); | ||
glob._replace('%%', '*'); | ||
return glob; | ||
@@ -220,0 +222,0 @@ } |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var fileRe = require('filename-regex'); | ||
var win32 = process.platform === 'win32'; | ||
var win32 = process && process.platform === 'win32'; | ||
var win; | ||
@@ -16,11 +16,11 @@ | ||
utils.isPath = function isPath(pattern) { | ||
utils.isPath = function isPath(pattern, opts) { | ||
return function (fp) { | ||
return fp === pattern; | ||
return utils.unixify(fp, opts) === pattern; | ||
}; | ||
}; | ||
utils.hasPath = function hasPath(pattern) { | ||
utils.hasPath = function hasPath(pattern, opts) { | ||
return function (fp) { | ||
return fp.indexOf(pattern) !== -1; | ||
return utils.unixify(fp, opts).indexOf(pattern) !== -1; | ||
}; | ||
@@ -31,4 +31,4 @@ }; | ||
var fn = (opts && opts.contains) | ||
? utils.hasPath(pattern) | ||
: utils.isPath(pattern); | ||
? utils.hasPath(pattern, opts) | ||
: utils.isPath(pattern, opts); | ||
return fn; | ||
@@ -63,8 +63,5 @@ }; | ||
if (opts && opts.unixify === false) return fp; | ||
if (opts && opts.unixify === true) { | ||
win = true; | ||
} else if (opts && opts.cache && typeof win === 'undefined') { | ||
win = win32 || path.sep === '\\'; | ||
if (opts && opts.unixify === true || win32 || path.sep === '\\') { | ||
return fp.split('\\').join('/'); | ||
} | ||
if (win) return fp.replace(/[\\\/]+/g, '/'); | ||
return fp; | ||
@@ -71,0 +68,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.4", | ||
"version": "2.1.5", | ||
"homepage": "https://github.com/jonschlinkert/micromatch", | ||
@@ -86,5 +86,7 @@ "author": { | ||
"deps": { | ||
"ignore": ["browser.js"] | ||
"ignore": [ | ||
"browser.js" | ||
] | ||
} | ||
} | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
41842
988
1