Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

minimatch

Package Overview
Dependencies
Maintainers
1
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minimatch - npm Package Compare versions

Comparing version
3.0.0
to
3.0.2
+15
-3
minimatch.js

@@ -238,3 +238,3 @@ module.exports = minimatch

if (typeof pattern === 'undefined') {
throw new Error('undefined pattern')
throw new TypeError('undefined pattern')
}

@@ -265,2 +265,6 @@

function parse (pattern, isSub) {
if (pattern.length > 1024 * 64) {
throw new TypeError('pattern is too long')
}
var options = this.options

@@ -523,3 +527,3 @@

// maybe some even number of \, then maybe 1 \, followed by a |
tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) {
tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
if (!$2) {

@@ -621,3 +625,11 @@ // the | isn't already escaped, so escape it.

var flags = options.nocase ? 'i' : ''
var regExp = new RegExp('^' + re + '$', flags)
try {
var regExp = new RegExp('^' + re + '$', flags)
} catch (er) {
// If it was an invalid regular expression, then it can't match
// anything. This trick looks for a character after the end of
// the string, which is of course impossible, except in multi-line
// mode, but it's not a /m regex.
return new RegExp('$.')
}

@@ -624,0 +636,0 @@ regExp._glob = pattern

+2
-2

@@ -5,3 +5,3 @@ {

"description": "a glob matcher in javascript",
"version": "3.0.0",
"version": "3.0.2",
"repository": {

@@ -24,3 +24,3 @@ "type": "git",

"standard": "^3.7.2",
"tap": "^1.2.0"
"tap": "^5.6.0"
},

@@ -27,0 +27,0 @@ "license": "ISC",

@@ -5,3 +5,3 @@ # minimatch

[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)
[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.svg)](http://travis-ci.org/isaacs/minimatch)

@@ -41,3 +41,3 @@

Create a minimatch object by instanting the `minimatch.Minimatch` class.
Create a minimatch object by instantiating the `minimatch.Minimatch` class.

@@ -87,9 +87,2 @@ ```javascript

## Functions
The top-level exported function has a `cache` property, which is an LRU
cache set to store 100 items. So, calling these methods repeatedly
with the same pattern and options will use the same Minimatch object,
saving the cost of parsing it multiple times.
### minimatch(path, pattern, options)

@@ -96,0 +89,0 @@