Package Exports
- cjk-regex
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cjk-regex) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
cjk-regex
regular expression for matching CJK text
Install
# using npm
npm install --save cjk-regex
# using yarn
yarn add cjk-regexUsage
const cjk = require("cjk-regex");
const cjk_charset = cjk();
cjk_charset.toRegExp().test("a"); //=> false
cjk_charset.toRegExp().test("。"); //=> true
cjk_charset.toRegExp().test("中"); //=> true
const cjk_letter_charset = cjk.letters();
cjk_letter_charset.toRegExp().test("a"); //=> false
cjk_letter_charset.toRegExp().test("。"); //=> false
cjk_letter_charset.toRegExp().test("中"); //=> true
const cjk_punctuaion_charset = cjk.punctuations();
cjk_punctuaion_charset.toRegExp().test("a"); //=> false
cjk_punctuaion_charset.toRegExp().test("。"); //=> true
cjk_punctuaion_charset.toRegExp().test("中"); //=> falseReturns a Charset.
Development
# lint
yarn run lint
# build
yarn run build
# test
yarn run testLicense
MIT © Ika