{"name":"cjk-regex","version":"3.4.0","keywords":["cjk","regular-expression"],"author":{"url":"https://github.com/ikatyang","name":"Ika","email":"ikatyang@gmail.com"},"license":"MIT","_id":"cjk-regex@3.4.0","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":"7364b9c1cf54eeee31ffe37458d0ee0dfdce62ed","tarball":"http://registry-npm.ywwl.com/cjk-regex/download/cjk-regex-3.4.0.tgz","fileCount":6,"integrity":"sha512-m+gbmlIP6gAG7tDvo2kpeSPAz/uh5wY5/zx10ymjdpbbiTHNTNoYnP2lCiyqtmbLxwhEdq8/lsVbsy4GTc9oUw==","signatures":[{"sig":"MEUCIQCSrI1Gyvt1gIfvecRyabbLfHo/ekuIf/pGruqrrYq9hAIgIvbDIIq9oJM6QTzDz//LdavLmuSKygyRjSnC/5suIGI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/cjk-regex@3.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":8105,"size":3230,"noattachment":false,"key":"/cjk-regex/-/cjk-regex-3.4.0.tgz"},"type":"module","_from":"file:cjk-regex-3.4.0.tgz","engines":{"node":">=16"},"exports":{"types":"./lib/index.d.ts","default":"./lib/index.js"},"scripts":{"fix":"prettier --write .","lint":"prettier --check .","test":"vitest","build":"tsc -p ./tsconfig.build.json","release":"standard-version"},"_npmUser":{"name":"ikatyang","email":"ikatyang@gmail.com"},"_resolved":"/tmp/3e0a84d7a9e0d5fcb7addfb4d47ddce5/cjk-regex-3.4.0.tgz","_integrity":"sha512-m+gbmlIP6gAG7tDvo2kpeSPAz/uh5wY5/zx10ymjdpbbiTHNTNoYnP2lCiyqtmbLxwhEdq8/lsVbsy4GTc9oUw==","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.19.4","dependencies":{"regexp-util":"^2.0.3","unicode-regex":"^4.2.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"7.1.3","vitest":"3.2.4","prettier":"3.6.2","typescript":"5.9.2","standard-version":"9.5.0","@vitest/coverage-v8":"3.2.4"},"_npmOperationalInternal":{"tmp":"tmp/cjk-regex_3.4.0_1756542848725_0.19175347983988544","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":1756542848919,"_cnpm_publish_time":1756542848919,"dist-tags":{"latest":"3.5.0"}}