|
2 år sedan | |
---|---|---|
.. | ||
lib | 2 år sedan | |
CHANGELOG.md | 2 år sedan | |
LICENSE | 2 år sedan | |
README.md | 2 år sedan | |
ThirdPartyNoticeText.txt | 2 år sedan | |
package.json | 2 år sedan |
regular expression for matching unicode category.
# using npm
npm install --save unicode-regex
# using yarn
yarn add unicode-regex
const unicode = require('unicode-regex');
const regex = unicode({ General_Category: ['Punctuation'] }).toRegExp();
regex.test('a'); //=> false
regex.test('"'); //=> true
regex.test('“'); //=> true
declare function unicode(categories: {
[category: string]: SubCategory[];
}): Charset;
Returns a Charset for further processing, e.g. union, intersect, etc.
(Data from node-unicode-data
)
# lint
yarn run lint
# build
yarn run build
# test
yarn run test
MIT © Ika