Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
unicode-property-aliases-ecmascript
Advanced tools
Unicode property alias mappings in JavaScript format for property names that are supported in ECMAScript RegExp property escapes.
The unicode-property-aliases-ecmascript npm package provides a mapping of Unicode property alias names to their canonical property names as per the ECMAScript specification. This is useful for developers working with Unicode properties in regular expressions and other text processing tasks.
Mapping Unicode Property Aliases
This feature allows you to map a Unicode property alias to its canonical property name. For example, the alias 'scx' maps to 'Script_Extensions'.
const unicodePropertyAliases = require('unicode-property-aliases-ecmascript');
console.log(unicodePropertyAliases.get('scx')); // Outputs: 'Script_Extensions'
Iterating Over All Aliases
This feature allows you to iterate over all the alias-canonical name pairs in the mapping. This can be useful for debugging or for generating documentation.
const unicodePropertyAliases = require('unicode-property-aliases-ecmascript');
for (const [alias, canonical] of unicodePropertyAliases) {
console.log(`${alias} -> ${canonical}`);
}
This package provides a mapping of canonical Unicode property names to their canonical values as per the ECMAScript specification. Unlike unicode-property-aliases-ecmascript, which focuses on alias to canonical name mapping, this package focuses on canonical name to value mapping.
This package provides a function to match Unicode property names and values as per the ECMAScript specification. It is more focused on matching properties in regular expressions, whereas unicode-property-aliases-ecmascript is focused on alias to canonical name mapping.
This package provides a function to match Unicode property values as per the ECMAScript specification. It complements unicode-match-property-ecmascript by focusing on property values, while unicode-property-aliases-ecmascript focuses on alias to canonical name mapping.
unicode-property-aliases-ecmascript offers Unicode property alias mappings in an easy-to-consume JavaScript format. It only contains the Unicode property names that are supported in ECMAScript RegExp property escapes.
It’s based on Unicode’s PropertyAliases.txt
.
To use unicode-property-aliases-ecmascript programmatically, install it as a dependency via npm:
$ npm install unicode-property-aliases-ecmascript
Then, require
it:
const propertyAliases = require('unicode-property-aliases-ecmascript');
This module exports a Map
object. The most common usage is to convert a property alias to its canonical form:
propertyAliases.get('scx')
// → 'Script_Extensions'
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-property-aliases-ecmascript is available under the MIT license.
FAQs
Unicode property alias mappings in JavaScript format for property names that are supported in ECMAScript RegExp property escapes.
The npm package unicode-property-aliases-ecmascript receives a total of 17,135,466 weekly downloads. As such, unicode-property-aliases-ecmascript popularity was classified as popular.
We found that unicode-property-aliases-ecmascript demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.