{"_id":"maximatch","_rev":"2880994","name":"maximatch","description":"Extends multimatch() with support for filter functions and regular expressions","dist-tags":{"latest":"0.1.0"},"maintainers":[{"name":"timkendrick","email":"timkendrick@gmail.com"}],"time":{"modified":"2022-10-06T07:22:04.000Z","created":"2016-01-12T23:07:43.659Z","0.1.0":"2016-01-12T23:07:43.659Z"},"users":{},"author":{"name":"Tim Kendrick","email":"timkendrick@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/timkendrick/maximatch.git"},"versions":{"0.1.0":{"name":"maximatch","version":"0.1.0","description":"Extends multimatch() with support for filter functions and regular expressions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/timkendrick/maximatch.git"},"author":{"name":"Tim Kendrick","email":"timkendrick@gmail.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["expand","find","glob","globbing","globs","match","matcher","minimatch","multimatch","pattern","patterns","wildcard"],"dependencies":{"array-differ":"^1.0.0","array-union":"^1.0.1","arrify":"^1.0.0","minimatch":"^3.0.0"},"devDependencies":{"chai":"^3.4.1","mocha":"*"},"gitHead":"c2a44e43cc11f8ede876b7ab52c9ff8dd012c05b","bugs":{"url":"https://github.com/timkendrick/maximatch/issues"},"homepage":"https://github.com/timkendrick/maximatch#readme","_id":"maximatch@0.1.0","_shasum":"86cd8d6b04c9f307c05a6b9419906d0360fb13a2","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"timkendrick","email":"timkendrick@gmail.com"},"dist":{"shasum":"86cd8d6b04c9f307c05a6b9419906d0360fb13a2","size":2410,"noattachment":false,"key":"/maximatch/-/maximatch-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/maximatch/download/maximatch-0.1.0.tgz"},"maintainers":[{"name":"timkendrick","email":"timkendrick@gmail.com"}],"directories":{},"publish_time":1452640063659,"_hasShrinkwrap":false,"_cnpm_publish_time":1452640063659,"_cnpmcore_publish_time":"2021-12-16T15:32:23.389Z"}},"readme":"# maximatch [![Build Status](https://travis-ci.org/timkendrick/maximatch.svg?branch=master)](https://travis-ci.org/timkendrick/maximatch)\n\n> Extends [`multimatch()`](https://github.com/sindresorhus/multimatch) with support for filter functions and regular expressions\n\n\n## Install\n\n```sh\n\n$ npm install --save maximatch\n```\n\n\n## Usage\n\n```js\nvar maximatch = require('maximatch');\n\nmaximatch(['unicorn', 'cake', 'rainbows'], ['*', '!cake']);\n//=> ['unicorn', 'rainbows']\n\nmaximatch(['unicorn', 'cake', 'rainbows'], function(path) { return path.length > 4; });\n//=> ['unicorn', 'rainbows']\n\nmaximatch(['unicorn', 'cake', 'rainbows'], /^[^k]+$/);\n//=> ['unicorn', 'rainbows']\n\nmaximatch(['unicorn', 'cake', 'rainbows'], [function(path) { return path.charAt(0) === 'u'; }, /w/]);\n//=> ['unicorn', 'rainbows']\n```\n\nSee the [tests](https://github.com/timkendrick/multimatch/blob/master/test.js) for more usage examples and expected matches.\n\n\n## API\n\nSame as [`minimatch.match()`](https://github.com/isaacs/minimatch#minimatchmatchlist-pattern-options) except for `pattern` also accepting a filter function, a regular expression, or an array that can contain globs, filter functions and regular expressions.\n\n```js\nvar results = maximatch(paths, patterns);\n```\n\nThe return value is an array of matching paths.\n\n\n## How multiple patterns work\n\nPositive patterns (e.g. `foo` or `*`) add to the results, while negative patterns (e.g. `!foo`) subtract from the results.\n\nTherefore a lone negation (e.g. `['!foo']`) will never match anything – use `['*', '!foo']` instead.\n\n\n## Globbing patterns\n\nJust a quick overview.\n\n- `*` matches any number of characters, but not `/`\n- `?` matches a single character, but not `/`\n- `**` matches any number of characters, including `/`, as long as it's the only thing in a path part\n- `{}` allows for a comma-separated list of \"or\" expressions\n- `!` at the beginning of a pattern will negate the match\n\n\n## Related\n\nSee [globby](https://github.com/sindresorhus/globby) if you need to match against the filesystem instead of a list.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com), [Jon Schlinkert](https://github.com/jonschlinkert), [Tim Kendrick](https://github.com/timkendrick)\n","_attachments":{},"homepage":"https://github.com/timkendrick/maximatch#readme","bugs":{"url":"https://github.com/timkendrick/maximatch/issues"},"license":"MIT"}