{"name":"cjk-regex","version":"3.2.1","keywords":["cjk","regular-expression"],"author":{"url":"https://github.com/ikatyang","name":"Ika","email":"ikatyang@gmail.com"},"license":"MIT","_id":"cjk-regex@3.2.1","maintainers":[{"name":"fisker","email":"lionkay@gmail.com"},{"name":"ikatyang","email":"ikatyang@gmail.com"}],"homepage":"https://github.com/ikatyang-collab/cjk-regex#readme","bugs":{"url":"https://github.com/ikatyang-collab/cjk-regex/issues"},"dist":{"shasum":"fc232d43761ce588af9d8d6d02419c075badb2a8","tarball":"http://registry-npm.ywwl.com/cjk-regex/download/cjk-regex-3.2.1.tgz","fileCount":6,"integrity":"sha512-+UOogSJ1XAQuVdlcv8GaVUPVMUnJkmhaqkm7M6lTEc6wISgGriE9y8frFd0FBBvv/cT8DTu11en1w5dfUBrLpw==","signatures":[{"sig":"MEUCIApjex7UWkP0T/1tSRX8riIvatUhsW45duljcxAvHlaLAiEA/qIq3ztwbwc05CM1G9ibJ3rFehfhbTsUcMDG6xhHacA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/cjk-regex@3.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":7325,"size":3019,"noattachment":false,"key":"/cjk-regex/-/cjk-regex-3.2.1.tgz"},"type":"module","_from":"file:cjk-regex-3.2.1.tgz","engines":{"node":">=16"},"exports":{"types":"./lib/index.d.ts","default":"./lib/index.js"},"scripts":{"lint":"prettier --check .","test":"vitest","build":"tsc -p ./tsconfig.build.json","release":"standard-version"},"_npmUser":{"name":"ikatyang","email":"ikatyang@gmail.com"},"_resolved":"/tmp/b4270fc8d37c3c2b276bae62ff645de1/cjk-regex-3.2.1.tgz","_integrity":"sha512-+UOogSJ1XAQuVdlcv8GaVUPVMUnJkmhaqkm7M6lTEc6wISgGriE9y8frFd0FBBvv/cT8DTu11en1w5dfUBrLpw==","repository":{"url":"git+https://github.com/ikatyang-collab/cjk-regex.git","type":"git"},"_npmVersion":"10.8.2","description":"regular expression for matching CJK text","directories":{},"_nodeVersion":"20.18.3","dependencies":{"regexp-util":"^2.0.1","unicode-regex":"^4.1.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"6.2.1","vitest":"3.0.8","prettier":"3.5.3","typescript":"5.8.2","standard-version":"9.5.0","@vitest/coverage-v8":"3.0.8"},"_npmOperationalInternal":{"tmp":"tmp/cjk-regex_3.2.1_1741409369941_0.8703467049399827","host":"s3://npm-registry-packages-npm-production"},"readme":"# cjk-regex\n\n[![npm](https://img.shields.io/npm/v/cjk-regex.svg)](https://www.npmjs.com/package/cjk-regex)\n[![build](https://img.shields.io/github/actions/workflow/status/ikatyang/cjk-regex/test.yml)](https://github.com/ikatyang/cjk-regex/actions?query=branch%3Amain)\n\nregular expression for matching CJK text\n\n[Changelog](https://github.com/ikatyang/cjk-regex/blob/main/CHANGELOG.md)\n\n## Install\n\n```sh\nnpm install cjk-regex\n```\n\n## Usage\n\n```js\nimport * as cjk from 'cjk-regex'\n\nconst cjkCharset = cjk.all()\ncjkCharset.toRegExp().test('a') //=> false\ncjkCharset.toRegExp().test('。') //=> true\ncjkCharset.toRegExp().test('中') //=> true\n\nconst cjkLetterCharset = cjk.letters()\ncjkLetterCharset.toRegExp().test('a') //=> false\ncjkLetterCharset.toRegExp().test('。') //=> false\ncjkLetterCharset.toRegExp().test('中') //=> true\n\nconst cjkPunctuationCharset = cjk.punctuations()\ncjkPunctuationCharset.toRegExp().test('a') //=> false\ncjkPunctuationCharset.toRegExp().test('。') //=> true\ncjkPunctuationCharset.toRegExp().test('中') //=> false\n```\n\nReturns a [Charset](https://github.com/ikatyang/regexp-util#charset).\n\n## Development\n\n```sh\n# lint\npnpm run lint\n\n# build\npnpm run build\n\n# test\npnpm run test\n```\n\n## License\n\nMIT © [Ika](https://github.com/ikatyang)\n","publish_time":1741409370133,"_cnpm_publish_time":1741409370133,"dist-tags":{"latest":"3.5.0"}}