@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
Here’s an online demo.
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