To use the generated data, simply install one of the npm modules generated by this script. Separate packages are available for each Unicode version. This allows you to do stuff like:
// Get an array of all code points with the `White_Space` property:var codePoints = ;// Get an array of strings (containing one symbol each) in the `Lu` category:var symbols = ;// Get a regular expression that matches any symbol in the `Aegean Numbers` block:var regex = ;// Get an array of all code points in the `Egyptian_Hieroglyphs` script:var hieroglyphs = ;// …you get the idea.
For more information, see the README for the package you’re interested in. Here’s the full list of npm packages generated by this script:
Note that these READMEs are auto-generated by this script, too – they describe all the data that is available for that particular Unicode version.
npm run-script download (re-)downloads the Unicode source files for all the Unicode versions defined in
data/resources.js, saving them in the
npm run-script generate generates data for categories, scripts, blocks, and properties for all the Unicode versions defined in
data/resources.js. This may take a few minutes… In total, roughly 1.5 GB of data is generated. The regular expressions are generated using Regenerate, and Punycode.js is used to convert code point arrays into arrays of symbols.
npm test generates the data for the oldest and latest available Unicode version. This is a good way to test changes to the generator scripts before running
npm run-script generate.
npm run-script cover generates the code coverage report.
This module is available under the MIT license.