
Security News
Node.js TSC Votes to Stop Distributing Corepack
Corepack will be phased out from future Node.js releases following a TSC vote.
unicode-canonical-property-names-ecmascript
Advanced tools
The set of canonical Unicode property names supported in ECMAScript RegExp property escapes.
The unicode-canonical-property-names-ecmascript npm package provides a comprehensive list of canonical Unicode property names as defined in the ECMAScript specification. This package is particularly useful for developers working with internationalization, regular expressions, and any functionality that requires manipulation or recognition of Unicode characters based on their properties.
Retrieving Canonical Unicode Property Names
This feature allows developers to check if a given property name is a canonical Unicode property name according to the ECMAScript specification. The code sample demonstrates how to check if certain strings are recognized canonical property names.
"use strict";
const unicodeProps = require('unicode-canonical-property-names-ecmascript');
console.log(unicodeProps.includes('ASCII')); // false
console.log(unicodeProps.includes('General_Category')); // true
Similar to unicode-canonical-property-names-ecmascript, this package provides aliases for Unicode property names as per the ECMAScript specification. While unicode-canonical-property-names-ecmascript focuses on canonical names, unicode-property-aliases-ecmascript deals with their aliases, offering a complementary functionality for developers dealing with Unicode properties.
regexpu-core is a package that allows you to transform Unicode-aware regular expressions into equivalent ES5 regular expressions. Although it serves a different purpose by focusing on regular expression transformation, it shares the common theme of enhancing Unicode support in JavaScript, similar to what unicode-canonical-property-names-ecmascript offers by providing property names for Unicode character recognition.
unicode-canonical-property-names-ecmascript exports the set of canonical Unicode property names that are supported in ECMAScript RegExp property escapes.
To use unicode-canonical-property-names-ecmascript, install it as a dependency via npm:
$ npm install unicode-canonical-property-names-ecmascript
Then, require
it:
const properties = require('unicode-canonical-property-names-ecmascript');
properties.has('ID_Start');
// → true
properties.has('IDS');
// → false
On the main
branch, bump the version number in package.json
:
npm version patch -m 'Release v%s'
Instead of patch
, use minor
or major
as needed.
Note that this produces a Git commit + tag.
Push the release commit and tag:
git push && git push --tags
Our CI then automatically publishes the new release to npm.
Mathias Bynens |
unicode-canonical-property-names-ecmascript is available under the MIT license.
FAQs
The set of canonical Unicode property names supported in ECMAScript RegExp property escapes.
The npm package unicode-canonical-property-names-ecmascript receives a total of 18,653,279 weekly downloads. As such, unicode-canonical-property-names-ecmascript popularity was classified as popular.
We found that unicode-canonical-property-names-ecmascript demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.
Research
Security News
Research uncovers Black Basta's plans to exploit package registries for ransomware delivery alongside evidence of similar attacks already targeting open source ecosystems.
Security News
Oxlint's beta release introduces 500+ built-in linting rules while delivering twice the speed of previous versions, with future support planned for custom plugins and improved IDE integration.