{"id":13447482,"url":"https://github.com/sindresorhus/multimatch","last_synced_at":"2025-05-15T09:07:46.655Z","repository":{"id":13246833,"uuid":"15931685","full_name":"sindresorhus/multimatch","owner":"sindresorhus","description":"Extends minimatch.match() with support for multiple patterns","archived":false,"fork":false,"pushed_at":"2023-10-27T17:17:25.000Z","size":45,"stargazers_count":303,"open_issues_count":1,"forks_count":22,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-10T17:25:04.044Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sindresorhus.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/security.md","support":null,"governance":null},"funding":{"github":"sindresorhus","open_collective":"sindresorhus","custom":"https://sindresorhus.com/donate"}},"created_at":"2014-01-15T10:13:54.000Z","updated_at":"2025-04-25T03:10:57.000Z","dependencies_parsed_at":"2022-09-19T03:01:56.682Z","dependency_job_id":null,"html_url":"https://github.com/sindresorhus/multimatch","commit_stats":{"total_commits":49,"total_committers":14,"mean_commits":3.5,"dds":"0.30612244897959184","last_synced_commit":"ae07fcfd4983151ca0649f76c64ca002ef7d5e28"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fmultimatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fmultimatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fmultimatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fmultimatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindresorhus","download_url":"https://codeload.github.com/sindresorhus/multimatch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254310515,"owners_count":22049469,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T05:01:18.990Z","updated_at":"2025-05-15T09:07:46.582Z","avatar_url":"https://github.com/sindresorhus.png","language":"JavaScript","readme":"# multimatch\n\n\u003e 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//=\u003e ['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","funding_links":["https://github.com/sponsors/sindresorhus","https://opencollective.com/sindresorhus","https://sindresorhus.com/donate"],"categories":["JavaScript","Repository","Utilities"],"sub_categories":["RegExp/Glob","React Components"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fmultimatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindresorhus%2Fmultimatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fmultimatch/lists"}