Socket
Socket
Sign inDemoInstall

micromatch

Package Overview
Dependencies
94
Maintainers
3
Versions
66
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.4 to 2.1.5

6

index.js

@@ -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 @@ }

21

lib/utils.js

@@ -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"
]
}
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc