Nutritious Pumpkin Masses

    This package has been deprecated

    Author message:

    Use @babel/plugin-proposal-unicode-property-regex instead.

    babel-plugin-transform-unicode-property-regex

    2.0.5 • Public • Published

    babel-plugin-transform-unicode-property-regex Build status

    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.

    Here’s an online demo.

    Installation

    $ npm install babel-plugin-transform-unicode-property-regex

    Usage

    Via .babelrc (recommended)

    .babelrc

    {
      "plugins": ["transform-unicode-property-regex"]
    }

    Via CLI

    $ babel --plugins transform-unicode-property-regex script.js

    Via Node.js API

    require('babel-core').transform(code, {
      'plugins': ['transform-unicode-property-regex']
    });

    To transpile to ES6/ES2015:

    require('babel-core').transform(code, {
      'plugins': [
        ['transform-unicode-property-regex', { 'useUnicodeFlag': true }]
      ]
    });

    Author

    twitter/mathias
    Mathias Bynens

    License

    This code is available under the MIT license.

    Install

    npm i babel-plugin-transform-unicode-property-regex

    DownloadsWeekly Downloads

    3,387

    Version

    2.0.5

    License

    MIT

    Last publish

    Collaborators

    • mathias