babel-plugin-transform-xregexp

v1.0.0
Use XRegExp syntax in your regular expressions
babel-plugin xregexp

babel-plugin-transform-xregexp

Use XRegExp syntax in your regular expressions. See the tests for a few examples of supported syntax. Note that not all XRegExp syntax can be parsed by Babel.

Installation

yarn add --dev babel-plugin-transform-xregexp
# or
npm install --save-dev babel-plugin-transform-xregexp

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["transform-xregexp"]
}

Via CLI

$ babel --plugins transform-xregexp script.js

Via Node API

require('babel').transform('code', {
  plugins: ['transform-xregexp']
});
npm i babel-plugin-transform-xregexp

Metadata

  • MIT
  • Whatever
  • Unknown
  • released 5/20/2018

Downloads

Maintainers