micromatch 3.1.9 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of micromatch might be problematic. Click here for more details.
- package/CHANGELOG.md +86 -15
- package/LICENSE +1 -1
- package/README.md +409 -559
- package/index.js +238 -648
- package/package.json +28 -57
- package/lib/.DS_Store +0 -0
- package/lib/cache.js +0 -1
- package/lib/compilers.js +0 -77
- package/lib/parsers.js +0 -83
- package/lib/utils.js +0 -309
package/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# micromatch [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [](https://www.npmjs.com/package/micromatch) [](https://npmjs.org/package/micromatch) [](https://npmjs.org/package/micromatch) [](https://travis-ci.org/micromatch/micromatch)
|
2
2
|
|
3
|
-
> Glob matching for javascript/node.js. A
|
3
|
+
> Glob matching for javascript/node.js. A replacement and faster alternative to minimatch and multimatch.
|
4
4
|
|
5
5
|
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
|
6
6
|
|
@@ -18,38 +18,36 @@ Please consider following this project's author, [Jon Schlinkert](https://github
|
|
18
18
|
* [From multimatch](#from-multimatch)
|
19
19
|
- [API](#api)
|
20
20
|
- [Options](#options)
|
21
|
+
- [Options Examples](#options-examples)
|
21
22
|
* [options.basename](#optionsbasename)
|
22
23
|
* [options.bash](#optionsbash)
|
23
|
-
* [options.
|
24
|
-
* [options.
|
25
|
-
* [options.failglob](#optionsfailglob)
|
24
|
+
* [options.expandRange](#optionsexpandrange)
|
25
|
+
* [options.format](#optionsformat)
|
26
26
|
* [options.ignore](#optionsignore)
|
27
27
|
* [options.matchBase](#optionsmatchbase)
|
28
|
-
* [options.
|
29
|
-
* [options.nocase](#optionsnocase)
|
30
|
-
* [options.nodupes](#optionsnodupes)
|
31
|
-
* [options.noext](#optionsnoext)
|
28
|
+
* [options.noextglob](#optionsnoextglob)
|
32
29
|
* [options.nonegate](#optionsnonegate)
|
33
30
|
* [options.noglobstar](#optionsnoglobstar)
|
34
31
|
* [options.nonull](#optionsnonull)
|
35
32
|
* [options.nullglob](#optionsnullglob)
|
36
|
-
* [options.
|
37
|
-
* [options.
|
33
|
+
* [options.onIgnore](#optionsonignore)
|
34
|
+
* [options.onMatch](#optionsonmatch)
|
35
|
+
* [options.onResult](#optionsonresult)
|
36
|
+
* [options.posixSlashes](#optionsposixslashes)
|
38
37
|
* [options.unescape](#optionsunescape)
|
39
|
-
* [options.unixify](#optionsunixify)
|
40
38
|
- [Extended globbing](#extended-globbing)
|
41
|
-
* [
|
42
|
-
* [
|
43
|
-
* [
|
44
|
-
* [
|
39
|
+
* [Extglobs](#extglobs)
|
40
|
+
* [Braces](#braces)
|
41
|
+
* [Regex character classes](#regex-character-classes)
|
42
|
+
* [Regex groups](#regex-groups)
|
45
43
|
* [POSIX bracket expressions](#posix-bracket-expressions)
|
46
44
|
- [Notes](#notes)
|
47
45
|
* [Bash 4.3 parity](#bash-43-parity)
|
48
46
|
* [Backslashes](#backslashes)
|
49
|
-
- [Contributing](#contributing)
|
50
47
|
- [Benchmarks](#benchmarks)
|
51
48
|
* [Running benchmarks](#running-benchmarks)
|
52
49
|
* [Latest results](#latest-results)
|
50
|
+
- [Contributing](#contributing)
|
53
51
|
- [About](#about)
|
54
52
|
|
55
53
|
</details>
|
@@ -65,45 +63,49 @@ $ npm install --save micromatch
|
|
65
63
|
## Quickstart
|
66
64
|
|
67
65
|
```js
|
68
|
-
|
69
|
-
|
66
|
+
const micromatch = require('micromatch');
|
67
|
+
// micromatch(list, patterns[, options]);
|
70
68
|
```
|
71
69
|
|
72
70
|
The [main export](#micromatch) takes a list of strings and one or more glob patterns:
|
73
71
|
|
74
72
|
```js
|
75
|
-
console.log(
|
76
|
-
//=> ['foo', '
|
73
|
+
console.log(micromatch(['foo', 'bar', 'baz', 'qux'], ['f*', 'b*'])) //=> ['foo', 'bar', 'baz']
|
74
|
+
console.log(micromatch(['foo', 'bar', 'baz', 'qux'], ['*', '!b*'])) //=> ['foo', 'qux']
|
77
75
|
```
|
78
76
|
|
79
|
-
Use [.isMatch()](#ismatch) to
|
77
|
+
Use [.isMatch()](#ismatch) to for boolean matching:
|
80
78
|
|
81
79
|
```js
|
82
|
-
console.log(
|
83
|
-
//=> true
|
80
|
+
console.log(micromatch.isMatch('foo', 'f*')) //=> true
|
81
|
+
console.log(micromatch.isMatch('foo', ['b*', 'f*'])) //=> true
|
84
82
|
```
|
85
83
|
|
86
84
|
[Switching](#switching-to-micromatch) from minimatch and multimatch is easy!
|
87
85
|
|
86
|
+
<br>
|
87
|
+
|
88
88
|
## Why use micromatch?
|
89
89
|
|
90
|
-
> micromatch is a [
|
90
|
+
> micromatch is a [replacement](#switching-to-micromatch) for minimatch and multimatch
|
91
91
|
|
92
92
|
* Supports all of the same matching features as [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch)
|
93
|
-
*
|
94
|
-
*
|
95
|
-
*
|
96
|
-
* [
|
97
|
-
* [
|
98
|
-
*
|
93
|
+
* More complete support for the Bash 4.3 specification than minimatch and multimatch. Micromatch passes _all of the spec tests_ from bash, including some that bash still fails.
|
94
|
+
* **Fast & Performant** - Loads in about 5ms and performs [fast matches](#benchmarks).
|
95
|
+
* **Glob matching** - Using wildcards (`*` and `?`), globstars (`**`) for nested directories
|
96
|
+
* **[Advanced globbing](#advanced-globbing)** - Supports [extglobs](#extglobs), [braces](#braces), and [POSIX brackets](#posix-bracket-expressions), and support for escaping special characters with `\` or quotes.
|
97
|
+
* **Accurate** - Covers more scenarios [than minimatch](https://github.com/yarnpkg/yarn/pull/3339)
|
98
|
+
* **Well tested** - More than 5,000 [test assertions](./test)
|
99
|
+
* **Windows support** - More reliable windows support than minimatch and multimatch.
|
100
|
+
* **[Safe](https://github.com/micromatch/braces#braces-is-safe)** - Micromatch is not subject to DoS with brace patterns like minimatch and multimatch.
|
99
101
|
|
100
102
|
### Matching features
|
101
103
|
|
102
104
|
* Support for multiple glob patterns (no need for wrappers like multimatch)
|
103
105
|
* Wildcards (`**`, `*.js`)
|
104
106
|
* Negation (`'!a/*.js'`, `'*!(b).js']`)
|
105
|
-
* [extglobs](
|
106
|
-
* [POSIX character classes](
|
107
|
+
* [extglobs](#extglobs) (`+(x|y)`, `!(a|b)`)
|
108
|
+
* [POSIX character classes](#posix-bracket-expressions) (`[[:alpha:][:digit:]]`)
|
107
109
|
* [brace expansion](https://github.com/micromatch/braces) (`foo/{1..5}.md`, `bar/{a,b,c}.js`)
|
108
110
|
* regex character classes (`foo-[1-5].js`)
|
109
111
|
* regex logical "or" (`foo/(abc|xyz).js`)
|
@@ -112,22 +114,20 @@ You can mix and match these features to create whatever patterns you need!
|
|
112
114
|
|
113
115
|
## Switching to micromatch
|
114
116
|
|
115
|
-
There is one notable difference between micromatch and minimatch in regards to how backslashes are handled. See [the notes about backslashes](#backslashes) for more information.
|
117
|
+
_(There is one notable difference between micromatch and minimatch in regards to how backslashes are handled. See [the notes about backslashes](#backslashes) for more information.)_
|
116
118
|
|
117
119
|
### From minimatch
|
118
120
|
|
119
|
-
Use [
|
121
|
+
Use [micromatch.isMatch()](#ismatch) instead of `minimatch()`:
|
120
122
|
|
121
123
|
```js
|
122
|
-
|
123
|
-
//=> false
|
124
|
+
console.log(micromatch.isMatch('foo', 'b*')); //=> false
|
124
125
|
```
|
125
126
|
|
126
|
-
Use [
|
127
|
+
Use [micromatch.match()](#match) instead of `minimatch.match()`:
|
127
128
|
|
128
129
|
```js
|
129
|
-
|
130
|
-
//=> 'bar'
|
130
|
+
console.log(micromatch.match(['foo', 'bar'], 'b*')); //=> 'bar'
|
131
131
|
```
|
132
132
|
|
133
133
|
### From multimatch
|
@@ -135,157 +135,143 @@ mm.match(['foo', 'bar'], 'b*');
|
|
135
135
|
Same signature:
|
136
136
|
|
137
137
|
```js
|
138
|
-
|
139
|
-
//=> ['foo', 'baz']
|
138
|
+
console.log(micromatch(['foo', 'bar', 'baz'], ['f*', '*z'])); //=> ['foo', 'baz']
|
140
139
|
```
|
141
140
|
|
142
141
|
## API
|
143
142
|
|
144
|
-
### [micromatch](index.js#L41)
|
145
|
-
|
146
|
-
The main function takes a list of strings and one or more glob patterns to use for matching.
|
147
|
-
|
148
143
|
**Params**
|
149
144
|
|
150
|
-
*
|
151
|
-
*
|
152
|
-
*
|
145
|
+
* **{String|Array<string>}**: list List of strings to match.
|
146
|
+
* **{String|Array<string>}**: patterns One or more glob patterns to use for matching.
|
147
|
+
* **{Object}**: options See available [options](#options)
|
153
148
|
* `returns` **{Array}**: Returns an array of matches
|
154
149
|
|
155
150
|
**Example**
|
156
151
|
|
157
152
|
```js
|
158
|
-
|
159
|
-
mm(list, patterns[, options]);
|
153
|
+
const mm = require('micromatch');
|
154
|
+
// mm(list, patterns[, options]);
|
160
155
|
|
161
156
|
console.log(mm(['a.js', 'a.txt'], ['*.js']));
|
162
157
|
//=> [ 'a.js' ]
|
163
158
|
```
|
164
159
|
|
165
|
-
### [.
|
160
|
+
### [.matcher](index.js#L98)
|
166
161
|
|
167
|
-
|
162
|
+
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.
|
168
163
|
|
169
164
|
**Params**
|
170
165
|
|
171
|
-
* `
|
172
|
-
* `
|
173
|
-
* `
|
174
|
-
* `returns` **{Array}**: Returns an array of matches
|
166
|
+
* `pattern` **{String}**: Glob pattern
|
167
|
+
* `options` **{Object}**
|
168
|
+
* `returns` **{Function}**: Returns a matcher function.
|
175
169
|
|
176
170
|
**Example**
|
177
171
|
|
178
172
|
```js
|
179
|
-
|
180
|
-
mm.
|
173
|
+
const mm = require('micromatch');
|
174
|
+
// mm.matcher(pattern[, options]);
|
181
175
|
|
182
|
-
|
183
|
-
|
176
|
+
const isMatch = mm.matcher('*.!(*a)');
|
177
|
+
console.log(isMatch('a.a')); //=> false
|
178
|
+
console.log(isMatch('a.b')); //=> true
|
184
179
|
```
|
185
180
|
|
186
|
-
### [.isMatch](index.js#
|
181
|
+
### [.isMatch](index.js#L117)
|
187
182
|
|
188
|
-
Returns true if the
|
183
|
+
Returns true if **any** of the given glob `patterns` match the specified `string`.
|
189
184
|
|
190
185
|
**Params**
|
191
186
|
|
192
|
-
*
|
193
|
-
*
|
194
|
-
*
|
195
|
-
* `returns` **{Boolean}**: Returns true if
|
187
|
+
* **{String}**: str The string to test.
|
188
|
+
* **{String|Array}**: patterns One or more glob patterns to use for matching.
|
189
|
+
* **{Object}**: See available [options](#options).
|
190
|
+
* `returns` **{Boolean}**: Returns true if any patterns match `str`
|
196
191
|
|
197
192
|
**Example**
|
198
193
|
|
199
194
|
```js
|
200
|
-
|
201
|
-
mm.isMatch(string,
|
195
|
+
const mm = require('micromatch');
|
196
|
+
// mm.isMatch(string, patterns[, options]);
|
202
197
|
|
203
|
-
console.log(mm.isMatch('a.a', '*.a'));
|
204
|
-
//=>
|
205
|
-
console.log(mm.isMatch('a.b', '*.a'));
|
206
|
-
//=> false
|
198
|
+
console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true
|
199
|
+
console.log(mm.isMatch('a.a', 'b.*')); //=> false
|
207
200
|
```
|
208
201
|
|
209
|
-
### [.
|
202
|
+
### [.not](index.js#L136)
|
210
203
|
|
211
|
-
Returns
|
204
|
+
Returns a list of strings that _**do not match any**_ of the given `patterns`.
|
212
205
|
|
213
206
|
**Params**
|
214
207
|
|
215
|
-
* `list` **{
|
216
|
-
* `patterns` **{String|Array}**: One or more glob
|
208
|
+
* `list` **{Array}**: Array of strings to match.
|
209
|
+
* `patterns` **{String|Array}**: One or more glob pattern to use for matching.
|
217
210
|
* `options` **{Object}**: See available [options](#options) for changing how matches are performed
|
218
|
-
* `returns` **{
|
211
|
+
* `returns` **{Array}**: Returns an array of strings that **do not match** the given patterns.
|
219
212
|
|
220
213
|
**Example**
|
221
214
|
|
222
215
|
```js
|
223
|
-
|
224
|
-
mm.
|
216
|
+
const mm = require('micromatch');
|
217
|
+
// mm.not(list, patterns[, options]);
|
225
218
|
|
226
|
-
console.log(mm.
|
227
|
-
|
228
|
-
console.log(mm.some(['foo.js'], ['*.js', '!foo.js']));
|
229
|
-
// false
|
219
|
+
console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a'));
|
220
|
+
//=> ['b.b', 'c.c']
|
230
221
|
```
|
231
222
|
|
232
|
-
### [.
|
223
|
+
### [.contains](index.js#L176)
|
233
224
|
|
234
|
-
Returns true if
|
225
|
+
Returns true if the given `string` contains the given pattern. Similar to [.isMatch](#isMatch) but the pattern can match any part of the string.
|
235
226
|
|
236
227
|
**Params**
|
237
228
|
|
238
|
-
* `
|
239
|
-
* `patterns` **{String|Array}**:
|
229
|
+
* `str` **{String}**: The string to match.
|
230
|
+
* `patterns` **{String|Array}**: Glob pattern to use for matching.
|
240
231
|
* `options` **{Object}**: See available [options](#options) for changing how matches are performed
|
241
|
-
* `returns` **{Boolean}**: Returns true if any
|
232
|
+
* `returns` **{Boolean}**: Returns true if the patter matches any part of `str`.
|
242
233
|
|
243
234
|
**Example**
|
244
235
|
|
245
236
|
```js
|
246
237
|
var mm = require('micromatch');
|
247
|
-
mm.
|
238
|
+
// mm.contains(string, pattern[, options]);
|
248
239
|
|
249
|
-
console.log(mm.
|
250
|
-
|
251
|
-
console.log(mm.
|
252
|
-
|
253
|
-
console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
|
254
|
-
// false
|
255
|
-
console.log(mm.every(['foo.js'], ['*.js', '!foo.js']));
|
256
|
-
// false
|
240
|
+
console.log(mm.contains('aa/bb/cc', '*b'));
|
241
|
+
//=> true
|
242
|
+
console.log(mm.contains('aa/bb/cc', '*d'));
|
243
|
+
//=> false
|
257
244
|
```
|
258
245
|
|
259
|
-
### [.
|
246
|
+
### [.matchKeys](index.js#L218)
|
260
247
|
|
261
|
-
|
248
|
+
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.
|
262
249
|
|
263
250
|
**Params**
|
264
251
|
|
265
|
-
* `
|
252
|
+
* `object` **{Object}**: The object with keys to filter.
|
266
253
|
* `patterns` **{String|Array}**: One or more glob patterns to use for matching.
|
267
254
|
* `options` **{Object}**: See available [options](#options) for changing how matches are performed
|
268
|
-
* `returns` **{
|
255
|
+
* `returns` **{Object}**: Returns an object with only keys that match the given patterns.
|
269
256
|
|
270
257
|
**Example**
|
271
258
|
|
272
259
|
```js
|
273
|
-
|
274
|
-
mm.
|
260
|
+
const mm = require('micromatch');
|
261
|
+
// mm.matchKeys(object, patterns[, options]);
|
275
262
|
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
//=> false
|
263
|
+
const obj = { aa: 'a', ab: 'b', ac: 'c' };
|
264
|
+
console.log(mm.matchKeys(obj, '*b'));
|
265
|
+
//=> { ab: 'b' }
|
280
266
|
```
|
281
267
|
|
282
|
-
### [.
|
268
|
+
### [.some](index.js#L247)
|
283
269
|
|
284
|
-
Returns true if
|
270
|
+
Returns true if some of the strings in the given `list` match any of the given glob `patterns`.
|
285
271
|
|
286
272
|
**Params**
|
287
273
|
|
288
|
-
* `
|
274
|
+
* `list` **{String|Array}**: The string or array of strings to test. Returns as soon as the first match is found.
|
289
275
|
* `patterns` **{String|Array}**: One or more glob patterns to use for matching.
|
290
276
|
* `options` **{Object}**: See available [options](#options) for changing how matches are performed
|
291
277
|
* `returns` **{Boolean}**: Returns true if any patterns match `str`
|
@@ -293,127 +279,88 @@ Returns true if **all** of the given `patterns` match the specified string.
|
|
293
279
|
**Example**
|
294
280
|
|
295
281
|
```js
|
296
|
-
|
297
|
-
mm.
|
282
|
+
const mm = require('micromatch');
|
283
|
+
// mm.some(list, patterns[, options]);
|
298
284
|
|
299
|
-
console.log(mm.
|
285
|
+
console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
|
300
286
|
// true
|
301
|
-
|
302
|
-
console.log(mm.all('foo.js', ['*.js', '!foo.js']));
|
287
|
+
console.log(mm.some(['foo.js'], ['*.js', '!foo.js']));
|
303
288
|
// false
|
304
|
-
|
305
|
-
console.log(mm.all('foo.js', ['*.js', 'foo.js']));
|
306
|
-
// true
|
307
|
-
|
308
|
-
console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js']));
|
309
|
-
// true
|
310
289
|
```
|
311
290
|
|
312
|
-
### [.
|
313
|
-
|
314
|
-
Returns a list of strings that _**do not match any**_ of the given `patterns`.
|
315
|
-
|
316
|
-
**Params**
|
291
|
+
### [.every](index.js#L283)
|
317
292
|
|
318
|
-
|
319
|
-
* `patterns` **{String|Array}**: One or more glob pattern to use for matching.
|
320
|
-
* `options` **{Object}**: See available [options](#options) for changing how matches are performed
|
321
|
-
* `returns` **{Array}**: Returns an array of strings that **do not match** the given patterns.
|
322
|
-
|
323
|
-
**Example**
|
324
|
-
|
325
|
-
```js
|
326
|
-
var mm = require('micromatch');
|
327
|
-
mm.not(list, patterns[, options]);
|
328
|
-
|
329
|
-
console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a'));
|
330
|
-
//=> ['b.b', 'c.c']
|
331
|
-
```
|
332
|
-
|
333
|
-
### [.contains](index.js#L376)
|
334
|
-
|
335
|
-
Returns true if the given `string` contains the given pattern. Similar to [.isMatch](#isMatch) but the pattern can match any part of the string.
|
293
|
+
Returns true if every string in the given `list` matches any of the given glob `patterns`.
|
336
294
|
|
337
295
|
**Params**
|
338
296
|
|
339
|
-
* `
|
340
|
-
* `patterns` **{String|Array}**:
|
297
|
+
* `list` **{String|Array}**: The string or array of strings to test.
|
298
|
+
* `patterns` **{String|Array}**: One or more glob patterns to use for matching.
|
341
299
|
* `options` **{Object}**: See available [options](#options) for changing how matches are performed
|
342
|
-
* `returns` **{Boolean}**: Returns true if
|
300
|
+
* `returns` **{Boolean}**: Returns true if any patterns match `str`
|
343
301
|
|
344
302
|
**Example**
|
345
303
|
|
346
304
|
```js
|
347
|
-
|
348
|
-
mm.
|
305
|
+
const mm = require('micromatch');
|
306
|
+
// mm.every(list, patterns[, options]);
|
349
307
|
|
350
|
-
console.log(mm.
|
351
|
-
|
352
|
-
console.log(mm.
|
353
|
-
|
308
|
+
console.log(mm.every('foo.js', ['foo.js']));
|
309
|
+
// true
|
310
|
+
console.log(mm.every(['foo.js', 'bar.js'], ['*.js']));
|
311
|
+
// true
|
312
|
+
console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
|
313
|
+
// false
|
314
|
+
console.log(mm.every(['foo.js'], ['*.js', '!foo.js']));
|
315
|
+
// false
|
354
316
|
```
|
355
317
|
|
356
|
-
### [.
|
318
|
+
### [.all](index.js#L322)
|
357
319
|
|
358
|
-
|
320
|
+
Returns true if **all** of the given `patterns` match the specified string.
|
359
321
|
|
360
322
|
**Params**
|
361
323
|
|
362
|
-
* `
|
324
|
+
* `str` **{String|Array}**: The string to test.
|
363
325
|
* `patterns` **{String|Array}**: One or more glob patterns to use for matching.
|
364
326
|
* `options` **{Object}**: See available [options](#options) for changing how matches are performed
|
365
|
-
* `returns` **{
|
327
|
+
* `returns` **{Boolean}**: Returns true if any patterns match `str`
|
366
328
|
|
367
329
|
**Example**
|
368
330
|
|
369
331
|
```js
|
370
|
-
|
371
|
-
mm.
|
372
|
-
|
373
|
-
var obj = { aa: 'a', ab: 'b', ac: 'c' };
|
374
|
-
console.log(mm.matchKeys(obj, '*b'));
|
375
|
-
//=> { ab: 'b' }
|
376
|
-
```
|
377
|
-
|
378
|
-
### [.matcher](index.js#L461)
|
379
|
-
|
380
|
-
Returns a memoized 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.
|
381
|
-
|
382
|
-
**Params**
|
332
|
+
const mm = require('micromatch');
|
333
|
+
// mm.all(string, patterns[, options]);
|
383
334
|
|
384
|
-
|
385
|
-
|
386
|
-
* `returns` **{Function}**: Returns a matcher function.
|
335
|
+
console.log(mm.all('foo.js', ['foo.js']));
|
336
|
+
// true
|
387
337
|
|
388
|
-
|
338
|
+
console.log(mm.all('foo.js', ['*.js', '!foo.js']));
|
339
|
+
// false
|
389
340
|
|
390
|
-
|
391
|
-
|
392
|
-
mm.matcher(pattern[, options]);
|
341
|
+
console.log(mm.all('foo.js', ['*.js', 'foo.js']));
|
342
|
+
// true
|
393
343
|
|
394
|
-
|
395
|
-
|
396
|
-
//=> false
|
397
|
-
console.log(isMatch('a.b'));
|
398
|
-
//=> true
|
344
|
+
console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js']));
|
345
|
+
// true
|
399
346
|
```
|
400
347
|
|
401
|
-
### [.capture](index.js#
|
348
|
+
### [.capture](index.js#L349)
|
402
349
|
|
403
350
|
Returns an array of matches captured by `pattern` in `string, or`null` if the pattern did not match.
|
404
351
|
|
405
352
|
**Params**
|
406
353
|
|
407
|
-
* `
|
408
|
-
* `
|
354
|
+
* `glob` **{String}**: Glob pattern to use for matching.
|
355
|
+
* `input` **{String}**: String to match
|
409
356
|
* `options` **{Object}**: See available [options](#options) for changing how matches are performed
|
410
|
-
* `returns` **{Boolean}**: Returns an array of captures if the
|
357
|
+
* `returns` **{Boolean}**: Returns an array of captures if the input matches the glob pattern, otherwise `null`.
|
411
358
|
|
412
359
|
**Example**
|
413
360
|
|
414
361
|
```js
|
415
|
-
|
416
|
-
mm.capture(pattern, string[, options]);
|
362
|
+
const mm = require('micromatch');
|
363
|
+
// mm.capture(pattern, string[, options]);
|
417
364
|
|
418
365
|
console.log(mm.capture('test/*.js', 'test/foo.js'));
|
419
366
|
//=> ['foo']
|
@@ -421,186 +368,125 @@ console.log(mm.capture('test/*.js', 'foo/bar.css'));
|
|
421
368
|
//=> null
|
422
369
|
```
|
423
370
|
|
424
|
-
### [.makeRe](index.js#
|
371
|
+
### [.makeRe](index.js#L375)
|
425
372
|
|
426
373
|
Create a regular expression from the given glob `pattern`.
|
427
374
|
|
428
375
|
**Params**
|
429
376
|
|
430
377
|
* `pattern` **{String}**: A glob pattern to convert to regex.
|
431
|
-
* `options` **{Object}
|
378
|
+
* `options` **{Object}**
|
432
379
|
* `returns` **{RegExp}**: Returns a regex created from the given pattern.
|
433
380
|
|
434
381
|
**Example**
|
435
382
|
|
436
383
|
```js
|
437
|
-
|
438
|
-
mm.makeRe(pattern[, options]);
|
384
|
+
const mm = require('micromatch');
|
385
|
+
// mm.makeRe(pattern[, options]);
|
439
386
|
|
440
387
|
console.log(mm.makeRe('*.js'));
|
441
388
|
//=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/
|
442
389
|
```
|
443
390
|
|
444
|
-
### [.
|
391
|
+
### [.scan](index.js#L391)
|
445
392
|
|
446
|
-
|
393
|
+
Scan a glob pattern to separate the pattern into segments. Used by the [split](#split) method.
|
447
394
|
|
448
395
|
**Params**
|
449
396
|
|
450
|
-
* `pattern` **{String}
|
451
|
-
* `options` **{Object}
|
452
|
-
* `returns` **{
|
453
|
-
|
454
|
-
**Example**
|
455
|
-
|
456
|
-
```js
|
457
|
-
var mm = require('micromatch');
|
458
|
-
console.log(mm.braces('foo/{a,b}/bar'));
|
459
|
-
//=> ['foo/(a|b)/bar']
|
460
|
-
|
461
|
-
console.log(mm.braces('foo/{a,b}/bar', {expand: true}));
|
462
|
-
//=> ['foo/(a|b)/bar']
|
463
|
-
```
|
464
|
-
|
465
|
-
### [.create](index.js#L685)
|
466
|
-
|
467
|
-
Parses the given glob `pattern` and returns an array of abstract syntax trees (ASTs), with the compiled `output` and optional source `map` on each AST.
|
468
|
-
|
469
|
-
**Params**
|
470
|
-
|
471
|
-
* `pattern` **{String}**: Glob pattern to parse and compile.
|
472
|
-
* `options` **{Object}**: Any [options](#options) to change how parsing and compiling is performed.
|
473
|
-
* `returns` **{Object}**: Returns an object with the parsed AST, compiled string and optional source map.
|
397
|
+
* `pattern` **{String}**
|
398
|
+
* `options` **{Object}**
|
399
|
+
* `returns` **{Object}**: Returns an object with
|
474
400
|
|
475
401
|
**Example**
|
476
402
|
|
477
403
|
```js
|
478
|
-
|
479
|
-
mm.
|
480
|
-
|
481
|
-
console.log(mm.create('abc/*.js'));
|
482
|
-
// [{ options: { source: 'string', sourcemap: true },
|
483
|
-
// state: {},
|
484
|
-
// compilers:
|
485
|
-
// { ... },
|
486
|
-
// output: '(\\.[\\\\\\/])?abc\\/(?!\\.)(?=.)[^\\/]*?\\.js',
|
487
|
-
// ast:
|
488
|
-
// { type: 'root',
|
489
|
-
// errors: [],
|
490
|
-
// nodes:
|
491
|
-
// [ ... ],
|
492
|
-
// dot: false,
|
493
|
-
// input: 'abc/*.js' },
|
494
|
-
// parsingErrors: [],
|
495
|
-
// map:
|
496
|
-
// { version: 3,
|
497
|
-
// sources: [ 'string' ],
|
498
|
-
// names: [],
|
499
|
-
// mappings: 'AAAA,GAAG,EAAC,kBAAC,EAAC,EAAE',
|
500
|
-
// sourcesContent: [ 'abc/*.js' ] },
|
501
|
-
// position: { line: 1, column: 28 },
|
502
|
-
// content: {},
|
503
|
-
// files: {},
|
504
|
-
// idx: 6 }]
|
404
|
+
const mm = require('micromatch');
|
405
|
+
const state = mm.scan(pattern[, options]);
|
505
406
|
```
|
506
407
|
|
507
|
-
### [.parse](index.js#
|
408
|
+
### [.parse](index.js#L407)
|
508
409
|
|
509
|
-
Parse
|
410
|
+
Parse a glob pattern to create the source string for a regular expression.
|
510
411
|
|
511
412
|
**Params**
|
512
413
|
|
513
|
-
* `
|
414
|
+
* `glob` **{String}**
|
514
415
|
* `options` **{Object}**
|
515
|
-
* `returns` **{Object}**: Returns an
|
416
|
+
* `returns` **{Object}**: Returns an object with useful properties and output to be used as regex source string.
|
516
417
|
|
517
418
|
**Example**
|
518
419
|
|
519
420
|
```js
|
520
|
-
|
521
|
-
mm
|
522
|
-
|
523
|
-
var ast = mm.parse('a/{b,c}/d');
|
524
|
-
console.log(ast);
|
525
|
-
// { type: 'root',
|
526
|
-
// errors: [],
|
527
|
-
// input: 'a/{b,c}/d',
|
528
|
-
// nodes:
|
529
|
-
// [ { type: 'bos', val: '' },
|
530
|
-
// { type: 'text', val: 'a/' },
|
531
|
-
// { type: 'brace',
|
532
|
-
// nodes:
|
533
|
-
// [ { type: 'brace.open', val: '{' },
|
534
|
-
// { type: 'text', val: 'b,c' },
|
535
|
-
// { type: 'brace.close', val: '}' } ] },
|
536
|
-
// { type: 'text', val: '/d' },
|
537
|
-
// { type: 'eos', val: '' } ] }
|
421
|
+
const mm = require('micromatch');
|
422
|
+
const state = mm(pattern[, options]);
|
538
423
|
```
|
539
424
|
|
540
|
-
### [.
|
425
|
+
### [.braces](index.js#L434)
|
541
426
|
|
542
|
-
|
427
|
+
Process the given brace `pattern`.
|
543
428
|
|
544
429
|
**Params**
|
545
430
|
|
546
|
-
* `
|
547
|
-
* `options` **{Object}
|
548
|
-
* `returns` **{
|
431
|
+
* `pattern` **{String}**: String with brace pattern to process.
|
432
|
+
* `options` **{Object}**: Any [options](#options) to change how expansion is performed. See the [braces](https://github.com/micromatch/braces) library for all available options.
|
433
|
+
* `returns` **{Array}**
|
549
434
|
|
550
435
|
**Example**
|
551
436
|
|
552
437
|
```js
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
var ast = mm.parse('a/{b,c}/d');
|
557
|
-
console.log(mm.compile(ast));
|
558
|
-
// { options: { source: 'string' },
|
559
|
-
// state: {},
|
560
|
-
// compilers:
|
561
|
-
// { eos: [Function],
|
562
|
-
// noop: [Function],
|
563
|
-
// bos: [Function],
|
564
|
-
// brace: [Function],
|
565
|
-
// 'brace.open': [Function],
|
566
|
-
// text: [Function],
|
567
|
-
// 'brace.close': [Function] },
|
568
|
-
// output: [ 'a/(b|c)/d' ],
|
569
|
-
// ast:
|
570
|
-
// { ... },
|
571
|
-
// parsingErrors: [] }
|
572
|
-
```
|
573
|
-
|
574
|
-
### [.clearCache](index.js#L801)
|
438
|
+
const { braces } = require('micromatch');
|
439
|
+
console.log(braces('foo/{a,b,c}/bar'));
|
440
|
+
//=> [ 'foo/(a|b|c)/bar' ]
|
575
441
|
|
576
|
-
|
577
|
-
|
578
|
-
**Example**
|
579
|
-
|
580
|
-
```js
|
581
|
-
mm.clearCache();
|
442
|
+
console.log(braces('foo/{a,b,c}/bar', { expand: true }));
|
443
|
+
//=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ]
|
582
444
|
```
|
583
445
|
|
584
446
|
## Options
|
585
447
|
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
448
|
+
| **Option** | **Type** | **Default value** | **Description** |
|
449
|
+
| --- | --- | --- | --- |
|
450
|
+
| `basename` | `boolean` | `false` | If set, then patterns without slashes will be matched against the basename of the path if it contains slashes. For example, `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. |
|
451
|
+
| `bash` | `boolean` | `false` | Follow bash matching rules more strictly - disallows backslashes as escape characters, and treats single stars as globstars (`**`). |
|
452
|
+
| `capture` | `boolean` | `undefined` | Return regex matches in supporting methods. |
|
453
|
+
| `contains` | `boolean` | `undefined` | Allows glob to match any part of the given string(s). |
|
454
|
+
| `cwd` | `string` | `process.cwd()` | Current working directory. Used by `picomatch.split()` |
|
455
|
+
| `debug` | `boolean` | `undefined` | Debug regular expressions when an error is thrown. |
|
456
|
+
| `dot` | `boolean` | `false` | Match dotfiles. Otherwise dotfiles are ignored unless a `.` is explicitly defined in the pattern. |
|
457
|
+
| `expandRange` | `function` | `undefined` | Custom function for expanding ranges in brace patterns, such as `{a..z}`. The function receives the range values as two arguments, and it must return a string to be used in the generated regex. It's recommended that returned strings be wrapped in parentheses. This option is overridden by the `expandBrace` option. |
|
458
|
+
| `failglob` | `boolean` | `false` | Similar to the `failglob` behavior in Bash, throws an error when no matches are found. Based on the bash option of the same name. |
|
459
|
+
| `fastpaths` | `boolean` | `true` | To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to `false`. |
|
460
|
+
| `flags` | `boolean` | `undefined` | Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden. |
|
461
|
+
| [format](#optionsformat) | `function` | `undefined` | Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc. |
|
462
|
+
| `ignore` | `array\|string` | `undefined` | One or more glob patterns for excluding strings that should not be matched from the result. |
|
463
|
+
| `keepQuotes` | `boolean` | `false` | Retain quotes in the generated regex, since quotes may also be used as an alternative to backslashes. |
|
464
|
+
| `literalBrackets` | `boolean` | `undefined` | When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. |
|
465
|
+
| `lookbehinds` | `boolean` | `true` | Support regex positive and negative lookbehinds. Note that you must be using Node 8.1.10 or higher to enable regex lookbehinds. |
|
466
|
+
| `matchBase` | `boolean` | `false` | Alias for `basename` |
|
467
|
+
| `maxLength` | `boolean` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. |
|
468
|
+
| `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. |
|
469
|
+
| `nobracket` | `boolean` | `undefined` | Disable matching with regex brackets. |
|
470
|
+
| `nocase` | `boolean` | `false` | Perform case-insensitive matching. Equivalent to the regex `i` flag. Note that this option is ignored when the `flags` option is defined. |
|
471
|
+
| `nodupes` | `boolean` | `true` | Deprecated, use `nounique` instead. This option will be removed in a future major release. By default duplicates are removed. Disable uniquification by setting this option to false. |
|
472
|
+
| `noext` | `boolean` | `false` | Alias for `noextglob` |
|
473
|
+
| `noextglob` | `boolean` | `false` | Disable support for matching with [extglobs](#extglobs) (like `+(a\|b)`) |
|
474
|
+
| `noglobstar` | `boolean` | `false` | Disable support for matching nested directories with globstars (`**`) |
|
475
|
+
| `nonegate` | `boolean` | `false` | Disable support for negating with leading `!` |
|
476
|
+
| `noquantifiers` | `boolean` | `false` | Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded. |
|
477
|
+
| [onIgnore](#optionsonIgnore) | `function` | `undefined` | Function to be called on ignored items. |
|
478
|
+
| [onMatch](#optionsonMatch) | `function` | `undefined` | Function to be called on matched items. |
|
479
|
+
| [onResult](#optionsonResult) | `function` | `undefined` | Function to be called on all items, regardless of whether or not they are matched or ignored. |
|
480
|
+
| `posix` | `boolean` | `false` | Support [POSIX character classes](#posix-bracket-expressions) ("posix brackets"). |
|
481
|
+
| `posixSlashes` | `boolean` | `undefined` | Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself |
|
482
|
+
| `prepend` | `boolean` | `undefined` | String to prepend to the generated regex used for matching. |
|
483
|
+
| `regex` | `boolean` | `false` | Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`). |
|
484
|
+
| `strictBrackets` | `boolean` | `undefined` | Throw an error if brackets, braces, or parens are imbalanced. |
|
485
|
+
| `strictSlashes` | `boolean` | `undefined` | When true, picomatch won't match trailing slashes with single stars. |
|
486
|
+
| `unescape` | `boolean` | `undefined` | Remove preceding backslashes from escaped glob characters before creating the regular expression to perform matches. |
|
487
|
+
| `unixify` | `boolean` | `undefined` | Alias for `posixSlashes`, for backwards compatitibility. |
|
488
|
+
|
489
|
+
## Options Examples
|
604
490
|
|
605
491
|
### options.basename
|
606
492
|
|
@@ -613,16 +499,16 @@ Allow glob patterns without slashes to match a file path based on its basename.
|
|
613
499
|
**Example**
|
614
500
|
|
615
501
|
```js
|
616
|
-
|
502
|
+
micromatch(['a/b.js', 'a/c.md'], '*.js');
|
617
503
|
//=> []
|
618
504
|
|
619
|
-
|
505
|
+
micromatch(['a/b.js', 'a/c.md'], '*.js', { basename: true });
|
620
506
|
//=> ['a/b.js']
|
621
507
|
```
|
622
508
|
|
623
509
|
### options.bash
|
624
510
|
|
625
|
-
Enabled by default, this option enforces bash-like behavior with stars immediately following a bracket expression. Bash bracket expressions are similar to regex character classes, but unlike regex, a star following a bracket expression **does not repeat the bracketed characters**. Instead, the star is treated the same as
|
511
|
+
Enabled by default, this option enforces bash-like behavior with stars immediately following a bracket expression. Bash bracket expressions are similar to regex character classes, but unlike regex, a star following a bracket expression **does not repeat the bracketed characters**. Instead, the star is treated the same as any other star.
|
626
512
|
|
627
513
|
**Type**: `Boolean`
|
628
514
|
|
@@ -631,90 +517,83 @@ Enabled by default, this option enforces bash-like behavior with stars immediate
|
|
631
517
|
**Example**
|
632
518
|
|
633
519
|
```js
|
634
|
-
|
635
|
-
console.log(
|
520
|
+
const files = ['abc', 'ajz'];
|
521
|
+
console.log(micromatch(files, '[a-c]*'));
|
636
522
|
//=> ['abc', 'ajz']
|
637
523
|
|
638
|
-
console.log(
|
524
|
+
console.log(micromatch(files, '[a-c]*', { bash: false }));
|
639
525
|
```
|
640
526
|
|
641
|
-
### options.
|
527
|
+
### options.expandRange
|
642
528
|
|
643
|
-
|
644
|
-
|
645
|
-
**Type**: `Boolean`
|
529
|
+
**Type**: `function`
|
646
530
|
|
647
531
|
**Default**: `undefined`
|
648
532
|
|
649
|
-
|
650
|
-
|
651
|
-
Match dotfiles. Same behavior as [minimatch](https://github.com/isaacs/minimatch) option `dot`.
|
652
|
-
|
653
|
-
**Type**: `Boolean`
|
654
|
-
|
655
|
-
**Default**: `false`
|
656
|
-
|
657
|
-
### options.failglob
|
533
|
+
Custom function for expanding ranges in brace patterns. The [fill-range](https://github.com/jonschlinkert/fill-range) library is ideal for this purpose, or you can use custom code to do whatever you need.
|
658
534
|
|
659
|
-
|
660
|
-
|
661
|
-
**Type**: `Boolean`
|
662
|
-
|
663
|
-
**Default**: `undefined`
|
664
|
-
|
665
|
-
### options.ignore
|
666
|
-
|
667
|
-
String or array of glob patterns to match files to ignore.
|
535
|
+
**Example**
|
668
536
|
|
669
|
-
|
537
|
+
The following example shows how to create a glob that matches a numeric folder name between `01` and `25`, with leading zeros.
|
670
538
|
|
671
|
-
|
539
|
+
```js
|
540
|
+
const fill = require('fill-range');
|
541
|
+
const regex = micromatch.makeRe('foo/{01..25}/bar', {
|
542
|
+
expandRange(a, b) {
|
543
|
+
return `(${fill(a, b, { toRegex: true })})`;
|
544
|
+
}
|
545
|
+
});
|
672
546
|
|
673
|
-
|
547
|
+
console.log(regex)
|
548
|
+
//=> /^(?:foo\/((?:0[1-9]|1[0-9]|2[0-5]))\/bar)$/
|
674
549
|
|
675
|
-
|
550
|
+
console.log(regex.test('foo/00/bar')) // false
|
551
|
+
console.log(regex.test('foo/01/bar')) // true
|
552
|
+
console.log(regex.test('foo/10/bar')) // true
|
553
|
+
console.log(regex.test('foo/22/bar')) // true
|
554
|
+
console.log(regex.test('foo/25/bar')) // true
|
555
|
+
console.log(regex.test('foo/26/bar')) // false
|
556
|
+
```
|
676
557
|
|
677
|
-
### options.
|
558
|
+
### options.format
|
678
559
|
|
679
|
-
|
680
|
-
|
681
|
-
**Type**: `Boolean`
|
560
|
+
**Type**: `function`
|
682
561
|
|
683
562
|
**Default**: `undefined`
|
684
563
|
|
685
|
-
|
686
|
-
|
687
|
-
### options.nocase
|
564
|
+
Custom function for formatting strings before they're matched.
|
688
565
|
|
689
|
-
|
690
|
-
|
691
|
-
**Type**: `Boolean`
|
566
|
+
**Example**
|
692
567
|
|
693
|
-
|
568
|
+
```js
|
569
|
+
// strip leading './' from strings
|
570
|
+
const format = str => str.replace(/^\.\//, '');
|
571
|
+
const isMatch = picomatch('foo/*.js', { format });
|
572
|
+
console.log(isMatch('./foo/bar.js')) //=> true
|
573
|
+
```
|
694
574
|
|
695
|
-
### options.
|
575
|
+
### options.ignore
|
696
576
|
|
697
|
-
|
577
|
+
String or array of glob patterns to match files to ignore.
|
698
578
|
|
699
|
-
**Type**: `
|
579
|
+
**Type**: `String|Array`
|
700
580
|
|
701
581
|
**Default**: `undefined`
|
702
582
|
|
703
|
-
**Example**
|
704
|
-
|
705
|
-
Example of using the `unescape` and `nodupes` options together:
|
706
|
-
|
707
583
|
```js
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
//=> ['abc']
|
584
|
+
const isMatch = micromatch.matcher('*', { ignore: 'f*' });
|
585
|
+
console.log(isMatch('foo')) //=> false
|
586
|
+
console.log(isMatch('bar')) //=> true
|
587
|
+
console.log(isMatch('baz')) //=> true
|
713
588
|
```
|
714
589
|
|
715
|
-
### options.
|
590
|
+
### options.matchBase
|
591
|
+
|
592
|
+
Alias for [options.basename](#options-basename).
|
593
|
+
|
594
|
+
### options.noextglob
|
716
595
|
|
717
|
-
Disable extglob support, so that extglobs are regarded as literal characters.
|
596
|
+
Disable extglob support, so that [extglobs](#extglobs) are regarded as literal characters.
|
718
597
|
|
719
598
|
**Type**: `Boolean`
|
720
599
|
|
@@ -723,10 +602,10 @@ Disable extglob support, so that extglobs are regarded as literal characters.
|
|
723
602
|
**Examples**
|
724
603
|
|
725
604
|
```js
|
726
|
-
|
605
|
+
console.log(micromatch(['a/z', 'a/b', 'a/!(z)'], 'a/!(z)'));
|
727
606
|
//=> ['a/b', 'a/!(z)']
|
728
607
|
|
729
|
-
|
608
|
+
console.log(micromatch(['a/z', 'a/b', 'a/!(z)'], 'a/!(z)', { noextglob: true }));
|
730
609
|
//=> ['a/!(z)'] (matches only as literal characters)
|
731
610
|
```
|
732
611
|
|
@@ -747,10 +626,10 @@ Disable matching with globstars (`**`).
|
|
747
626
|
**Default**: `undefined`
|
748
627
|
|
749
628
|
```js
|
750
|
-
|
629
|
+
micromatch(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**');
|
751
630
|
//=> ['a/b', 'a/b/c', 'a/b/c/d']
|
752
631
|
|
753
|
-
|
632
|
+
micromatch(['a/b', 'a/b/c', 'a/b/c/d'], 'a/**', {noglobstar: true});
|
754
633
|
//=> ['a/b']
|
755
634
|
```
|
756
635
|
|
@@ -766,100 +645,99 @@ If `true`, when no matches are found the actual (arrayified) glob pattern is ret
|
|
766
645
|
|
767
646
|
**Default**: `undefined`
|
768
647
|
|
769
|
-
### options.
|
648
|
+
### options.onIgnore
|
770
649
|
|
771
|
-
|
650
|
+
```js
|
651
|
+
const onIgnore = ({ glob, regex, input, output }) => {
|
652
|
+
console.log({ glob, regex, input, output });
|
653
|
+
// { glob: '*', regex: /^(?:(?!\.)(?=.)[^\/]*?\/?)$/, input: 'foo', output: 'foo' }
|
654
|
+
};
|
772
655
|
|
773
|
-
|
656
|
+
const isMatch = micromatch.matcher('*', { onIgnore, ignore: 'f*' });
|
657
|
+
isMatch('foo');
|
658
|
+
isMatch('bar');
|
659
|
+
isMatch('baz');
|
660
|
+
```
|
774
661
|
|
775
|
-
|
662
|
+
### options.onMatch
|
776
663
|
|
777
|
-
|
664
|
+
```js
|
665
|
+
const onMatch = ({ glob, regex, input, output }) => {
|
666
|
+
console.log({ input, output });
|
667
|
+
// { input: 'some\\path', output: 'some/path' }
|
668
|
+
// { input: 'some\\path', output: 'some/path' }
|
669
|
+
// { input: 'some\\path', output: 'some/path' }
|
670
|
+
};
|
778
671
|
|
779
|
-
|
672
|
+
const isMatch = micromatch.matcher('**', { onMatch, posixSlashes: true });
|
673
|
+
isMatch('some\\path');
|
674
|
+
isMatch('some\\path');
|
675
|
+
isMatch('some\\path');
|
676
|
+
```
|
780
677
|
|
781
|
-
|
678
|
+
### options.onResult
|
782
679
|
|
783
|
-
|
680
|
+
```js
|
681
|
+
const onResult = ({ glob, regex, input, output }) => {
|
682
|
+
console.log({ glob, regex, input, output });
|
683
|
+
};
|
784
684
|
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
var res = mm.create('abc/*.js', {sourcemap: true});
|
790
|
-
console.log(res.map);
|
791
|
-
// { version: 3,
|
792
|
-
// sources: [ 'string' ],
|
793
|
-
// names: [],
|
794
|
-
// mappings: 'AAAA,GAAG,EAAC,iBAAC,EAAC,EAAE',
|
795
|
-
// sourcesContent: [ 'abc/*.js' ] }
|
796
|
-
|
797
|
-
var ast = mm.parse('abc/**/*.js');
|
798
|
-
var res = mm.compile(ast, {sourcemap: true});
|
799
|
-
console.log(res.map);
|
800
|
-
// { version: 3,
|
801
|
-
// sources: [ 'string' ],
|
802
|
-
// names: [],
|
803
|
-
// mappings: 'AAAA,GAAG,EAAC,2BAAE,EAAC,iBAAC,EAAC,EAAE',
|
804
|
-
// sourcesContent: [ 'abc/**/*.js' ] }
|
805
|
-
|
806
|
-
var ast = mm.parse(pattern);
|
807
|
-
var res = mm.compile(ast, {sourcemap: true});
|
808
|
-
console.log(res.map);
|
809
|
-
// { version: 3,
|
810
|
-
// sources: [ 'string' ],
|
811
|
-
// names: [],
|
812
|
-
// mappings: 'AAAA,CAAE,CAAE,EAAE,CAAE,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC',
|
813
|
-
// sourcesContent: [ '*(*(of*(a)x)z)' ] }
|
685
|
+
const isMatch = micromatch('*', { onResult, ignore: 'f*' });
|
686
|
+
isMatch('foo');
|
687
|
+
isMatch('bar');
|
688
|
+
isMatch('baz');
|
814
689
|
```
|
815
690
|
|
816
|
-
### options.
|
691
|
+
### options.posixSlashes
|
817
692
|
|
818
|
-
|
693
|
+
Convert path separators on returned files to posix/unix-style forward slashes. Aliased as `unixify` for backwards compatibility.
|
819
694
|
|
820
695
|
**Type**: `Boolean`
|
821
696
|
|
822
|
-
**Default**: `
|
697
|
+
**Default**: `true` on windows, `false` everywhere else.
|
823
698
|
|
824
699
|
**Example**
|
825
700
|
|
826
|
-
In this example we want to match a literal `*`:
|
827
|
-
|
828
701
|
```js
|
829
|
-
|
830
|
-
//=> ['a
|
702
|
+
console.log(micromatch.match(['a\\b\\c'], 'a/**'));
|
703
|
+
//=> ['a/b/c']
|
831
704
|
|
832
|
-
|
833
|
-
//=> ['a
|
705
|
+
console.log(micromatch.match(['a\\b\\c'], { posixSlashes: false }));
|
706
|
+
//=> ['a\\b\\c']
|
834
707
|
```
|
835
708
|
|
836
|
-
### options.
|
709
|
+
### options.unescape
|
837
710
|
|
838
|
-
|
711
|
+
Remove backslashes from escaped glob characters before creating the regular expression to perform matches.
|
839
712
|
|
840
713
|
**Type**: `Boolean`
|
841
714
|
|
842
|
-
**Default**: `
|
715
|
+
**Default**: `undefined`
|
843
716
|
|
844
717
|
**Example**
|
845
718
|
|
719
|
+
In this example we want to match a literal `*`:
|
720
|
+
|
846
721
|
```js
|
847
|
-
|
848
|
-
//=> ['a
|
722
|
+
console.log(micromatch.match(['abc', 'a\\*c'], 'a\\*c'));
|
723
|
+
//=> ['a\\*c']
|
849
724
|
|
850
|
-
|
851
|
-
//=> ['a
|
725
|
+
console.log(micromatch.match(['abc', 'a\\*c'], 'a\\*c', { unescape: true }));
|
726
|
+
//=> ['a*c']
|
852
727
|
```
|
853
728
|
|
729
|
+
<br>
|
730
|
+
<br>
|
731
|
+
|
854
732
|
## Extended globbing
|
855
733
|
|
856
|
-
Micromatch
|
734
|
+
Micromatch supports the following extended globbing features.
|
857
735
|
|
858
|
-
###
|
736
|
+
### Extglobs
|
859
737
|
|
860
738
|
Extended globbing, as described by the bash man page:
|
861
739
|
|
862
|
-
| **pattern** | **regex equivalent** | **description** |
|
740
|
+
| **pattern** | **regex equivalent** | **description** |
|
863
741
|
| --- | --- | --- |
|
864
742
|
| `?(pattern)` | `(pattern)?` | Matches zero or one occurrence of the given patterns |
|
865
743
|
| `*(pattern)` | `(pattern)*` | Matches zero or more occurrences of the given patterns |
|
@@ -867,13 +745,15 @@ Extended globbing, as described by the bash man page:
|
|
867
745
|
| `@(pattern)` | `(pattern)` <sup>*</sup> | Matches one of the given patterns |
|
868
746
|
| `!(pattern)` | N/A (equivalent regex is much more complicated) | Matches anything except one of the given patterns |
|
869
747
|
|
870
|
-
<sup><strong>*</strong></sup> Note that `@` isn't a
|
748
|
+
<sup><strong>*</strong></sup> Note that `@` isn't a regex character.
|
871
749
|
|
872
|
-
|
750
|
+
### Braces
|
873
751
|
|
874
|
-
|
752
|
+
Brace patterns can be used to match specific ranges or sets of characters.
|
875
753
|
|
876
|
-
|
754
|
+
**Example**
|
755
|
+
|
756
|
+
The pattern `{f,b}*/{1..3}/{b,q}*` would match any of following strings:
|
877
757
|
|
878
758
|
```
|
879
759
|
foo/1/bar
|
@@ -886,7 +766,7 @@ baz/3/qux
|
|
886
766
|
|
887
767
|
Visit [braces](https://github.com/micromatch/braces) to see the full range of features and options related to brace expansion, or to create brace matching or expansion related issues.
|
888
768
|
|
889
|
-
###
|
769
|
+
### Regex character classes
|
890
770
|
|
891
771
|
Given the list: `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`:
|
892
772
|
|
@@ -897,7 +777,7 @@ Given the list: `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`:
|
|
897
777
|
|
898
778
|
Learn about [regex character classes](http://www.regular-expressions.info/charclass.html).
|
899
779
|
|
900
|
-
###
|
780
|
+
### Regex groups
|
901
781
|
|
902
782
|
Given `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`:
|
903
783
|
|
@@ -914,15 +794,10 @@ POSIX brackets are intended to be more user-friendly than regex character classe
|
|
914
794
|
**Example**
|
915
795
|
|
916
796
|
```js
|
917
|
-
|
918
|
-
//=>
|
919
|
-
|
920
|
-
mm.isMatch('a1', '[[:alpha:][:alpha:]]');
|
921
|
-
//=> false
|
797
|
+
console.log(micromatch.isMatch('a1', '[[:alpha:][:digit:]]')) //=> true
|
798
|
+
console.log(micromatch.isMatch('a1', '[[:alpha:][:alpha:]]')) //=> false
|
922
799
|
```
|
923
800
|
|
924
|
-
See [expand-brackets](https://github.com/jonschlinkert/expand-brackets) for more information about bracket expressions.
|
925
|
-
|
926
801
|
***
|
927
802
|
|
928
803
|
## Notes
|
@@ -937,13 +812,13 @@ However, it's suprising how many edge cases and rabbit holes there are with glob
|
|
937
812
|
|
938
813
|
There is an important, notable difference between minimatch and micromatch _in regards to how backslashes are handled_ in glob patterns.
|
939
814
|
|
940
|
-
* Micromatch exclusively and explicitly reserves backslashes for escaping characters in a glob pattern, even on windows
|
815
|
+
* Micromatch exclusively and explicitly reserves backslashes for escaping characters in a glob pattern, even on windows, which is consistent with bash behavior. _More importantly, unescaping globs can result in unsafe regular expressions_.
|
941
816
|
* Minimatch converts all backslashes to forward slashes, which means you can't use backslashes to escape any characters in your glob patterns.
|
942
817
|
|
943
818
|
We made this decision for micromatch for a couple of reasons:
|
944
819
|
|
945
|
-
*
|
946
|
-
*
|
820
|
+
* Consistency with bash conventions.
|
821
|
+
* Glob patterns are not filepaths. They are a type of [regular language](https://en.wikipedia.org/wiki/Regular_language) that is converted to a JavaScript regular expression. Thus, when forward slashes are defined in a glob pattern, the resulting regular expression will match windows or POSIX path separators just fine.
|
947
822
|
|
948
823
|
**A note about joining paths to globs**
|
949
824
|
|
@@ -951,122 +826,94 @@ Note that when you pass something like `path.join('foo', '*')` to micromatch, yo
|
|
951
826
|
|
952
827
|
In other words, since `\\` is reserved as an escape character in globs, on windows `path.join('foo', '*')` would result in `foo\\*`, which tells micromatch to match `*` as a literal character. This is the same behavior as bash.
|
953
828
|
|
954
|
-
|
955
|
-
|
956
|
-
All contributions are welcome! Please read [the contributing guide](.github/contributing.md) to get started.
|
957
|
-
|
958
|
-
**Bug reports**
|
959
|
-
|
960
|
-
Please create an issue if you encounter a bug or matching behavior that doesn't seem correct. If you find a matching-related issue, please:
|
961
|
-
|
962
|
-
* [research existing issues first](../../issues) (open and closed)
|
963
|
-
* visit the [GNU Bash documentation](https://www.gnu.org/software/bash/manual/) to see how Bash deals with the pattern
|
964
|
-
* visit the [minimatch](https://github.com/isaacs/minimatch) documentation to cross-check expected behavior in node.js
|
965
|
-
* if all else fails, since there is no real specification for globs we will probably need to discuss expected behavior and decide how to resolve it. which means any detail you can provide to help with this discussion would be greatly appreciated.
|
966
|
-
|
967
|
-
**Platform issues**
|
968
|
-
|
969
|
-
It's important to us that micromatch work consistently on all platforms. If you encounter any platform-specific matching or path related issues, please let us know (pull requests are also greatly appreciated).
|
829
|
+
To solve this, you might be inspired to do something like `'foo\\*'.replace(/\\/g, '/')`, but this causes another, potentially much more serious, problem.
|
970
830
|
|
971
831
|
## Benchmarks
|
972
832
|
|
973
833
|
### Running benchmarks
|
974
834
|
|
975
|
-
Install
|
835
|
+
Install dependencies for running benchmarks:
|
976
836
|
|
977
|
-
```
|
978
|
-
|
837
|
+
```sh
|
838
|
+
$ cd bench && npm install
|
979
839
|
```
|
980
840
|
|
981
|
-
|
982
|
-
|
983
|
-
As of February 18, 2018 (longer bars are better):
|
841
|
+
Run the benchmarks:
|
984
842
|
|
985
843
|
```sh
|
986
|
-
|
987
|
-
|
988
|
-
minimatch █ (18.92 ops/sec ±0.54%)
|
989
|
-
multimatch █ (18.94 ops/sec ±0.62%)
|
990
|
-
|
991
|
-
micromatch is faster by an avg. of 2,733%
|
992
|
-
|
993
|
-
# braces-multiple (3362 bytes)
|
994
|
-
micromatch ██████████████████████████████████████████████████ (33,625 ops/sec ±0.45%)
|
995
|
-
minimatch (2.92 ops/sec ±3.26%)
|
996
|
-
multimatch (2.90 ops/sec ±2.76%)
|
844
|
+
$ npm run bench
|
845
|
+
```
|
997
846
|
|
998
|
-
|
847
|
+
### Latest results
|
999
848
|
|
1000
|
-
|
1001
|
-
micromatch █████████████████████████████████████████████████ (155,220 ops/sec ±0.56%)
|
1002
|
-
minimatch ██████ (20,186 ops/sec ±1.27%)
|
1003
|
-
multimatch ██████ (19,809 ops/sec ±0.60%)
|
849
|
+
As of April 10, 2019 (longer bars are better):
|
1004
850
|
|
1005
|
-
|
851
|
+
```sh
|
852
|
+
# .makeRe star
|
853
|
+
micromatch x 1,724,735 ops/sec ±1.69% (87 runs sampled))
|
854
|
+
minimatch x 649,565 ops/sec ±1.93% (91 runs sampled)
|
1006
855
|
|
1007
|
-
#
|
1008
|
-
micromatch
|
1009
|
-
minimatch
|
1010
|
-
multimatch ████ (2,431 ops/sec ±1.25%)
|
856
|
+
# .makeRe star; dot=true
|
857
|
+
micromatch x 1,302,127 ops/sec ±1.43% (92 runs sampled)
|
858
|
+
minimatch x 556,242 ops/sec ±0.71% (86 runs sampled)
|
1011
859
|
|
1012
|
-
|
860
|
+
# .makeRe globstar
|
861
|
+
micromatch x 1,393,992 ops/sec ±0.71% (89 runs sampled)
|
862
|
+
minimatch x 1,112,801 ops/sec ±2.02% (91 runs sampled)
|
1013
863
|
|
1014
|
-
#
|
1015
|
-
micromatch
|
1016
|
-
minimatch
|
1017
|
-
multimatch ███ (33.19 ops/sec ±1.35%)
|
864
|
+
# .makeRe globstars
|
865
|
+
micromatch x 1,419,097 ops/sec ±0.34% (94 runs sampled)
|
866
|
+
minimatch x 541,207 ops/sec ±1.66% (93 runs sampled)
|
1018
867
|
|
1019
|
-
|
868
|
+
# .makeRe with leading star
|
869
|
+
micromatch x 1,247,825 ops/sec ±0.97% (94 runs sampled)
|
870
|
+
minimatch x 489,660 ops/sec ±0.63% (94 runs sampled)
|
1020
871
|
|
1021
|
-
#
|
1022
|
-
micromatch
|
1023
|
-
minimatch
|
1024
|
-
multimatch ████████████████ (862 ops/sec ±0.84%)
|
872
|
+
# .makeRe - braces
|
873
|
+
micromatch x 206,301 ops/sec ±1.62% (81 runs sampled))
|
874
|
+
minimatch x 115,986 ops/sec ±0.59% (94 runs sampled)
|
1025
875
|
|
1026
|
-
|
876
|
+
# .makeRe braces - range (expanded)
|
877
|
+
micromatch x 27,782 ops/sec ±0.79% (88 runs sampled)
|
878
|
+
minimatch x 4,683 ops/sec ±1.20% (92 runs sampled)
|
1027
879
|
|
1028
|
-
#
|
1029
|
-
micromatch
|
1030
|
-
minimatch
|
1031
|
-
multimatch ████████ (57,991 ops/sec ±2.11%)
|
880
|
+
# .makeRe braces - range (compiled)
|
881
|
+
micromatch x 134,056 ops/sec ±2.73% (77 runs sampled))
|
882
|
+
minimatch x 977 ops/sec ±0.85% (91 runs sampled)d)
|
1032
883
|
|
1033
|
-
|
884
|
+
# .makeRe braces - nested ranges (expanded)
|
885
|
+
micromatch x 18,353 ops/sec ±0.95% (91 runs sampled)
|
886
|
+
minimatch x 4,514 ops/sec ±1.04% (93 runs sampled)
|
1034
887
|
|
1035
|
-
#
|
1036
|
-
micromatch
|
1037
|
-
minimatch
|
1038
|
-
multimatch █████████ (81,958 ops/sec ±2.13%)
|
888
|
+
# .makeRe braces - nested ranges (compiled)
|
889
|
+
micromatch x 38,916 ops/sec ±1.85% (82 runs sampled)
|
890
|
+
minimatch x 980 ops/sec ±0.54% (93 runs sampled)d)
|
1039
891
|
|
1040
|
-
|
892
|
+
# .makeRe braces - set (compiled)
|
893
|
+
micromatch x 141,088 ops/sec ±1.70% (70 runs sampled))
|
894
|
+
minimatch x 43,385 ops/sec ±0.87% (93 runs sampled)
|
1041
895
|
|
1042
|
-
#
|
1043
|
-
micromatch
|
1044
|
-
minimatch
|
1045
|
-
|
896
|
+
# .makeRe braces - nested sets (compiled)
|
897
|
+
micromatch x 87,272 ops/sec ±2.85% (71 runs sampled))
|
898
|
+
minimatch x 25,327 ops/sec ±1.59% (86 runs sampled)
|
899
|
+
```
|
1046
900
|
|
1047
|
-
|
901
|
+
## Contributing
|
1048
902
|
|
1049
|
-
|
1050
|
-
micromatch ██████████████████████████████████████████████████ (269,552 ops/sec ±0.70%)
|
1051
|
-
minimatch ██████████████████████ (122,457 ops/sec ±1.39%)
|
1052
|
-
multimatch ████████████████████ (110,788 ops/sec ±1.99%)
|
903
|
+
All contributions are welcome! Please read [the contributing guide](.github/contributing.md) to get started.
|
1053
904
|
|
1054
|
-
|
905
|
+
**Bug reports**
|
1055
906
|
|
1056
|
-
|
1057
|
-
micromatch █████████████████████████████████████████████████ (3,806 ops/sec ±0.38%)
|
1058
|
-
minimatch ████████████████████████████ (2,204 ops/sec ±0.32%)
|
1059
|
-
multimatch ██████████████████████████ (2,020 ops/sec ±1.07%)
|
907
|
+
Please create an issue if you encounter a bug or matching behavior that doesn't seem correct. If you find a matching-related issue, please:
|
1060
908
|
|
1061
|
-
|
909
|
+
* [research existing issues first](../../issues) (open and closed)
|
910
|
+
* visit the [GNU Bash documentation](https://www.gnu.org/software/bash/manual/) to see how Bash deals with the pattern
|
911
|
+
* visit the [minimatch](https://github.com/isaacs/minimatch) documentation to cross-check expected behavior in node.js
|
912
|
+
* if all else fails, since there is no real specification for globs we will probably need to discuss expected behavior and decide how to resolve it. which means any detail you can provide to help with this discussion would be greatly appreciated.
|
1062
913
|
|
1063
|
-
|
1064
|
-
micromatch ██████████████████████████████████████████████████ (249,077 ops/sec ±0.40%)
|
1065
|
-
minimatch ███████████ (59,431 ops/sec ±1.67%)
|
1066
|
-
multimatch ███████████ (55,569 ops/sec ±1.43%)
|
914
|
+
**Platform issues**
|
1067
915
|
|
1068
|
-
|
1069
|
-
```
|
916
|
+
It's important to us that micromatch work consistently on all platforms. If you encounter any platform-specific matching or path related issues, please let us know (pull requests are also greatly appreciated).
|
1070
917
|
|
1071
918
|
## About
|
1072
919
|
|
@@ -1108,43 +955,46 @@ $ npm install -g verbose/verb#dev verb-generate-readme && verb
|
|
1108
955
|
You might also be interested in these projects:
|
1109
956
|
|
1110
957
|
* [braces](https://www.npmjs.com/package/braces): Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support… [more](https://github.com/micromatch/braces) | [homepage](https://github.com/micromatch/braces "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.")
|
1111
|
-
* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/
|
958
|
+
* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/micromatch/expand-brackets "Expand POSIX bracket expressions (character classes) in glob patterns.")
|
1112
959
|
* [extglob](https://www.npmjs.com/package/extglob): Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob… [more](https://github.com/micromatch/extglob) | [homepage](https://github.com/micromatch/extglob "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.")
|
1113
960
|
* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`")
|
1114
961
|
* [nanomatch](https://www.npmjs.com/package/nanomatch): Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash… [more](https://github.com/micromatch/nanomatch) | [homepage](https://github.com/micromatch/nanomatch "Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.3 wildcard support only (no support for exglobs, posix brackets or braces)")
|
1115
962
|
|
1116
963
|
### Contributors
|
1117
964
|
|
1118
|
-
| **Commits** | **Contributor** |
|
1119
|
-
| --- | --- |
|
1120
|
-
|
|
1121
|
-
| 12
|
1122
|
-
| 8
|
1123
|
-
| 3
|
1124
|
-
| 2
|
1125
|
-
| 2
|
1126
|
-
| 2
|
1127
|
-
|
|
1128
|
-
| 1
|
1129
|
-
| 1
|
1130
|
-
| 1
|
1131
|
-
| 1
|
1132
|
-
| 1
|
1133
|
-
| 1
|
965
|
+
| **Commits** | **Contributor** |
|
966
|
+
| --- | --- |
|
967
|
+
| 475 | [jonschlinkert](https://github.com/jonschlinkert) |
|
968
|
+
| 12 | [es128](https://github.com/es128) |
|
969
|
+
| 8 | [doowb](https://github.com/doowb) |
|
970
|
+
| 3 | [paulmillr](https://github.com/paulmillr) |
|
971
|
+
| 2 | [TrySound](https://github.com/TrySound) |
|
972
|
+
| 2 | [MartinKolarik](https://github.com/MartinKolarik) |
|
973
|
+
| 2 | [Tvrqvoise](https://github.com/Tvrqvoise) |
|
974
|
+
| 2 | [tunnckoCore](https://github.com/tunnckoCore) |
|
975
|
+
| 1 | [amilajack](https://github.com/amilajack) |
|
976
|
+
| 1 | [mrmlnc](https://github.com/mrmlnc) |
|
977
|
+
| 1 | [devongovett](https://github.com/devongovett) |
|
978
|
+
| 1 | [DianeLooney](https://github.com/DianeLooney) |
|
979
|
+
| 1 | [UltCombo](https://github.com/UltCombo) |
|
980
|
+
| 1 | [tomByrer](https://github.com/tomByrer) |
|
981
|
+
| 1 | [fidian](https://github.com/fidian) |
|
982
|
+
| 1 | [simlu](https://github.com/simlu) |
|
983
|
+
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
|
1134
984
|
|
1135
985
|
### Author
|
1136
986
|
|
1137
987
|
**Jon Schlinkert**
|
1138
988
|
|
1139
|
-
* [
|
1140
|
-
* [
|
1141
|
-
* [
|
989
|
+
* [GitHub Profile](https://github.com/jonschlinkert)
|
990
|
+
* [Twitter Profile](https://twitter.com/jonschlinkert)
|
991
|
+
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
|
1142
992
|
|
1143
993
|
### License
|
1144
994
|
|
1145
|
-
Copyright ©
|
995
|
+
Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert).
|
1146
996
|
Released under the [MIT License](LICENSE).
|
1147
997
|
|
1148
998
|
***
|
1149
999
|
|
1150
|
-
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.
|
1000
|
+
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 10, 2019._
|