{"maintainers":[{"name":"es128","email":"elan.shanker+npm@gmail.com"},{"name":"paulmillr","email":"paul@paulmillr.com"}],"keywords":["match","any","string","file","fs","list","glob","regex","regexp","regular","expression","function"],"dist-tags":{"latest":"1.3.0"},"author":{"name":"Elan Shanker","url":"http://github.com/es128"},"description":"Matches strings against configurable strings, globs, regular expressions, and/or functions","readme":"anymatch [![Build Status](https://travis-ci.org/es128/anymatch.svg?branch=master)](https://travis-ci.org/es128/anymatch) [![Coverage Status](https://img.shields.io/coveralls/es128/anymatch.svg?branch=master)](https://coveralls.io/r/es128/anymatch?branch=master)\n======\nJavascript module to match a string against a regular expression, glob, string,\nor function that takes the string as an argument and returns a truthy or falsy\nvalue. The matcher can also be an array of any or all of these. Useful for\nallowing a very flexible user-defined config to define things like file paths.\n\n[![NPM](https://nodei.co/npm/anymatch.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/anymatch/)\n[![NPM](https://nodei.co/npm-dl/anymatch.png?height=3&months=9)](https://nodei.co/npm-dl/anymatch/)\n\nUsage\n-----\n```sh\nnpm install anymatch --save\n```\n\n#### anymatch (matchers, testString, [returnIndex], [startIndex], [endIndex])\n* __matchers__: (_Array|String|RegExp|Function_)\nString to be directly matched, string with glob patterns, regular expression\ntest, function that takes the testString as an argument and returns a truthy\nvalue if it should be matched, or an array of any number and mix of these types.\n* __testString__: (_String|Array_) The string to test against the matchers. If\npassed as an array, the first element of the array will be used as the\n`testString` for non-function matchers, while the entire array will be applied\nas the arguments for function matchers.\n* __returnIndex__: (_Boolean [optional]_) If true, return the array index of\nthe first matcher that that testString matched, or -1 if no match, instead of a\nboolean result.\n* __startIndex, endIndex__: (_Integer [optional]_) Can be used to define a\nsubset out of the array of provided matchers to test against. Can be useful\nwith bound matcher functions (see below). When used with `returnIndex = true`\npreserves original indexing. Behaves the same as `Array.prototype.slice` (i.e.\nincludes array members up to, but not including endIndex).\n\n```js\nvar anymatch = require('anymatch');\n\nvar matchers = [\n\t'path/to/file.js',\n\t'path/anyjs/**/*.js',\n\t/foo.js$/,\n\tfunction (string) {\n\t\treturn string.indexOf('bar') !== -1 && string.length > 10\n\t}\n];\n\nanymatch(matchers, 'path/to/file.js'); // true\nanymatch(matchers, 'path/anyjs/baz.js'); // true\nanymatch(matchers, 'path/to/foo.js'); // true\nanymatch(matchers, 'path/to/bar.js'); // true\nanymatch(matchers, 'bar.js'); // false\n\n// returnIndex = true\nanymatch(matchers, 'foo.js', true); // 2\nanymatch(matchers, 'path/anyjs/foo.js', true); // 1\n\n// skip matchers\nanymatch(matchers, 'path/to/file.js', false, 1); // false\nanymatch(matchers, 'path/anyjs/foo.js', true, 2, 3); // 2\nanymatch(matchers, 'path/to/bar.js', true, 0, 3); // -1\n```\n\n#### anymatch (matchers)\nYou can also pass in only your matcher(s) to get a curried function that has\nalready been bound to the provided matching criteria. This can be used as an\n`Array.prototype.filter` callback.\n\n```js\nvar matcher = anymatch(matchers);\n\nmatcher('path/to/file.js'); // true\nmatcher('path/anyjs/baz.js', true); // 1\nmatcher('path/anyjs/baz.js', true, 2); // -1\n\n['foo.js', 'bar.js'].filter(matcher); // ['foo.js']\n```\n\nChange Log\n----------\n[See release notes page on GitHub](https://github.com/es128/anymatch/releases)\n\nNOTE: As of v1.2.0, anymatch uses [micromatch](https://github.com/jonschlinkert/micromatch)\nfor glob pattern matching. The glob matching behavior should be functionally\nequivalent to the commonly used [minimatch](https://github.com/isaacs/minimatch)\nlibrary (aside from some fixed bugs and greater performance), so a major\nversion bump wasn't merited. Issues with glob pattern matching should be\nreported directly to the [micromatch issue tracker](https://github.com/jonschlinkert/micromatch/issues).\n\nLicense\n-------\n[ISC](https://raw.github.com/es128/anymatch/master/LICENSE)\n","repository":{"type":"git","url":"https://github.com/es128/anymatch"},"users":{"ubenzer":true,"detj":true,"xumakjosh":true,"wenbing":true,"mrmartineau":true,"antixrist":true,"zeke":true,"mysticatea":true,"tapmodo":true,"shanewholloway":true,"heyderpd":true,"xueboren":true,"alexandru.vasile":true,"tcrowe":true,"laomu":true},"bugs":{"url":"https://github.com/es128/anymatch/issues"},"license":"ISC","versions":{"0.1.0":{"name":"anymatch","version":"0.1.0","description":"Matches strings against configurable strings, globs, regular expressions, and/or functions","author":{"name":"Elan Shanker","url":"http://github.com/es128"},"homepage":"https://github.com/es128/anymatch","repository":{"type":"git","url":"git@github.com:es128/anymatch.git"},"bugs":{"url":"https://github.com/es128/anymatch/issues"},"main":"lib","keywords":["match","any","string","file","fs","list","glob","regex","regexp","regular","expression","function"],"dependencies":{"minimatch":"~0.2.12"},"scripts":{"prepublish":"rm -rf lib && coffee --bare --output lib/ src/"},"license":"MIT","_id":"anymatch@0.1.0","dist":{"shasum":"d34e745e4f79f7c07e65a5e6f46de0e4489bba05","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/anymatch/-/anymatch-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"es128","email":"elan.shanker+npm@gmail.com"},"maintainers":[{"name":"es128","email":"elan.shanker+npm@gmail.com"}],"directories":{}},"0.1.1":{"name":"anymatch","version":"0.1.1","description":"Matches strings against configurable strings, globs, regular expressions, and/or functions","author":{"name":"Elan Shanker","url":"http://github.com/es128"},"homepage":"https://github.com/es128/anymatch","repository":{"type":"git","url":"git@github.com:es128/anymatch.git"},"bugs":{"url":"https://github.com/es128/anymatch/issues"},"main":"lib","keywords":["match","any","string","file","fs","list","glob","regex","regexp","regular","expression","function"],"dependencies":{"minimatch":"~0.2.12"},"scripts":{"prepublish":"rm -rf lib && coffee --bare --output lib/ src/"},"license":"MIT","_id":"anymatch@0.1.1","dist":{"shasum":"cdb873bd9083a424c2c4e9b6835cc40f35c2910b","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/anymatch/-/anymatch-0.1.1.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"es128","email":"elan.shanker+npm@gmail.com"},"maintainers":[{"name":"es128","email":"elan.shanker+npm@gmail.com"}],"directories":{}},"0.2.0":{"name":"anymatch","version":"0.2.0","description":"Matches strings against configurable strings, globs, regular expressions, and/or functions","author":{"name":"Elan Shanker","url":"http://github.com/es128"},"homepage":"https://github.com/es128/anymatch","repository":{"type":"git","url":"git@github.com:es128/anymatch.git"},"bugs":{"url":"https://github.com/es128/anymatch/issues"},"main":"lib","keywords":["match","any","string","file","fs","list","glob","regex","regexp","regular","expression","function"],"dependencies":{"minimatch":"~0.2.12"},"scripts":{"prepublish":"rm -rf lib && coffee --bare --output lib/ src/","test":"rm -rf lib && coffee --bare --output lib/ src/ && istanbul test _mocha -- test/test.* --compilers coffee:coffee-script/register"},"license":"MIT","devDependencies":{"coffee-script":"~1.7.1","mocha":"~1.17.1","istanbul":"~0.2.4"},"_id":"anymatch@0.2.0","dist":{"shasum":"e919a97cd43373e6e645bbb7b644e2daebeba405","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/anymatch/-/anymatch-0.2.0.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"es128","email":"elan.shanker+npm@gmail.com"},"maintainers":[{"name":"es128","email":"elan.shanker+npm@gmail.com"}],"directories":{}},"1.0.0":{"name":"anymatch","version":"1.0.0","description":"Matches strings against configurable strings, globs, regular expressions, and/or functions","author":{"name":"Elan Shanker","url":"http://github.com/es128"},"homepage":"https://github.com/es128/anymatch","repository":{"type":"git","url":"https://github.com/es128/anymatch"},"bugs":{"url":"https://github.com/es128/anymatch/issues"},"keywords":["match","any","string","file","fs","list","glob","regex","regexp","regular","expression","function"],"dependencies":{"minimatch":"~1.0.0"},"scripts":{"test":"istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"},"license":"ISC","devDependencies":{"coveralls":"~2.11.2","istanbul":"~0.3.2","mocha":"~1.21.4"},"gitHead":"1ee0628e9572d80f9a1db604e65734fa86b51bdb","_id":"anymatch@1.0.0","_shasum":"0aed64d30bc25973afdb3155eb87ae6881e21b1c","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"es128","email":"elan.shanker+npm@gmail.com"},"maintainers":[{"name":"es128","email":"elan.shanker+npm@gmail.com"}],"dist":{"shasum":"0aed64d30bc25973afdb3155eb87ae6881e21b1c","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/anymatch/-/anymatch-1.0.0.tgz"},"directories":{}},"1.1.0":{"name":"anymatch","version":"1.1.0","description":"Matches strings against configurable strings, globs, regular expressions, and/or functions","main":"index.js","files":["index.js"],"author":{"name":"Elan Shanker","url":"http://github.com/es128"},"license":"ISC","homepage":"https://github.com/es128/anymatch","repository":{"type":"git","url":"https://github.com/es128/anymatch"},"bugs":{"url":"https://github.com/es128/anymatch/issues"},"keywords":["match","any","string","file","fs","list","glob","regex","regexp","regular","expression","function"],"scripts":{"test":"istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"},"dependencies":{"minimatch":"~1.0.0"},"devDependencies":{"coveralls":"~2.11.2","istanbul":"~0.3.2","mocha":"~1.21.4"},"gitHead":"11878efb4c829892e38c6b042c54e4da96555740","_id":"anymatch@1.1.0","_shasum":"ebc63275cee368a96b300f31623bf9f228d428e3","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"es128","email":"elan.shanker+npm@gmail.com"},"maintainers":[{"name":"es128","email":"elan.shanker+npm@gmail.com"}],"dist":{"shasum":"ebc63275cee368a96b300f31623bf9f228d428e3","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/anymatch/-/anymatch-1.1.0.tgz"},"directories":{}},"1.2.0":{"name":"anymatch","version":"1.2.0","description":"Matches strings against configurable strings, globs, regular expressions, and/or functions","main":"index.js","files":["index.js"],"author":{"name":"Elan Shanker","url":"http://github.com/es128"},"license":"ISC","homepage":"https://github.com/es128/anymatch","repository":{"type":"git","url":"https://github.com/es128/anymatch"},"bugs":{"url":"https://github.com/es128/anymatch/issues"},"keywords":["match","any","string","file","fs","list","glob","regex","regexp","regular","expression","function"],"scripts":{"test":"istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"},"dependencies":{"arrify":"^1.0.0","micromatch":"^2.1.0"},"devDependencies":{"coveralls":"~2.11.2","istanbul":"~0.3.2","mocha":"~1.21.4"},"gitHead":"b7b3ec24109404cee5b3b08ccd6964f6ae75522b","_id":"anymatch@1.2.0","_shasum":"f4df38e0f4943bd64cd6fc0ae32e4e191f8db819","_from":".","_npmVersion":"2.7.3","_nodeVersion":"1.6.2","_npmUser":{"name":"es128","email":"elan.shanker+npm@gmail.com"},"maintainers":[{"name":"es128","email":"elan.shanker+npm@gmail.com"}],"dist":{"shasum":"f4df38e0f4943bd64cd6fc0ae32e4e191f8db819","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/anymatch/-/anymatch-1.2.0.tgz"},"directories":{}},"1.2.1":{"name":"anymatch","version":"1.2.1","description":"Matches strings against configurable strings, globs, regular expressions, and/or functions","main":"index.js","files":["index.js"],"author":{"name":"Elan Shanker","url":"http://github.com/es128"},"license":"ISC","homepage":"https://github.com/es128/anymatch","repository":{"type":"git","url":"https://github.com/es128/anymatch"},"bugs":{"url":"https://github.com/es128/anymatch/issues"},"keywords":["match","any","string","file","fs","list","glob","regex","regexp","regular","expression","function"],"scripts":{"test":"istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"},"dependencies":{"arrify":"^1.0.0","micromatch":"^2.1.0"},"devDependencies":{"coveralls":"~2.11.2","istanbul":"~0.3.2","mocha":"~1.21.4"},"gitHead":"4cd0c99e8f3aacd9895b89ae5cf4f2aeb1cf1823","_id":"anymatch@1.2.1","_shasum":"a7d77e8b62bc27cb5309d5ed905915b8da3f210f","_from":".","_npmVersion":"2.7.3","_nodeVersion":"1.6.2","_npmUser":{"name":"es128","email":"elan.shanker+npm@gmail.com"},"maintainers":[{"name":"es128","email":"elan.shanker+npm@gmail.com"}],"dist":{"shasum":"a7d77e8b62bc27cb5309d5ed905915b8da3f210f","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/anymatch/-/anymatch-1.2.1.tgz"},"directories":{}},"1.3.0":{"name":"anymatch","version":"1.3.0","description":"Matches strings against configurable strings, globs, regular expressions, and/or functions","files":["index.js"],"author":{"name":"Elan Shanker","url":"http://github.com/es128"},"license":"ISC","homepage":"https://github.com/es128/anymatch","repository":{"type":"git","url":"https://github.com/es128/anymatch"},"bugs":{"url":"https://github.com/es128/anymatch/issues"},"keywords":["match","any","string","file","fs","list","glob","regex","regexp","regular","expression","function"],"scripts":{"test":"istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"},"dependencies":{"arrify":"^1.0.0","micromatch":"^2.1.5"},"devDependencies":{"coveralls":"^2.11.2","istanbul":"^0.3.13","mocha":"^2.2.4"},"gitHead":"253d2ad42f644ed18557f561312a7f8426daca84","_id":"anymatch@1.3.0","_shasum":"a3e52fa39168c825ff57b0248126ce5a8ff95507","_from":".","_npmVersion":"2.7.3","_nodeVersion":"1.6.2","_npmUser":{"name":"es128","email":"elan.shanker+npm@gmail.com"},"maintainers":[{"name":"es128","email":"elan.shanker+npm@gmail.com"}],"dist":{"shasum":"a3e52fa39168c825ff57b0248126ce5a8ff95507","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/anymatch/-/anymatch-1.3.0.tgz"},"directories":{}}},"name":"anymatch","time":{"modified":"2017-07-04T13:13:56.162Z","created":"2013-11-25T16:08:38.502Z","0.1.0":"2013-11-25T16:08:40.170Z","0.1.1":"2013-11-26T21:11:50.083Z","0.2.0":"2014-02-19T16:21:21.908Z","1.0.0":"2014-10-25T15:45:33.199Z","1.1.0":"2014-12-23T17:01:53.196Z","1.2.0":"2015-03-25T20:28:14.117Z","1.2.1":"2015-03-27T04:34:02.916Z","1.3.0":"2015-04-22T22:05:40.612Z"},"readmeFilename":"README.md","homepage":"https://github.com/es128/anymatch"}