Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
@babel/plugin-transform-unicode-property-regex
Advanced tools
Compile Unicode property escapes in Unicode regular expressions to ES5.
The @babel/plugin-transform-unicode-property-regex package is a plugin for Babel, a JavaScript compiler, that transforms Unicode property escapes in regular expressions into a set of Unicode code points, allowing developers to write more readable and maintainable regular expressions for Unicode characters. This plugin is especially useful when targeting environments that do not support the latest ECMAScript standards.
Transform Unicode Property Escapes
This code sample demonstrates how a Unicode property escape for matching any character in the Greek script is transformed into a regular expression that matches the equivalent set of Unicode code points.
/\p{Script=Greek}/u
The regexpu-core package is a regular expression polyfill that transforms Unicode property escapes and other modern RegExp features to be compatible with older JavaScript environments. It provides similar functionality to @babel/plugin-transform-unicode-property-regex but can be used independently of Babel.
This Babel plugin transforms new RegExp constructors to string literals to ensure compatibility with older environments. While it does not specifically target Unicode property escapes, it addresses the broader issue of RegExp compatibility which is a related concern.
Compile Unicode property escapes in Unicode regular expressions to ES5.
See our website @babel/plugin-transform-unicode-property-regex for more information.
Using npm:
npm install --save-dev @babel/plugin-transform-unicode-property-regex
or using yarn:
yarn add @babel/plugin-transform-unicode-property-regex --dev
FAQs
Compile Unicode property escapes in Unicode regular expressions to ES5.
We found that @babel/plugin-transform-unicode-property-regex demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.