JSPM

  • Created
  • Published
  • Downloads 28746576
  • Score
    100M100P100Q286367F
  • License MIT

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

Package Exports

  • @babel/plugin-transform-dotall-regex

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@babel/plugin-transform-dotall-regex) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@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

.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

twitter/mathias
Mathias Bynens