Original: https://github.com/mathiasbynens/babel-plugin-transform-dotall-regex Moving it into the official Babel repository makes it easier to maintain the transform.
@babel/plugin-transform-dotall-regex
Compile regular expressions using the
s(dotAll) flag to ES5 that works in today’s environments.
Example
In
/./s
Out
/[\0-\uFFFF]/
In
/./su
Out
/[\0-\u{10FFFF}]/u
Installation
npm install --save-dev @babel/plugin-transform-dotall-regex
Usage
Via .babelrc (recommended)
.babelrc
{
"plugins": ["@babel/plugin-transform-dotall-regex"]
}
Via CLI
$ babel --plugins @babel/plugin-transform-dotall-regex script.js
Via Node.js API
require('@babel/core').transform(code, {
'plugins': ['@babel/plugin-transform-dotall-regex']
});
Author
| Mathias Bynens |