unicode-regex
regular expression for matching unicode category
Last updated a year ago by ikatyang .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install unicode-regex 
SYNC missed versions from official npm registry.

unicode-regex

npm build

regular expression for matching unicode category.

Changelog

Install

npm install unicode-regex

Usage

import unicode from 'unicode-regex'

const regex = unicode({ General_Category: ['Punctuation'] }).toRegExp()
regex.test('a') //=> false
regex.test('"') //=> true
regex.test('“') //=> true

API

declare function unicode(categories: {
  [category: string]: SubCategory[]
}): Charset

Returns a Charset for further processing, e.g. union, intersect, etc.

(Data from node-unicode-data)

Development

# lint
pnpm run lint

# build
pnpm run build

# test
pnpm run test

License

MIT © Ika

Current Tags

  • 4.0.0                                ...           latest (a year ago)

5 Versions

  • 4.0.0                                ...           a year ago
  • 3.0.0                                ...           5 years ago
  • 2.0.0                                ...           7 years ago
  • 1.0.1                                ...           7 years ago
  • 1.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (11)
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE