babel-plugin-transform-dotall-regex
v1.0.1 babel-plugin regex regexp regular expressions dotall
babel-plugin-transform-dotall-regex
Compile regular expressions using the s
(dotAll
) flag to ES5 that works in today’s environments.
For example, /./s
is transpiled into /[\0-\uFFFF]/
, and /./su
is transpiled into /[\0-\u{10FFFF}]/u
.
Installation
$ npm install babel-plugin-transform-dotall-regex
Usage
Via .babelrc
(recommended)
.babelrc
{
"plugins": ["transform-dotall-regex"]
}
Via CLI
$ babel --plugins transform-dotall-regex script.js
Via Node.js API
require('babel-core').transform(code, {
'plugins': ['transform-dotall-regex']
});
Author
Mathias Bynens |
License
This code is available under the MIT license.
npm i babel-plugin-transform-dotall-regex
Metadata
- MIT
- >=4
- Unknown
- released 12/19/2017