1 | # regenerate-unicode-properties [![Build status](https://travis-ci.org/mathiasbynens/regenerate-unicode-properties.svg?branch=main)](https://travis-ci.org/mathiasbynens/regenerate-unicode-properties) [![regenerate-unicode-properties on npm](https://img.shields.io/npm/v/regenerate-unicode-properties)](https://www.npmjs.com/package/regenerate-unicode-properties)
|
---|
2 |
|
---|
3 | _regenerate-unicode-properties_ is a collection of [Regenerate](https://github.com/mathiasbynens/regenerate) sets for [various Unicode properties](https://github.com/tc39/proposal-regexp-unicode-property-escapes).
|
---|
4 |
|
---|
5 | ## Installation
|
---|
6 |
|
---|
7 | To use _regenerate-unicode-properties_ programmatically, install it as a dependency via [npm](https://www.npmjs.com/):
|
---|
8 |
|
---|
9 | ```bash
|
---|
10 | $ npm install regenerate-unicode-properties
|
---|
11 | ```
|
---|
12 |
|
---|
13 | ## Usage
|
---|
14 |
|
---|
15 | To get a map of supported properties and their values:
|
---|
16 |
|
---|
17 | ```js
|
---|
18 | const properties = require('regenerate-unicode-properties');
|
---|
19 | ```
|
---|
20 |
|
---|
21 | To get a specific Regenerate set:
|
---|
22 |
|
---|
23 | ```js
|
---|
24 | // Examples:
|
---|
25 | const Lu = require('regenerate-unicode-properties/General_Category/Uppercase_Letter.js');
|
---|
26 | const Greek = require('regenerate-unicode-properties/Script_Extensions/Greek.js');
|
---|
27 | ```
|
---|
28 |
|
---|
29 | To get the Unicode version the data was based on:
|
---|
30 |
|
---|
31 | ```js
|
---|
32 | const unicodeVersion = require('regenerate-unicode-properties/unicode-version.js');
|
---|
33 | ```
|
---|
34 |
|
---|
35 | ## For maintainers
|
---|
36 |
|
---|
37 | ### How to publish a new release
|
---|
38 |
|
---|
39 | 1. On the `main` branch, bump the version number in `package.json`:
|
---|
40 |
|
---|
41 | ```sh
|
---|
42 | npm version patch -m 'Release v%s'
|
---|
43 | ```
|
---|
44 |
|
---|
45 | Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/).
|
---|
46 |
|
---|
47 | Note that this produces a Git commit + tag.
|
---|
48 |
|
---|
49 | 1. Push the release commit and tag:
|
---|
50 |
|
---|
51 | ```sh
|
---|
52 | git push && git push --tags
|
---|
53 | ```
|
---|
54 |
|
---|
55 | Our CI then automatically publishes the new release to npm.
|
---|
56 |
|
---|
57 | ## Author
|
---|
58 |
|
---|
59 | | [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
|
---|
60 | |---|
|
---|
61 | | [Mathias Bynens](https://mathiasbynens.be/) |
|
---|
62 |
|
---|
63 | ## License
|
---|
64 |
|
---|
65 | _regenerate-unicode-properties_ is available under the [MIT](https://mths.be/mit) license.
|
---|