Socket
Socket
Sign inDemoInstall

micromatch

Package Overview
Dependencies
70
Maintainers
3
Versions
68
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.4 to 3.1.5

5

index.js

@@ -741,7 +741,2 @@ 'use strict';

if (pattern.slice(0, 2) === './') {
pattern = pattern.slice(2);
}
pattern = utils.combineDuplicates(pattern, '\\*\\*\\/|\\/\\*\\*');
var ast = snapdragon.parse(pattern, options);

@@ -748,0 +743,0 @@ utils.define(ast, 'snapdragon', snapdragon);

15

lib/utils.js

@@ -123,18 +123,15 @@ 'use strict';

/**
* Combines duplicate characters in the provided string.
* @param {String} `str`
* @returns {String}
* Returns true if the given `str` has special characters
*/
utils.combineDuplicates = function(str, val) {
var re = new RegExp('(' + val + ')(?=(?:' + val + ')*\\1)', 'g');
return str.replace(re, '');
utils.hasSpecialChars = function(str) {
return /(?:(?:(^|\/)[!.])|[*?+()|\[\]{}]|[+@]\()/.test(str);
};
/**
* Returns true if the given `str` has special characters
* Escape regex characters in the given string
*/
utils.hasSpecialChars = function(str) {
return /(?:(?:(^|\/)[!.])|[*?+()|\[\]{}]|[+@]\()/.test(str);
utils.escapeRegex = function(str) {
return str.replace(/[-[\]{}()^$|*+?.\\\/\s]/g, '\\$&');
};

@@ -141,0 +138,0 @@

2

package.json
{
"name": "micromatch",
"description": "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.",
"version": "3.1.4",
"version": "3.1.5",
"homepage": "https://github.com/micromatch/micromatch",

@@ -6,0 +6,0 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

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