0db417d018679052d51ca3878dab54fa30053a4fac98ed88f0639737d6eb7883b9164808ea81a247a8144f18f5fc3fcaaf5aaf0ae7cb33464f8308303589b3 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689
  1. # micromatch [![NPM version](https://img.shields.io/npm/v/micromatch.svg?style=flat)](https://www.npmjs.com/package/micromatch) [![NPM downloads](https://img.shields.io/npm/dm/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![Build Status](https://img.shields.io/travis/jonschlinkert/micromatch.svg?style=flat)](https://travis-ci.org/jonschlinkert/micromatch)
  2. > Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.
  3. Micromatch supports all of the same matching features as [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch).
  4. * [mm()](#usage) is the same as [multimatch()](https://github.com/sindresorhus/multimatch)
  5. * [mm.match()](#match) is the same as [minimatch.match()](https://github.com/isaacs/minimatch)
  6. * use [mm.isMatch()](#ismatch) instead of [minimatch()](https://github.com/isaacs/minimatch)
  7. ## Install
  8. Install with [npm](https://www.npmjs.com/):
  9. ```sh
  10. $ npm install --save micromatch
  11. ```
  12. ## Start matching!
  13. ```js
  14. var mm = require('micromatch');
  15. console.log(mm(['']))
  16. ```
  17. ***
  18. ### Features
  19. * [Drop-in replacement](#switch-from-minimatch) for [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch)
  20. * Built-in support for multiple glob patterns, like `['foo/*.js', '!bar.js']`
  21. * [Brace Expansion](https://github.com/jonschlinkert/braces) (`foo/bar-{1..5}.md`, `one/{two,three}/four.md`)
  22. * Typical glob patterns, like `**/*`, `a/b/*.js`, or `['foo/*.js', '!bar.js']`
  23. * Methods like `.isMatch()`, `.contains()` and `.any()`
  24. **Extended globbing features:**
  25. * Logical `OR` (`foo/bar/(abc|xyz).js`)
  26. * Regex character classes (`foo/bar/baz-[1-5].js`)
  27. * POSIX [bracket expressions](https://github.com/jonschlinkert/expand-brackets) (`**/[[:alpha:][:digit:]]/`)
  28. * [extglobs](https://github.com/jonschlinkert/extglob) (`**/+(x|y)`, `!(a|b)`, etc).
  29. You can combine these to create whatever matching patterns you need.
  30. **Example**
  31. ```js
  32. // double-negation!
  33. mm(['fa', 'fb', 'f', 'fo'], '!(f!(o))');
  34. //=> ['fo']
  35. ```
  36. ## Why switch to micromatch?
  37. * Native support for multiple glob patterns, no need for wrappers like [multimatch](https://github.com/sindresorhus/multimatch)
  38. * [10-55x faster](#benchmarks) and more performant than [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch). This is achieved through a combination of caching and regex optimization strategies, a fundamentally different approach than minimatch.
  39. * More extensive support for the Bash 4.3 specification
  40. * More complete extglob support
  41. * Extensive [unit tests](./test) (approx. 1,300 tests). Minimatch fails many of the tests.
  42. ### Switch from minimatch
  43. Use `mm.isMatch()` instead of `minimatch()`:
  44. ```js
  45. mm.isMatch('foo', 'b*');
  46. //=> false
  47. ```
  48. Use `mm.match()` instead of `minimatch.match()`:
  49. ```js
  50. mm.match(['foo', 'bar'], 'b*');
  51. //=> 'bar'
  52. ```
  53. ### Switch from multimatch
  54. Same signature:
  55. ```js
  56. mm(['foo', 'bar', 'baz'], ['f*', '*z']);
  57. //=> ['foo', 'baz']
  58. ```
  59. ***
  60. ## Usage
  61. Add micromatch to your node.js project:
  62. ```js
  63. var mm = require('micromatch');
  64. ```
  65. **Signature**
  66. ```js
  67. mm(array_of_strings, glob_patterns[, options]);
  68. ```
  69. **Example**
  70. ```js
  71. mm(['foo', 'bar', 'baz'], 'b*');
  72. //=> ['bar', 'baz']
  73. ```
  74. ### Usage examples
  75. **Brace expansion**
  76. Match files with `.js` or `.txt` extensions.
  77. ```js
  78. mm(['a.js', 'b.md', 'c.txt'], '*.{js,txt}');
  79. //=> ['a.js', 'c.txt']
  80. ```
  81. **Extglobs**
  82. Match anything except for files with the `.md` extension.
  83. ```js
  84. mm(files, '**/*.!(md)');
  85. //=> ['a.js', 'c.txt']
  86. ```
  87. **Multiple patterns**
  88. Match using an array of patterns.
  89. ```js
  90. mm(['a.md', 'b.js', 'c.txt', 'd.json'], ['*.md', '*.txt']);
  91. //=> ['a.md', 'c.txt']
  92. ```
  93. **Negation patterns:**
  94. Behavior is designed to be what users would expect, based on conventions that are already well-established.
  95. * [minimatch](https://github.com/isaacs/minimatch) behavior is used when the pattern is a string, so patterns are **inclusive by default**.
  96. * [multimatch](https://github.com/sindresorhus/multimatch) behavior is used when an array of patterns is passed, so patterns are **exclusive by default**.
  97. ```js
  98. mm(['a.js', 'b.md', 'c.txt'], '!*.{js,txt}');
  99. //=> ['b.md']
  100. mm(['a.md', 'b.js', 'c.txt', 'd.json'], ['*.*', '!*.{js,txt}']);
  101. //=> ['a.md', 'd.json']
  102. ```
  103. ***
  104. ## API methods
  105. ```js
  106. var mm = require('micromatch');
  107. ```
  108. ### .match
  109. ```js
  110. mm.match(array, globString);
  111. ```
  112. Return an array of files that match the given glob pattern. Useful if you only need to use a single glob pattern.
  113. **Example**
  114. ```js
  115. mm.match(['ab', 'a/b', 'bb', 'b/c'], '?b');
  116. //=> ['ab', 'bb']
  117. mm.match(['ab', 'a/b', 'bb', 'b/c'], '*/b');
  118. //=> ['a/b']
  119. ```
  120. ### .isMatch
  121. ```js
  122. mm.isMatch(filepath, globString);
  123. ```
  124. Returns true if a file path matches the given glob pattern.
  125. **Example**
  126. ```js
  127. mm.isMatch('.verb.md', '*.md');
  128. //=> false
  129. mm.isMatch('.verb.md', '*.md', {dot: true});
  130. //=> true
  131. ```
  132. ### .contains
  133. Returns true if any part of a file path matches the given glob pattern. Think of this is "has path" versus "is path".
  134. **Example**
  135. `.isMatch()` would return false for both of the following:
  136. ```js
  137. mm.contains('a/b/c', 'a/b');
  138. //=> true
  139. mm.contains('a/b/c', 'a/*');
  140. //=> true
  141. ```
  142. ### .matcher
  143. Returns a function for matching using the supplied pattern. e.g. create your own "matcher". The advantage of this method is that the pattern can be compiled outside of a loop.
  144. **Pattern**
  145. Can be any of the following:
  146. * `glob/string`
  147. * `regex`
  148. * `function`
  149. **Example**
  150. ```js
  151. var isMatch = mm.matcher('*.md');
  152. var files = [];
  153. ['a.md', 'b.txt', 'c.md'].forEach(function(fp) {
  154. if (isMatch(fp)) {
  155. files.push(fp);
  156. }
  157. });
  158. ```
  159. ### .filter
  160. Returns a function that can be passed to `Array#filter()`.
  161. **Params**
  162. * `patterns` **{String|Array}**:
  163. **Examples**
  164. Single glob:
  165. ```js
  166. var fn = mm.filter('*.md');
  167. ['a.js', 'b.txt', 'c.md'].filter(fn);
  168. //=> ['c.md']
  169. var fn = mm.filter('[a-c]');
  170. ['a', 'b', 'c', 'd', 'e'].filter(fn);
  171. //=> ['a', 'b', 'c']
  172. ```
  173. Array of glob patterns:
  174. ```js
  175. var arr = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15];
  176. var fn = mm.filter(['{1..10}', '![7-9]', '!{3..4}']);
  177. arr.filter(fn);
  178. //=> [1, 2, 5, 6, 10]
  179. ```
  180. _(Internally this function generates the matching function by using the [matcher](#matcher) method. You can use the [matcher](#matcher) method directly to create your own filter function)_
  181. ### .any
  182. Returns true if a file path matches any of the given patterns.
  183. ```js
  184. mm.any(filepath, patterns, options);
  185. ```
  186. **Params**
  187. * filepath `{String}`: The file path to test.
  188. * patterns `{String|Array}`: One or more glob patterns
  189. * options: `{Object}`: options to pass to the `.matcher()` method.
  190. **Example**
  191. ```js
  192. mm.any('abc', ['!*z']);
  193. //=> true
  194. mm.any('abc', ['a*', 'z*']);
  195. //=> true
  196. mm.any('abc', 'a*');
  197. //=> true
  198. mm.any('abc', ['z*']);
  199. //=> false
  200. ```
  201. ### .expand
  202. Returns an object with a regex-compatible string and tokens.
  203. ```js
  204. mm.expand('*.js');
  205. // when `track` is enabled (for debugging), the `history` array is used
  206. // to record each mutation to the glob pattern as it's converted to regex
  207. { options: { track: false, dot: undefined, makeRe: true, negated: false },
  208. pattern: '(.*\\/|^)bar\\/(?:(?!(?:^|\\/)\\.).)*?',
  209. history: [],
  210. tokens:
  211. { path:
  212. { whole: '**/bar/**',
  213. dirname: '**/bar/',
  214. filename: '**',
  215. basename: '**',
  216. extname: '',
  217. ext: '' },
  218. is:
  219. { glob: true,
  220. negated: false,
  221. globstar: true,
  222. dotfile: false,
  223. dotdir: false },
  224. match: {},
  225. original: '**/bar/**',
  226. pattern: '**/bar/**',
  227. base: '' } }
  228. ```
  229. ### .makeRe
  230. Create a regular expression for matching file paths based on the given pattern:
  231. ```js
  232. mm.makeRe('*.js');
  233. //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
  234. ```
  235. ## Options
  236. ### options.unixify
  237. Normalize slashes in file paths and glob patterns to forward slashes.
  238. Type: `{Boolean}`
  239. Default: `undefined` on non-windows, `true` on windows.
  240. ### options.dot
  241. Match dotfiles. Same behavior as [minimatch](https://github.com/isaacs/minimatch).
  242. Type: `{Boolean}`
  243. Default: `false`
  244. ### options.unescape
  245. Unescape slashes in glob patterns. Use cautiously, especially on windows.
  246. Type: `{Boolean}`
  247. Default: `undefined`
  248. **Example**
  249. ```js
  250. mm.isMatch('abc', '\\a\\b\\c', {unescape: true});
  251. //=> true
  252. ```
  253. ### options.nodupes
  254. Remove duplicate elements from the result array.
  255. Type: `{Boolean}`
  256. Default: `undefined`
  257. **Example**
  258. Example of using the `unescape` and `nodupes` options together:
  259. ```js
  260. mm.match(['abc', '\\a\\b\\c'], '\\a\\b\\c', {unescape: true});
  261. //=> ['abc', 'abc']
  262. mm.match(['abc', '\\a\\b\\c'], '\\a\\b\\c', {unescape: true, nodupes: true});
  263. //=> ['abc']
  264. ```
  265. ### options.matchBase
  266. Allow glob patterns without slashes to match a file path based on its basename. . Same behavior as [minimatch](https://github.com/isaacs/minimatch).
  267. Type: `{Boolean}`
  268. Default: `false`
  269. **Example**
  270. ```js
  271. mm(['a/b.js', 'a/c.md'], '*.js');
  272. //=> []
  273. mm(['a/b.js', 'a/c.md'], '*.js', {matchBase: true});
  274. //=> ['a/b.js']
  275. ```
  276. ### options.nobraces
  277. Don't expand braces in glob patterns. Same behavior as [minimatch](https://github.com/isaacs/minimatch) `nobrace`.
  278. Type: `{Boolean}`
  279. Default: `undefined`
  280. See [braces](https://github.com/jonschlinkert/braces) for more information about extended brace expansion.
  281. ### options.nobrackets
  282. Don't expand POSIX bracket expressions.
  283. Type: `{Boolean}`
  284. Default: `undefined`
  285. See [expand-brackets](https://github.com/jonschlinkert/expand-brackets) for more information about extended bracket expressions.
  286. ### options.noextglob
  287. Don't expand extended globs.
  288. Type: `{Boolean}`
  289. Default: `undefined`
  290. See [extglob](https://github.com/jonschlinkert/extglob) for more information about extended globs.
  291. ### options.nocase
  292. Use a case-insensitive regex for matching files. Same behavior as [minimatch](https://github.com/isaacs/minimatch).
  293. Type: `{Boolean}`
  294. Default: `false`
  295. ### options.nonegate
  296. Disallow negation (`!`) patterns.
  297. Type: `{Boolean}`
  298. Default: `false`
  299. ### options.nonull
  300. If `true`, when no matches are found the actual (array-ified) glob pattern is returned instead of an empty array. Same behavior as [minimatch](https://github.com/isaacs/minimatch).
  301. Type: `{Boolean}`
  302. Default: `false`
  303. ### options.cache
  304. Cache the platform (e.g. `win32`) to prevent this from being looked up for every filepath.
  305. Type: `{Boolean}`
  306. Default: `true`
  307. ***
  308. ## Other features
  309. Micromatch also supports the following.
  310. ### Extended globbing
  311. #### extglobs
  312. Extended globbing, as described by the bash man page:
  313. | **pattern** | **regex equivalent** | **description** |
  314. | --- | --- | --- |
  315. | `?(pattern-list)` | `(... | ...)?` | Matches zero or one occurrence of the given patterns |
  316. | `*(pattern-list)` | `(... | ...)*` | Matches zero or more occurrences of the given patterns |
  317. | `+(pattern-list)` | `(... | ...)+` | Matches one or more occurrences of the given patterns |
  318. | `@(pattern-list)` | `(... | ...)` <sup>*</sup> | Matches one of the given patterns |
  319. | `!(pattern-list)` | N/A | Matches anything except one of the given patterns |
  320. <sup><strong>*</strong></sup> `@` isn't a RegEx character.
  321. Powered by [extglob](https://github.com/jonschlinkert/extglob). Visit that library for the full range of options or to report extglob related issues.
  322. See [extglob](https://github.com/jonschlinkert/extglob) for more information about extended globs.
  323. #### brace expansion
  324. In simple cases, brace expansion appears to work the same way as the logical `OR` operator. For example, `(a|b)` will achieve the same result as `{a,b}`.
  325. Here are some powerful features unique to brace expansion (versus character classes):
  326. * range expansion: `a{1..3}b/*.js` expands to: `['a1b/*.js', 'a2b/*.js', 'a3b/*.js']`
  327. * nesting: `a{c,{d,e}}b/*.js` expands to: `['acb/*.js', 'adb/*.js', 'aeb/*.js']`
  328. Visit [braces](https://github.com/jonschlinkert/braces) to ask questions and create an issue related to brace-expansion, or to see the full range of features and options related to brace expansion.
  329. #### regex character classes
  330. With the exception of brace expansion (`{a,b}`, `{1..5}`, etc), most of the special characters convert directly to regex, so you can expect them to follow the same rules and produce the same results as regex.
  331. For example, given the list: `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`:
  332. * `[ac].js`: matches both `a` and `c`, returning `['a.js', 'c.js']`
  333. * `[b-d].js`: matches from `b` to `d`, returning `['b.js', 'c.js', 'd.js']`
  334. * `[b-d].js`: matches from `b` to `d`, returning `['b.js', 'c.js', 'd.js']`
  335. * `a/[A-Z].js`: matches and uppercase letter, returning `['a/E.md']`
  336. Learn about [regex character classes](http://www.regular-expressions.info/charclass.html).
  337. #### regex groups
  338. Given `['a.js', 'b.js', 'c.js', 'd.js', 'E.js']`:
  339. * `(a|c).js`: would match either `a` or `c`, returning `['a.js', 'c.js']`
  340. * `(b|d).js`: would match either `b` or `d`, returning `['b.js', 'd.js']`
  341. * `(b|[A-Z]).js`: would match either `b` or an uppercase letter, returning `['b.js', 'E.js']`
  342. As with regex, parenthese can be nested, so patterns like `((a|b)|c)/b` will work. But it might be easier to achieve your goal using brace expansion.
  343. #### POSIX bracket expressions
  344. **Example**
  345. ```js
  346. mm.isMatch('a1', '[[:alpha:][:digit:]]');
  347. //=> true
  348. ```
  349. See [expand-brackets](https://github.com/jonschlinkert/expand-brackets) for more information about extended bracket expressions.
  350. ***
  351. ## Notes
  352. Whenever possible parsing behavior for patterns is based on globbing specifications in Bash 4.3. Patterns that aren't described by Bash follow wildmatch spec (used by git).
  353. ## Benchmarks
  354. Run the [benchmarks](./benchmark):
  355. ```bash
  356. node benchmark
  357. ```
  358. As of July 15, 2016:
  359. ```bash
  360. #1: basename-braces
  361. micromatch x 26,420 ops/sec ±0.89% (91 runs sampled)
  362. minimatch x 3,507 ops/sec ±0.64% (97 runs sampled)
  363. #2: basename
  364. micromatch x 25,315 ops/sec ±0.82% (93 runs sampled)
  365. minimatch x 4,398 ops/sec ±0.86% (94 runs sampled)
  366. #3: braces-no-glob
  367. micromatch x 341,254 ops/sec ±0.78% (93 runs sampled)
  368. minimatch x 30,197 ops/sec ±1.12% (91 runs sampled)
  369. #4: braces
  370. micromatch x 54,649 ops/sec ±0.74% (94 runs sampled)
  371. minimatch x 3,095 ops/sec ±0.82% (95 runs sampled)
  372. #5: immediate
  373. micromatch x 16,719 ops/sec ±0.79% (95 runs sampled)
  374. minimatch x 4,348 ops/sec ±0.86% (96 runs sampled)
  375. #6: large
  376. micromatch x 721 ops/sec ±0.77% (94 runs sampled)
  377. minimatch x 17.73 ops/sec ±1.08% (50 runs sampled)
  378. #7: long
  379. micromatch x 5,051 ops/sec ±0.87% (97 runs sampled)
  380. minimatch x 628 ops/sec ±0.83% (94 runs sampled)
  381. #8: mid
  382. micromatch x 51,280 ops/sec ±0.80% (95 runs sampled)
  383. minimatch x 1,923 ops/sec ±0.84% (95 runs sampled)
  384. #9: multi-patterns
  385. micromatch x 22,440 ops/sec ±0.97% (94 runs sampled)
  386. minimatch x 2,481 ops/sec ±1.10% (94 runs sampled)
  387. #10: no-glob
  388. micromatch x 722,823 ops/sec ±1.30% (87 runs sampled)
  389. minimatch x 52,967 ops/sec ±1.09% (94 runs sampled)
  390. #11: range
  391. micromatch x 243,471 ops/sec ±0.79% (94 runs sampled)
  392. minimatch x 11,736 ops/sec ±0.82% (96 runs sampled)
  393. #12: shallow
  394. micromatch x 190,874 ops/sec ±0.98% (95 runs sampled)
  395. minimatch x 21,699 ops/sec ±0.81% (97 runs sampled)
  396. #13: short
  397. micromatch x 496,393 ops/sec ±3.86% (90 runs sampled)
  398. minimatch x 53,765 ops/sec ±0.75% (95 runs sampled)
  399. ```
  400. ## Tests
  401. ### Running tests
  402. Install dev dependencies:
  403. ```sh
  404. $ npm install -d && npm test
  405. ```
  406. ### Coverage
  407. As of July 15, 2016:
  408. ```sh
  409. Statements : 100% (441/441)
  410. Branches : 100% (270/270)
  411. Functions : 100% (54/54)
  412. Lines : 100% (429/429)
  413. ```
  414. ## Contributing
  415. Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
  416. Please be sure to run the benchmarks before/after any code changes to judge the impact before you do a PR. thanks!
  417. ## Related
  418. * [braces](https://www.npmjs.com/package/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces… [more](https://github.com/jonschlinkert/braces) | [homepage](https://github.com/jonschlinkert/braces "Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification.")
  419. * [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets "Expand POSIX bracket expressions (character classes) in glob patterns.")
  420. * [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See… [more](https://github.com/jonschlinkert/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch.")
  421. * [extglob](https://www.npmjs.com/package/extglob): Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to… [more](https://github.com/jonschlinkert/extglob) | [homepage](https://github.com/jonschlinkert/extglob "Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to glob patterns.")
  422. * [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier 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 multiplier to use.")
  423. * [gulp-micromatch](https://www.npmjs.com/package/gulp-micromatch): Filter vinyl files with glob patterns, string, regexp, array, object or matcher function. micromatch stream. | [homepage](https://github.com/tunnckocore/gulp-micromatch#readme "Filter vinyl files with glob patterns, string, regexp, array, object or matcher function. micromatch stream.")
  424. * [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet")
  425. * [parse-glob](https://www.npmjs.com/package/parse-glob): Parse a glob pattern into an object of tokens. | [homepage](https://github.com/jonschlinkert/parse-glob "Parse a glob pattern into an object of tokens.")
  426. ## Contributing
  427. Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
  428. ## Building docs
  429. _(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
  430. To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
  431. ```sh
  432. $ npm install -g verb verb-generate-readme && verb
  433. ```
  434. ## Running tests
  435. Install dev dependencies:
  436. ```sh
  437. $ npm install -d && npm test
  438. ```
  439. ## Author
  440. **Jon Schlinkert**
  441. * [github/jonschlinkert](https://github.com/jonschlinkert)
  442. * [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
  443. ## License
  444. Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
  445. Released under the [MIT license](https://github.com/jonschlinkert/micromatch/blob/master/LICENSE).
  446. ***
  447. _This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on July 15, 2016._