micromatch
Advanced tools
Comparing version
{ | ||
"name": "micromatch", | ||
"description": "Glob matching for javascript/node.js. Like minimatch, but 10-40x faster.", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"homepage": "https://github.com/jonschlinkert/micromatch", | ||
@@ -31,3 +31,3 @@ "author": { | ||
"arr-union": "^1.0.0", | ||
"braces": "^0.1.5", | ||
"braces": "^1.0.0", | ||
"unixify": "^0.1.0" | ||
@@ -34,0 +34,0 @@ }, |
@@ -32,21 +32,32 @@ # micromatch [](http://badge.fury.io/js/micromatch) | ||
### micromatch() | ||
```js | ||
var micromatch = require('micromatch'); | ||
mm(['a.js', 'b.md', 'c.txt'], '*.{js,txt}'); | ||
micromatch(['a.js', 'b.md', 'c.txt'], '*.{js,txt}'); | ||
//=> ['a.js', 'c.txt'] | ||
``` | ||
Also supports negation patterns: | ||
**Negation patterns:** | ||
```js | ||
mm(['a.js', 'b.md', 'c.txt'], '!*.{js,txt}'); | ||
micromatch(['a.js', 'b.md', 'c.txt'], '!*.{js,txt}'); | ||
//=> ['b.md'] | ||
mm(['a.md', 'b.js', 'c.txt', 'd.json'], ['*.*', '!*.{js,txt}']); | ||
micromatch(['a.md', 'b.js', 'c.txt', 'd.json'], ['*.*', '!*.{js,txt}']); | ||
//=> ['a.md', 'd.json'] | ||
``` | ||
### micromatch.matchRe() | ||
Generate a regular expression for matching file paths based on the given pattern: | ||
```js | ||
var | ||
micromatch.makeRe('a/?/c.md'); | ||
//=> /^a\/.\/c\.md$/ | ||
``` | ||
## Benchmarks | ||
@@ -53,0 +64,0 @@ |
10390
2.03%103
11.96%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
Updated