babel-plugin-transform-unicode-property-regex
Compile Unicode property escapes (\p{…}
and \P{…}
) in Unicode regular expressions to ES5 or ES6 that works in today’s environments.
Note: the Unicode property escape syntax is non-standard and may or may not reflect what eventually gets specified.
Installation
$ npm install babel-plugin-transform-unicode-property-regex
Usage
.babelrc
(recommended)
Via .babelrc
Via CLI
$ babel --plugins transform-unicode-property-regex script.js
Via Node.js API
;
To transpile to ES6/ES2015:
;
Author
Mathias Bynens |
License
This code is available under the MIT license.