Socket
Socket
Sign inDemoInstall

micromatch

Package Overview
Dependencies
5
Maintainers
4
Versions
66
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.3 to 4.0.4

8

index.js

@@ -184,3 +184,3 @@ 'use strict';

* @param {Object} `options` See available [options](#options) for changing how matches are performed
* @return {Boolean} Returns true if the patter matches any part of `str`.
* @return {Boolean} Returns true if any of the patterns matches any part of `str`.
* @api public

@@ -256,3 +256,3 @@ */

* @param {Object} `options` See available [options](#options) for changing how matches are performed
* @return {Boolean} Returns true if any patterns match `str`
* @return {Boolean} Returns true if any `patterns` matches any of the strings in `list`
* @api public

@@ -293,3 +293,3 @@ */

* @param {Object} `options` See available [options](#options) for changing how matches are performed
* @return {Boolean} Returns true if any patterns match `str`
* @return {Boolean} Returns true if all `patterns` matches all of the strings in `list`
* @api public

@@ -360,3 +360,3 @@ */

* @param {Object} `options` See available [options](#options) for changing how matches are performed
* @return {Boolean} Returns an array of captures if the input matches the glob pattern, otherwise `null`.
* @return {Array|null} Returns an array of captures if the input matches the glob pattern, otherwise `null`.
* @api public

@@ -363,0 +363,0 @@ */

{
"name": "micromatch",
"description": "Glob matching for javascript/node.js. A replacement and faster alternative to minimatch and multimatch.",
"version": "4.0.3",
"version": "4.0.4",
"homepage": "https://github.com/micromatch/micromatch",

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

"braces": "^3.0.1",
"picomatch": "^2.2.1"
"picomatch": "^2.2.3"
},

@@ -48,3 +48,3 @@ "devDependencies": {

"minimatch": "^3.0.4",
"mocha": "^5.2.0",
"mocha": "^7.2.0",
"time-require": "github:jonschlinkert/time-require"

@@ -51,0 +51,0 @@ },

@@ -1,2 +0,2 @@

# micromatch [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/micromatch.svg?style=flat)](https://www.npmjs.com/package/micromatch) [![NPM monthly downloads](https://img.shields.io/npm/dm/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![NPM total downloads](https://img.shields.io/npm/dt/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![Linux Build Status](https://img.shields.io/travis/micromatch/micromatch.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/micromatch)
# micromatch [![NPM version](https://img.shields.io/npm/v/micromatch.svg?style=flat)](https://www.npmjs.com/package/micromatch) [![NPM monthly downloads](https://img.shields.io/npm/dm/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![NPM total downloads](https://img.shields.io/npm/dt/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![Linux Build Status](https://img.shields.io/travis/micromatch/micromatch.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/micromatch)

@@ -96,3 +96,3 @@ > Glob matching for javascript/node.js. A replacement and faster alternative to minimatch and multimatch.

* **Glob matching** - Using wildcards (`*` and `?`), globstars (`**`) for nested directories
* **[Advanced globbing](#advanced-globbing)** - Supports [extglobs](#extglobs), [braces](#braces), and [POSIX brackets](#posix-bracket-expressions), and support for escaping special characters with `\` or quotes.
* **[Advanced globbing](#extended-globbing)** - Supports [extglobs](#extglobs), [braces](#braces-1), and [POSIX brackets](#posix-bracket-expressions), and support for escaping special characters with `\` or quotes.
* **Accurate** - Covers more scenarios [than minimatch](https://github.com/yarnpkg/yarn/pull/3339)

@@ -146,5 +146,5 @@ * **Well tested** - More than 5,000 [test assertions](./test)

* **{String|Array<string>}**: list List of strings to match.
* **{String|Array<string>}**: patterns One or more glob patterns to use for matching.
* **{Object}**: options See available [options](#options)
* `list` **{String|Array<string>}**: List of strings to match.
* `patterns` **{String|Array<string>}**: One or more glob patterns to use for matching.
* `options` **{Object}**: See available [options](#options)
* `returns` **{Array}**: Returns an array of matches

@@ -162,3 +162,3 @@

### [.matcher](index.js#L98)
### [.matcher](index.js#L104)

@@ -184,3 +184,3 @@ Returns a matcher function from the given glob `pattern` and `options`. The returned function takes a string to match as its only argument and returns true if the string is a match.

### [.isMatch](index.js#L117)
### [.isMatch](index.js#L123)

@@ -191,5 +191,5 @@ Returns true if **any** of the given glob `patterns` match the specified `string`.

* **{String}**: str The string to test.
* **{String|Array}**: patterns One or more glob patterns to use for matching.
* **{Object}**: See available [options](#options).
* `str` **{String}**: The string to test.
* `patterns` **{String|Array}**: One or more glob patterns to use for matching.
* `[options]` **{Object}**: See available [options](#options).
* `returns` **{Boolean}**: Returns true if any patterns match `str`

@@ -207,3 +207,3 @@

### [.not](index.js#L136)
### [.not](index.js#L148)

@@ -229,3 +229,3 @@ Returns a list of strings that _**do not match any**_ of the given `patterns`.

### [.contains](index.js#L176)
### [.contains](index.js#L188)

@@ -239,3 +239,3 @@ Returns true if the given `string` contains the given pattern. Similar to [.isMatch](#isMatch) but the pattern can match any part of the string.

* `options` **{Object}**: See available [options](#options) for changing how matches are performed
* `returns` **{Boolean}**: Returns true if the patter matches any part of `str`.
* `returns` **{Boolean}**: Returns true if any of the patterns matches any part of `str`.

@@ -254,3 +254,3 @@ **Example**

### [.matchKeys](index.js#L218)
### [.matchKeys](index.js#L230)

@@ -277,3 +277,3 @@ Filter the keys of the given object with the given `glob` pattern and `options`. Does not attempt to match nested keys. If you need this feature, use [glob-object](https://github.com/jonschlinkert/glob-object) instead.

### [.some](index.js#L247)
### [.some](index.js#L259)

@@ -287,3 +287,3 @@ Returns true if some of the strings in the given `list` match any of the given glob `patterns`.

* `options` **{Object}**: See available [options](#options) for changing how matches are performed
* `returns` **{Boolean}**: Returns true if any patterns match `str`
* `returns` **{Boolean}**: Returns true if any `patterns` matches any of the strings in `list`

@@ -302,3 +302,3 @@ **Example**

### [.every](index.js#L283)
### [.every](index.js#L295)

@@ -312,3 +312,3 @@ Returns true if every string in the given `list` matches any of the given glob `patterns`.

* `options` **{Object}**: See available [options](#options) for changing how matches are performed
* `returns` **{Boolean}**: Returns true if any patterns match `str`
* `returns` **{Boolean}**: Returns true if all `patterns` matches all of the strings in `list`

@@ -331,3 +331,3 @@ **Example**

### [.all](index.js#L322)
### [.all](index.js#L334)

@@ -362,3 +362,3 @@ Returns true if **all** of the given `patterns` match the specified string.

### [.capture](index.js#L349)
### [.capture](index.js#L361)

@@ -372,3 +372,3 @@ Returns an array of matches captured by `pattern` in `string, or`null` if the pattern did not match.

* `options` **{Object}**: See available [options](#options) for changing how matches are performed
* `returns` **{Boolean}**: Returns an array of captures if the input matches the glob pattern, otherwise `null`.
* `returns` **{Array|null}**: Returns an array of captures if the input matches the glob pattern, otherwise `null`.

@@ -387,3 +387,3 @@ **Example**

### [.makeRe](index.js#L375)
### [.makeRe](index.js#L387)

@@ -408,3 +408,3 @@ Create a regular expression from the given glob `pattern`.

### [.scan](index.js#L391)
### [.scan](index.js#L403)

@@ -426,3 +426,3 @@ Scan a glob pattern to separate the pattern into segments. Used by the [split](#split) method.

### [.parse](index.js#L407)
### [.parse](index.js#L419)

@@ -444,3 +444,3 @@ Parse a glob pattern to create the source string for a regular expression.

### [.braces](index.js#L434)
### [.braces](index.js#L446)

@@ -502,3 +502,3 @@ Process the given brace `pattern`.

| `posixSlashes` | `boolean` | `undefined` | Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself |
| `prepend` | `boolean` | `undefined` | String to prepend to the generated regex used for matching. |
| `prepend` | `string` | `undefined` | String to prepend to the generated regex used for matching. |
| `regex` | `boolean` | `false` | Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`). |

@@ -858,3 +858,3 @@ | `strictBrackets` | `boolean` | `undefined` | Throw an error if brackets, braces, or parens are imbalanced. |

```sh
$ cd bench && npm install
$ cd bench && npm install
```

@@ -870,52 +870,52 @@

As of April 10, 2019 (longer bars are better):
As of April 10, 2021 (longer bars are better):
```sh
# .makeRe star
micromatch x 1,724,735 ops/sec ±1.69% (87 runs sampled))
minimatch x 649,565 ops/sec ±1.93% (91 runs sampled)
micromatch x 2,232,802 ops/sec ±2.34% (89 runs sampled))
minimatch x 781,018 ops/sec ±6.74% (92 runs sampled))
# .makeRe star; dot=true
micromatch x 1,302,127 ops/sec ±1.43% (92 runs sampled)
minimatch x 556,242 ops/sec ±0.71% (86 runs sampled)
micromatch x 1,863,453 ops/sec ±0.74% (93 runs sampled)
minimatch x 723,105 ops/sec ±0.75% (93 runs sampled)
# .makeRe globstar
micromatch x 1,393,992 ops/sec ±0.71% (89 runs sampled)
minimatch x 1,112,801 ops/sec ±2.02% (91 runs sampled)
micromatch x 1,624,179 ops/sec ±2.22% (91 runs sampled)
minimatch x 1,117,230 ops/sec ±2.78% (86 runs sampled))
# .makeRe globstars
micromatch x 1,419,097 ops/sec ±0.34% (94 runs sampled)
minimatch x 541,207 ops/sec ±1.66% (93 runs sampled)
micromatch x 1,658,642 ops/sec ±0.86% (92 runs sampled)
minimatch x 741,224 ops/sec ±1.24% (89 runs sampled))
# .makeRe with leading star
micromatch x 1,247,825 ops/sec ±0.97% (94 runs sampled)
minimatch x 489,660 ops/sec ±0.63% (94 runs sampled)
micromatch x 1,525,014 ops/sec ±1.63% (90 runs sampled)
minimatch x 561,074 ops/sec ±3.07% (89 runs sampled)
# .makeRe - braces
micromatch x 206,301 ops/sec ±1.62% (81 runs sampled))
minimatch x 115,986 ops/sec ±0.59% (94 runs sampled)
micromatch x 172,478 ops/sec ±2.37% (78 runs sampled)
minimatch x 96,087 ops/sec ±2.34% (88 runs sampled)))
# .makeRe braces - range (expanded)
micromatch x 27,782 ops/sec ±0.79% (88 runs sampled)
minimatch x 4,683 ops/sec ±1.20% (92 runs sampled)
micromatch x 26,973 ops/sec ±0.84% (89 runs sampled)
minimatch x 3,023 ops/sec ±0.99% (90 runs sampled))
# .makeRe braces - range (compiled)
micromatch x 134,056 ops/sec ±2.73% (77 runs sampled))
minimatch x 977 ops/sec ±0.85% (91 runs sampled)d)
micromatch x 152,892 ops/sec ±1.67% (83 runs sampled)
minimatch x 992 ops/sec ±3.50% (89 runs sampled)d))
# .makeRe braces - nested ranges (expanded)
micromatch x 18,353 ops/sec ±0.95% (91 runs sampled)
minimatch x 4,514 ops/sec ±1.04% (93 runs sampled)
micromatch x 15,816 ops/sec ±13.05% (80 runs sampled)
minimatch x 2,953 ops/sec ±1.64% (91 runs sampled)
# .makeRe braces - nested ranges (compiled)
micromatch x 38,916 ops/sec ±1.85% (82 runs sampled)
minimatch x 980 ops/sec ±0.54% (93 runs sampled)d)
micromatch x 110,881 ops/sec ±1.85% (82 runs sampled)
minimatch x 1,008 ops/sec ±1.51% (91 runs sampled)
# .makeRe braces - set (compiled)
micromatch x 141,088 ops/sec ±1.70% (70 runs sampled))
minimatch x 43,385 ops/sec ±0.87% (93 runs sampled)
micromatch x 134,930 ops/sec ±3.54% (63 runs sampled))
minimatch x 43,242 ops/sec ±0.60% (93 runs sampled)
# .makeRe braces - nested sets (compiled)
micromatch x 87,272 ops/sec ±2.85% (71 runs sampled))
minimatch x 25,327 ops/sec ±1.59% (86 runs sampled)
micromatch x 94,455 ops/sec ±1.74% (69 runs sampled))
minimatch x 27,720 ops/sec ±1.84% (93 runs sampled))
```

@@ -989,15 +989,23 @@

| --- | --- |
| 475 | [jonschlinkert](https://github.com/jonschlinkert) |
| 508 | [jonschlinkert](https://github.com/jonschlinkert) |
| 12 | [es128](https://github.com/es128) |
| 8 | [doowb](https://github.com/doowb) |
| 3 | [paulmillr](https://github.com/paulmillr) |
| 6 | [paulmillr](https://github.com/paulmillr) |
| 5 | [mrmlnc](https://github.com/mrmlnc) |
| 4 | [danez](https://github.com/danez) |
| 3 | [DrPizza](https://github.com/DrPizza) |
| 2 | [TrySound](https://github.com/TrySound) |
| 2 | [mceIdo](https://github.com/mceIdo) |
| 2 | [Glazy](https://github.com/Glazy) |
| 2 | [MartinKolarik](https://github.com/MartinKolarik) |
| 2 | [Tvrqvoise](https://github.com/Tvrqvoise) |
| 2 | [tunnckoCore](https://github.com/tunnckoCore) |
| 1 | [amilajack](https://github.com/amilajack) |
| 1 | [mrmlnc](https://github.com/mrmlnc) |
| 1 | [Cslove](https://github.com/Cslove) |
| 1 | [devongovett](https://github.com/devongovett) |
| 1 | [DianeLooney](https://github.com/DianeLooney) |
| 1 | [UltCombo](https://github.com/UltCombo) |
| 1 | [frangio](https://github.com/frangio) |
| 1 | [juszczykjakub](https://github.com/juszczykjakub) |
| 1 | [muescha](https://github.com/muescha) |
| 1 | [sebdeckers](https://github.com/sebdeckers) |
| 1 | [tomByrer](https://github.com/tomByrer) |

@@ -1007,2 +1015,3 @@ | 1 | [fidian](https://github.com/fidian) |

| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
| 1 | [yvele](https://github.com/yvele) |

@@ -1019,3 +1028,3 @@ ### Author

Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert).
Copyright © 2021, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).

@@ -1025,2 +1034,2 @@

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 10, 2019._
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 10, 2021._
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