babel-plugin-transform-dotall-regex

Compile regular expressions using the `s` (`dotAll`) flag to ES5.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
babel-plugin-transform-dotall-regex
1.0.16 years ago8 years agoMinified + gzip package size for babel-plugin-transform-dotall-regex in KB

Readme

babel-plugin-transform-dotall-regex Build status
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.
Here’s an online demo.

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

| twitter/mathias | |---| | Mathias Bynens |

License

This code is available under the MIT license.