{"name":"cjk-regex","version":"1.0.1","description":"regular expression for matching CJK texts","keywords":["cjk","regular-expression"],"main":"lib/index.js","types":"lib/index.d.ts","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","scripts":{"prepublish":"yarn run build","lint":"tslint -p ./tsconfig.json --type-check","test":"jest","prebuild":"rm -rf ./lib","build":"tsc -p ./tsconfig.build.json","release":"standard-version"},"dependencies":{},"devDependencies":{"@types/jest":"21.1.2","jest":"21.2.1","prettier":"1.7.4","prettier-config-ikatyang":"1.1.1","standard-version":"4.2.0","ts-jest":"21.1.2","tslint":"5.7.0","tslint-config-ikatyang":"2.4.0","tslint-config-prettier":"1.5.0","tslint-plugin-prettier":"1.3.0","typescript":"2.5.3"},"engines":{"node":">= 4"},"files":["/lib/**/*"],"gitHead":"94d70e85f3dbefb8760781a16782d5fb144bffb8","bugs":{"url":"https://github.com/ikatyang/cjk-regex/issues"},"_id":"cjk-regex@1.0.1","_npmVersion":"5.3.0","_nodeVersion":"8.6.0","_npmUser":{"name":"ikatyang","email":"ikatyang@gmail.com"},"dist":{"integrity":"sha512-JWJ0lHznDAoo+rL2tAurwZyzx9MTmMiGVRu3kQH37dtS4vbTD7IVzvAbu230wPcpZUjb7gsebxueFfCDtnkXdg==","shasum":"9bee3087e5e4e943549ace766b5d95a9b700dd41","tarball":"http://registry-npm.ywwl.com/cjk-regex/download/cjk-regex-1.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCn2AW/zDzf37XfZe3bC9iaresw7w4W9E9Yr00NTfM68QIgW26B9aG89N58wb44BgCEDN848yKbTFzncoMPzXSmGII="}],"size":2763,"noattachment":false,"key":"/cjk-regex/-/cjk-regex-1.0.1.tgz"},"maintainers":[{"name":"ikatyang","email":"ikatyang@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cjk-regex-1.0.1.tgz_1507903085236_0.8190337102860212"},"directories":{},"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":1507903085302,"_cnpm_publish_time":1507903085302,"dist-tags":{"latest":"3.5.0"}}