cjk-regex

regular expression for matching CJK text
Changelog
Install
npm install cjk-regex
Usage
import * as cjk from 'cjk-regex'
const cjkCharset = cjk.all()
cjkCharset.toRegExp().test('a')
cjkCharset.toRegExp().test('。')
cjkCharset.toRegExp().test('中')
const cjkLetterCharset = cjk.letters()
cjkLetterCharset.toRegExp().test('a')
cjkLetterCharset.toRegExp().test('。')
cjkLetterCharset.toRegExp().test('中')
const cjkPunctuationCharset = cjk.punctuations()
cjkPunctuationCharset.toRegExp().test('a')
cjkPunctuationCharset.toRegExp().test('。')
cjkPunctuationCharset.toRegExp().test('中')
Returns a Charset.
Development
pnpm run lint
pnpm run build
pnpm run test
License
MIT © Ika