{"name":"unicode-regex","version":"4.2.0","keywords":["regular-expression","unicode"],"author":{"url":"https://github.com/ikatyang","name":"Ika","email":"ikatyang@gmail.com"},"license":"MIT","_id":"unicode-regex@4.2.0","maintainers":[{"name":"fisker","email":"lionkay@gmail.com"},{"name":"ikatyang","email":"ikatyang@gmail.com"}],"homepage":"https://github.com/ikatyang-collab/unicode-regex#readme","bugs":{"url":"https://github.com/ikatyang-collab/unicode-regex/issues"},"dist":{"shasum":"dd75787d8997179cecab4d80ec4714b288b08511","tarball":"http://registry-npm.ywwl.com/unicode-regex/download/unicode-regex-4.2.0.tgz","fileCount":1853,"integrity":"sha512-fEYz7CCnvHDAdrb8OYAP7qlQCWzXBO5cHXQ3XI+HoZaBpiAwyC6b2nixMGl91yrDYEIRm7NDskgTvnLZ7mqrKQ==","signatures":[{"sig":"MEQCICTgjRp/Di/NGfGY6J1IC1iB4DHNOeV9wINE/0Cdhk1PAiBzAt9KGQ8ugTRH+Vpxvmrm5FHEEEhkr7ckEp7CeN3Rfw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/unicode-regex@4.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":725639,"size":184099,"noattachment":false,"key":"/unicode-regex/-/unicode-regex-4.2.0.tgz"},"type":"module","_from":"file:unicode-regex-4.2.0.tgz","engines":{"node":">=16"},"exports":"./lib/index.js","scripts":{"lint":"prettier --check .","test":"vitest","build":"vite-node ./scripts/generate.mjs && tsc -p ./tsconfig.build.json","check":"tsc --noEmit","release":"standard-version"},"_npmUser":{"name":"ikatyang","email":"ikatyang@gmail.com"},"_resolved":"/tmp/61b50526bcbf205ebd4b43b93e58b16a/unicode-regex-4.2.0.tgz","_integrity":"sha512-fEYz7CCnvHDAdrb8OYAP7qlQCWzXBO5cHXQ3XI+HoZaBpiAwyC6b2nixMGl91yrDYEIRm7NDskgTvnLZ7mqrKQ==","repository":{"url":"git+https://github.com/ikatyang-collab/unicode-regex.git","type":"git"},"_npmVersion":"10.8.2","description":"regular expression for matching unicode category","directories":{},"_nodeVersion":"20.19.4","dependencies":{"regexp-util":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"vite":"7.1.3","vitest":"3.2.4","outdent":"^0.8.0","prettier":"3.6.2","vite-node":"3.2.4","typescript":"5.9.2","@types/node":"24.3.0","standard-version":"9.5.0","@vitest/coverage-v8":"3.2.4","@unicode/unicode-17.0.0":"1.6.10"},"_npmOperationalInternal":{"tmp":"tmp/unicode-regex_4.2.0_1756542334260_0.19797897359198635","host":"s3://npm-registry-packages-npm-production"},"readme":"# unicode-regex\n\n[![npm](https://img.shields.io/npm/v/unicode-regex.svg)](https://www.npmjs.com/package/unicode-regex)\n[![build](https://img.shields.io/github/actions/workflow/status/ikatyang/unicode-regex/test.yml)](https://github.com/ikatyang/unicode-regex/actions?query=branch%3Amain)\n\nregular expression for matching unicode category.\n\n[Changelog](https://github.com/ikatyang/unicode-regex/blob/main/CHANGELOG.md)\n\n## Install\n\n```sh\nnpm install unicode-regex\n```\n\n## Usage\n\n```js\nimport unicode from 'unicode-regex'\n\nconst regex = unicode({ General_Category: ['Punctuation'] }).toRegExp()\nregex.test('a') //=> false\nregex.test('\"') //=> true\nregex.test('“') //=> true\n```\n\n## API\n\n```ts\ndeclare function unicode(categories: {\n  [category: string]: SubCategory[]\n}): Charset\n```\n\nReturns a [Charset](https://github.com/ikatyang/regexp-util#charset) for further processing, e.g. union, intersect, etc.\n\n(Data from [`node-unicode-data`](https://github.com/mathiasbynens/node-unicode-data))\n\n## Development\n\n```sh\n# lint\nyarn lint\n\n# build\nyarn build\n\n# test\nyarn test\n```\n\n## License\n\nMIT © [Ika](https://github.com/ikatyang)\n","publish_time":1756542334541,"_cnpm_publish_time":1756542334541,"dist-tags":{"latest":"4.3.0"}}