{"name":"is-match","description":"Create a matching function from a glob pattern, regex, string, array, object or function.","version":"0.3.4","homepage":"https://github.com/jonschlinkert/is-match","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/is-match.git"},"bugs":{"url":"https://github.com/jonschlinkert/is-match/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"deep-equal":"^1.0.0","is-extendable":"^0.1.1","is-glob":"^2.0.0","micromatch":"^2.2.0"},"devDependencies":{"mocha":"*","should":"*"},"keywords":["any","array","contains","expression","function","glob","has","match","matcher","matches","matching","minimatch","multimatch","object","pattern","patterns","regex","regexp","regular","value","where","wildcard"],"verb":{"related":{"list":["micromatch","is-glob"]}},"gitHead":"beb20d36c6966729e93ceb0c1f74e9a222f65362","_id":"is-match@0.3.4","_shasum":"6c8f18d8ed98051e139abd13d522ad295e14c2dc","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"6c8f18d8ed98051e139abd13d522ad295e14c2dc","tarball":"http://registry-npm.ywwl.com/is-match/download/is-match-0.3.4.tgz","integrity":"sha512-QUX0ylmP0PLEGFHTICgiRpK5MGbW3YQhPwoQP7TQj8OYnm2K9+o89XC9P/Sk4XZ7WWRXRBXu5/EfQjOPrUXVog==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClSyaDDtGkmbmEhvpPAnU3M7Weh5eDb56RgBLNIO9m2AIhAItqkiwarm45UH8EBJzfEjJynYmZfdBhXerTxCGLD8ld"}],"size":2429,"noattachment":false,"key":"/is-match/-/is-match-0.3.4.tgz"},"directories":{},"readme":"# is-match [![NPM version](https://img.shields.io/npm/v/is-match.svg?style=flat)](https://www.npmjs.com/package/is-match) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-match.svg?style=flat)](https://npmjs.org/package/is-match) [![NPM total downloads](https://img.shields.io/npm/dt/is-match.svg?style=flat)](https://npmjs.org/package/is-match) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-match.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-match)\n\n> Create a matching function from a glob pattern, regex, string, array, object or function.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save is-match\n```\n\n## Heads up!\n\nSee the [release history](#release-history) to learn about breaking changes in the [v1.0.0 release](https://github.com/jonschlinkert/is-match/releases/tag/1.0.0).\n\n## Usage\n\n```js\nvar isMatch = require('is-match');\n```\n\n### Create matchers:\n\n**from a string:**\n\n```js\nvar isMatch = matcher('a')\n\nisMatch('a');\n//=> true\n\nisMatch('b');\n//=> false\n```\n\n**from a glob pattern:**\n\n```js\nvar isMatch = matcher('*')\nisMatch('a'); //=> true\n\nvar isMatch = matcher('!b')\nisMatch('a'); //=> true\n\nvar isMatch = matcher('!b')\nisMatch('b'); //=> false\n```\n\n**from an array of glob patterns:**\n\n```js\nvar isMatch = matcher(['b'])\nisMatch('a'); //=> false\n\nvar isMatch = matcher(['b', 'a'])\nisMatch('a'); //=> true\n\nvar isMatch = matcher(['b', 'c', '*'])\nisMatch('a'); //=> true\n```\n\n**from a regex:**\n\n```js\nvar isMatch = matcher(/a/);\n\nisMatch('a');\n//=> true\n\nisMatch('b');\n//=> false\n```\n\n**from a function:**\n\n```js\nvar isMatch = matcher(function  (val) {\n  return val === 'a';\n});\nisMatch('a');\n//=> true\n\nisMatch('b');\n//=> false\n```\n\n**from an object:**\n\n```js\nvar isMatch = matcher({a: 'b'});\n\nisMatch({a: 'b'}); //=> true\nisMatch({a: 'b', c: 'd'}); //=> false\nisMatch({e: 'f', c: 'd'}); //=> false\n```\n\n## Release history\n\n### v1.0.0\n\n**Potentially breaking changes**\n\n* prior to 1.0, when an array of globs was passed, `isMatch()` would return true if _any_ of the globs matched. As of 1.0, `isMatch()` only returns true when _all_ globs match.\n* now does number comparisons. there are several ways to compare numbers, I'm open to a discussion or changes if necessary.\n\n## About\n\n### Related projects\n\n* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob \"Returns `true` if an array has a glob pattern.\")\n* [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\")\n* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch \"Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Contributors\n\n| **Commits** | **Contributor** | \n| --- | --- |\n| 23 | [jonschlinkert](https://github.com/jonschlinkert) |\n| 8 | [tunnckoCore](https://github.com/tunnckoCore) |\n\n### Building docs\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 17, 2017._","publish_time":1438404795041,"_cnpm_publish_time":1438404795041,"dist-tags":{"latest":"1.0.0"}}