{"name":"multimatch","version":"7.0.0","description":"Extends `minimatch.match()` with support for multiple patterns","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/multimatch.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsd"},"keywords":["expand","find","glob","globbing","globs","match","matcher","minimatch","pattern","patterns","wildcard"],"dependencies":{"array-differ":"^4.0.0","array-union":"^3.0.1","minimatch":"^9.0.3"},"devDependencies":{"ava":"^5.3.1","tsd":"^0.29.0","xo":"^0.56.0"},"types":"./index.d.ts","gitHead":"ae07fcfd4983151ca0649f76c64ca002ef7d5e28","bugs":{"url":"https://github.com/sindresorhus/multimatch/issues"},"homepage":"https://github.com/sindresorhus/multimatch#readme","_id":"multimatch@7.0.0","_nodeVersion":"18.18.2","_npmVersion":"9.2.0","dist":{"integrity":"sha512-SYU3HBAdF4psHEL/+jXDKHO95/m5P2RvboHT2Y0WtTttvJLP4H/2WS9WlQPFvF6C8d6SpLw8vjCnQOnVIVOSJQ==","shasum":"d0a1bf144db9106b8d19e3cb8cabec1a8986c27f","tarball":"http://registry-npm.ywwl.com/multimatch/download/multimatch-7.0.0.tgz","fileCount":5,"unpackedSize":5352,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZmsxJ5sZsnu8EyH5v3z42NMqbkLXjn3CloxQjekZF5QIgIueOW4+EDp/6hQj5ke2f0wvYuMwsj7R119xPv11b+Ks="}],"size":2370,"noattachment":false,"key":"/multimatch/-/multimatch-7.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/multimatch_7.0.0_1698427043213_0.3672058336126782"},"_hasShrinkwrap":false,"readme":"# multimatch\n\n> Extends [`minimatch.match()`](https://github.com/isaacs/minimatch#minimatchmatchlist-pattern-options) with support for multiple patterns\n\n## Install\n\n```sh\nnpm install multimatch\n```\n\n## Usage\n\n```js\nimport multimatch from 'multimatch';\n\nmultimatch(['unicorn', 'cake', 'rainbows'], ['*', '!cake']);\n//=> ['unicorn', 'rainbows']\n```\n\nSee the [tests](test) for more usage examples and expected matches.\n\n## API\n\n### multimatch(paths, patterns, options?)\n\nReturns an array of matching paths in the order of input paths.\n\n#### paths\n\nType: `string | string[]`\n\nThe paths to match against.\n\n#### patterns\n\nType: `string | string[]`\n\nGlobbing patterns to use. For example: `['*', '!cake']`. See supported [`minimatch` patterns](https://github.com/isaacs/minimatch#usage).\n\n- [Pattern examples with expected matches](https://github.com/sindresorhus/multimatch/blob/master/test/test.js)\n- [Quick globbing pattern overview](https://github.com/sindresorhus/multimatch#globbing-patterns)\n\n#### options\n\nType: `object`\n\nSee the [`minimatch` options](https://github.com/isaacs/minimatch#options).\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## 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## Related\n\n- [globby](https://github.com/sindresorhus/globby) - Match against the filesystem instead of a list\n- [matcher](https://github.com/sindresorhus/matcher) - Simple wildcard matching\n","publish_time":1698427043439,"_cnpm_publish_time":1698427043439,"dist-tags":{"latest":"8.0.0"}}