@babel/plugin-transform-dotall-regex

NOTE: This plugin is included in @babel/preset-env, in ES2018

Example

In

  1. /./s;

Out

  1. /[\0-\uFFFF]/;

In

  1. /./su;

Out

  1. /[\0-\u{10FFFF}]/u;

Here’s an online demo.

Installation

  1. npm install --save-dev @babel/plugin-transform-dotall-regex

Usage

.babelrc

  1. {
  2. "plugins": ["@babel/plugin-transform-dotall-regex"]
  3. }

Via CLI

  1. $ babel --plugins @babel/plugin-transform-dotall-regex script.js

Via Node.js API

  1. require("@babel/core").transformSync(code, {
  2. plugins: ["@babel/plugin-transform-dotall-regex"],
  3. });

Author

twitter/mathias
Mathias Bynens