{"name":"cjk-regex","type":"module","version":"3.1.0","description":"regular expression for matching CJK text","keywords":["cjk","regular-expression"],"exports":"./lib/index.js","repository":{"type":"git","url":"git+https://github.com/ikatyang/cjk-regex.git"},"homepage":"https://github.com/ikatyang/cjk-regex#readme","author":{"name":"Ika","email":"ikatyang@gmail.com","url":"https://github.com/ikatyang"},"license":"MIT","dependencies":{"regexp-util":"^2.0.0","unicode-regex":"^4.0.0"},"devDependencies":{"@vitest/coverage-v8":"0.33.0","prettier":"3.0.0","standard-version":"9.5.0","typescript":"5.1.6","vite":"4.4.2","vitest":"0.33.0"},"engines":{"node":">=16"},"packageManager":"pnpm@8.6.6","scripts":{"lint":"prettier --check .","test":"vitest","build":"tsc -p ./tsconfig.build.json","release":"standard-version"},"bugs":{"url":"https://github.com/ikatyang/cjk-regex/issues"},"_id":"cjk-regex@3.1.0","_integrity":"sha512-hM1tngsO2Sco+LesFtGHkkemNBJONUKCeY6RU2VqHBE5kDB8SdnCEJ5M3VoG7M7gL5Kx+GFlzaeSCKXEL9pGTA==","_resolved":"/tmp/0760f49c91fbe42058d3dec0283ae24c/cjk-regex-3.1.0.tgz","_from":"file:cjk-regex-3.1.0.tgz","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-hM1tngsO2Sco+LesFtGHkkemNBJONUKCeY6RU2VqHBE5kDB8SdnCEJ5M3VoG7M7gL5Kx+GFlzaeSCKXEL9pGTA==","shasum":"fb0638ba43ad2bd5b31589b36720e48f75348020","tarball":"http://registry-npm.ywwl.com/cjk-regex/download/cjk-regex-3.1.0.tgz","fileCount":6,"unpackedSize":6693,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/cjk-regex@3.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBKnC2flU71gAOHgYjTkCBtMdmJbKsuNNRFy9mGLj5mXAiEAk33FmIIMCNSeqod2G8XHhR+nqqsmZu2KPJ97773spiM="}],"size":2843,"noattachment":false,"key":"/cjk-regex/-/cjk-regex-3.1.0.tgz"},"_npmUser":{"name":"ikatyang","email":"ikatyang@gmail.com"},"directories":{},"maintainers":[{"name":"ikatyang","email":"ikatyang@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cjk-regex_3.1.0_1697880791664_0.03809940440730064"},"_hasShrinkwrap":false,"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%3Amaster)\n\nregular expression for matching CJK text\n\n[Changelog](https://github.com/ikatyang/cjk-regex/blob/master/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":1697880791926,"_cnpm_publish_time":1697880791926,"dist-tags":{"latest":"3.5.0"}}