|
il y a 2 ans | |
---|---|---|
.. | ||
lib | il y a 2 ans | |
CHANGELOG.md | il y a 2 ans | |
LICENSE | il y a 2 ans | |
README.md | il y a 2 ans | |
ThirdPartyNoticeText.txt | il y a 2 ans | |
package.json | il y a 2 ans |
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