{"name":"zeptomatch","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/zeptomatch.git"},"description":"An absurdly small glob matcher that packs a punch.","version":"1.1.0","type":"module","main":"dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"clean":"tsex clean","compile":"tsex compile","compile:watch":"tsex compile --watch","test":"tsex test","test:watch":"tsex test --watch","prepublishOnly":"tsex prepare"},"keywords":["tiny","glob","match","matcher"],"dependencies":{"grammex":"^1.1.0"},"devDependencies":{"fava":"^0.1.0","tsex":"^2.1.0","typescript":"^4.9.5"},"gitHead":"a8e913daa274fe9ff5f6ca941e9cfac81a0ce0f4","bugs":{"url":"https://github.com/fabiospampinato/zeptomatch/issues"},"homepage":"https://github.com/fabiospampinato/zeptomatch#readme","_id":"zeptomatch@1.1.0","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-a7DWkdUiwFRIEwqXAC0IYFwXsyaZm9n8V3dndQz+iaZsaq+KcNESNMxV9G/8H8hxIe/hSTT45+SorgkYwCvBMg==","shasum":"705017a17df1fda16696f96140eeb68c871f11ca","tarball":"http://registry-npm.ywwl.com/zeptomatch/download/zeptomatch-1.1.0.tgz","fileCount":27,"unpackedSize":146540,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHjNXYgXJMTgE513ktAxfYOwH4iN6O22ylfBpXrRcrcAAiAPqnCzkf16TONLUhdjMZIAFXozDrvQrPxtA8O9/mg9sQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6RadACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoZOw/9GZWZUt4Kt7LOmWY+Ve51jZaDYUtgS3s6yJKGvHqPNRq1943t\r\nI300iXxRjpon+3qK+KkzvVvYZjEjw6/NobhsOW5WEyTh1VGUVNcUDzb07xDd\r\nY/gGjq19jT1zoE5XjXw7vzdl0ukTVLVZrEt/4rbmffX//MkzWunKoVkakmAw\r\nsPX0mFkDWcpMBbr4d9sCD6m1ULhNTZ3uR9tu8IfSSp8mb+vNqS/lPDC1+Mti\r\nKJdLipc9ucxoRn1ec0asVB2z6eYfxRvcNptPltcskAp9sBHxWmre9yVfLrlx\r\n1UCYWpqEMYWsQTHtcsyF7WDVZg1nGqnM0/urvxhET8MVCBojh8L0zZDGIStQ\r\neYjTsuJudz84gyXlkTHLZXDb6e+9Dm6fAgEDIuHm/kGMTxUXkq2paXlAUOl0\r\nspaiOHwwzosaQxT9v9tu1UD0IevcPI4ULsOHKYkxwfijU8us0QE8IwPTOOSf\r\nWSs7fWYydjq+eJVfQRr0FNs6WitpdOtPvYQ6NpRjB40MbK+mD0+mVhdNIztW\r\njdWJ/DtLGVZ9LF5WWKp4wxGwlzSG52dnBdaDdgndiFv9JfhpCAOQYLRNMk+C\r\n4M0q+fQACCMV01kmxl0aXyJroS4wvIYGKB9kaKCC+HqpZ0imQ5GjRedETfP9\r\n9cYq8s5bdqeiZRewLsEVakSdvUK4i22FCeo=\r\n=pxUE\r\n-----END PGP SIGNATURE-----\r\n","size":18796,"noattachment":false,"key":"/zeptomatch/-/zeptomatch-1.1.0.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zeptomatch_1.1.0_1676220061518_0.9677557881856258"},"_hasShrinkwrap":false,"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 the class, and the path separator, o∏ne 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 --save zeptomatch\n```\n\n## Usage\n\n```ts\nimport zeptomatch from 'zeptomatch';\n\n// Check if a glob matches a path\n\nzeptomatch ( '*.js', 'abcd' ); // => false\nzeptomatch ( '*.js', 'a.js' ); // => true\nzeptomatch ( '*.js', 'a.md' ); // => false\nzeptomatch ( '*.js', 'a/b.js' ); // => false\n\n// Compile a glob to a regular expression\n\nconst re = zeptomatch.compile ( '*.js' ); // => /^[^/]*\\.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\n## License\n\nMIT © Fabio Spampinato\n","publish_time":1676220061669,"_cnpm_publish_time":1676220061669,"dist-tags":{"latest":"2.1.0"}}