{"id":22222029,"url":"https://github.com/fabiospampinato/zeptomatch","last_synced_at":"2025-04-09T06:11:12.662Z","repository":{"id":65710444,"uuid":"597848711","full_name":"fabiospampinato/zeptomatch","owner":"fabiospampinato","description":"An absurdly small glob matcher that packs a punch.","archived":false,"fork":false,"pushed_at":"2025-03-05T21:50:13.000Z","size":73,"stargazers_count":46,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T02:11:17.221Z","etag":null,"topics":["glob","match","matcher","tiny"],"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/fabiospampinato.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"fabiospampinato","custom":"https://www.paypal.me/fabiospampinato"}},"created_at":"2023-02-05T20:13:21.000Z","updated_at":"2025-03-05T21:50:17.000Z","dependencies_parsed_at":"2025-03-26T02:01:36.672Z","dependency_job_id":"bdfbceb5-eb84-4083-9e97-d120dc4f968c","html_url":"https://github.com/fabiospampinato/zeptomatch","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"a8e913daa274fe9ff5f6ca941e9cfac81a0ce0f4"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fzeptomatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fzeptomatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fzeptomatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fzeptomatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabiospampinato","download_url":"https://codeload.github.com/fabiospampinato/zeptomatch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247987285,"owners_count":21028895,"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":["glob","match","matcher","tiny"],"created_at":"2024-12-02T23:16:36.517Z","updated_at":"2025-04-09T06:11:12.642Z","avatar_url":"https://github.com/fabiospampinato.png","language":"JavaScript","funding_links":["https://github.com/sponsors/fabiospampinato","https://www.paypal.me/fabiospampinato"],"categories":[],"sub_categories":[],"readme":"# Zeptomatch\n\nAn absurdly small glob matcher that packs a punch.\n\n## Overview\n\nThe following syntax is supported:\n\n| Syntax      | Description                                                                                                                             |\n| ----------- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| `*`         | Matches any character, except for the path separator, zero or more times.                                                               |\n| `**`        | Matches any character zero or more times. If it doesn't span the entire length of a path segment it's interpreted as a `*` instead.     |\n| `?`         | Matches any character, except for the path separator, one time.                                                                         |\n| `\\`         | Matches the character after it in the glob literally. This is the escape operator.                                                      |\n| `[abc]`     | Matches any of the characters in the class one time.                                                                                    |\n| `[a-z]`     | Matches any of the characters in the range in the class one time.                                                                       |\n| `[^abc]`    | Matches any character, except for the characters in the class, and the path separator, one time. Aliased as `[!abc]` also.              |\n| `[^a-z]`    | Matches any character, except for the characters in the range in the class, and the path separator, one time. Aliased as `[!a-z]` also. |\n| `{foo,bar}` | Matches any of the alternations, which are separated by a comma, inside the braces.                                                     |\n| `{01..99}`  | Matches any of the numbers in the expanded range. Padding is supported and opt-in.                                                      |\n| `{a..zz}`   | Matches any of the strings in the expanded range. Upper-cased ranges are supported and opt-in.                                          |\n| `!glob`     | Matches anything except the provided glob. Negations can only be used at the start of the glob.                                         |\n| `!!glob`    | Matches the provided glob. Negations can only be used at the start of the glob.                                                         |\n\nAdditional features and details:\n\n- Zeptomatch works pretty similarly to [`picomatch`](https://github.com/micromatch/picomatch), since 1000+ of its tests are being used by this library.\n- Zeptomatch is opinionated, there are no options at all, which helps with keeping it tiny and manageable.\n- Zeptomatch is automatically memoized, the only ways to use it are always the most optimized ones available.\n- Zeptomatch automatically normalizes path separators, since matching Windows-style paths would most likely be a mistake.\n- Zeptomatch supports compiling a glob to a standalone regular expression.\n- Zeptomatch doesn't do anything special for file names starting with a dot.\n- Zeptomatch supports nesting braces indefinitely.\n\nLimitations:\n\n- POSIX classes (e.g. `[:alnum:]`) are not supported. Implementing them seems a bit out of scope for a \"zepto\"-level library.\n- Extglobs (e.g. `?(foo)`) are not supported. They might be in the future though.\n\n## Install\n\n```sh\nnpm install zeptomatch\n```\n\n## Usage\n\n```ts\nimport zeptomatch from 'zeptomatch';\n\n// Let's check if a glob matches a path\n\nzeptomatch ( '*.js', 'abcd' ); // =\u003e false\nzeptomatch ( '*.js', 'a.js' ); // =\u003e true\nzeptomatch ( '*.js', 'a.md' ); // =\u003e false\nzeptomatch ( '*.js', 'a/b.js' ); // =\u003e false\n\n// Let's compile a glob to a regular expression\n\nconst re = zeptomatch.compile ( '*.js' ); // =\u003e /^[^\\\\/]*\\.js[\\\\/]?$/s\n```\n\n## Utilities\n\nThe following additional utilities are available, as standalone packages:\n\n- [`zeptomatch-escape`](https://github.com/fabiospampinato/zeptomatch-escape): A little utility for escaping globs before passing them to zeptomatch.\n- [`zeptomatch-explode`](https://github.com/fabiospampinato/zeptomatch-explode): A little utility for exploding a zeptomatch-flavored glob into its dynamic and static parts.\n- [`zeptomatch-is-static`](https://github.com/fabiospampinato/zeptomatch-is-static): A little utility for checking if a glob is fully static.\n- [`zeptomatch-unescape`](https://github.com/fabiospampinato/zeptomatch-unescape): A little utility for removing escape sequences from a glob.\n\n## License\n\nMIT © Fabio Spampinato\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiospampinato%2Fzeptomatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabiospampinato%2Fzeptomatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiospampinato%2Fzeptomatch/lists"}