babel-plugin-transform-es2015-unicode-regex
Compile ES2015 Unicode regex to ES5
Last updated 3 years ago by hzoo .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install babel-plugin-transform-es2015-unicode-regex 
SYNC missed versions from official npm registry.

babel-plugin-transform-es2015-unicode-regex

Compile ES2015 unicode regex to ES5

Example

In

var string = "foo????bar";
var match = string.match(/foo(.)bar/u);

Out

var string = "foo????bar";
var match = string.match(/foo((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))bar/);

Installation

npm install --save-dev babel-plugin-transform-es2015-unicode-regex

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["transform-es2015-unicode-regex"]
}

Via CLI

babel --plugins transform-es2015-unicode-regex script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-es2015-unicode-regex"]
});

Current Tags

  • 6.24.1                                ...           latest (3 years ago)
  • 7.0.0-beta.3                                ...           next (2 years ago)

34 Versions

  • 7.0.0-beta.3                                ...           2 years ago
  • 7.0.0-beta.2                                ...           3 years ago
  • 7.0.0-beta.1                                ...           3 years ago
  • 7.0.0-beta.0                                ...           3 years ago
  • 7.0.0-alpha.20                                ...           3 years ago
  • 7.0.0-alpha.19                                ...           3 years ago
  • 7.0.0-alpha.18                                ...           3 years ago
  • 7.0.0-alpha.17                                ...           3 years ago
  • 7.0.0-alpha.16                                ...           3 years ago
  • 7.0.0-alpha.15                                ...           3 years ago
  • 7.0.0-alpha.14                                ...           3 years ago
  • 7.0.0-alpha.12                                ...           3 years ago
  • 7.0.0-alpha.11                                ...           3 years ago
  • 7.0.0-alpha.10                                ...           3 years ago
  • 7.0.0-alpha.9                                ...           3 years ago
  • 7.0.0-alpha.8                                ...           3 years ago
  • 6.24.1                                ...           3 years ago
  • 7.0.0-alpha.7                                ...           3 years ago
  • 7.0.0-alpha.3                                ...           3 years ago
  • 7.0.0-alpha.1                                ...           3 years ago
  • 6.22.0                                ...           3 years ago
  • 6.11.0                                ...           4 years ago
  • 6.8.0                                ...           4 years ago
  • 6.5.0-1                                ...           4 years ago
  • 6.5.0                                ...           4 years ago
  • 6.4.3                                ...           4 years ago
  • 6.3.13                                ...           4 years ago
  • 6.2.4                                ...           4 years ago
  • 6.1.18                                ...           4 years ago
  • 6.1.17                                ...           4 years ago
  • 6.1.4                                ...           4 years ago
  • 6.0.18                                ...           4 years ago
  • 6.0.14                                ...           4 years ago
  • 6.0.2                                ...           4 years ago
Downloads
Today 213
This Week 48,128
This Month 29,799
Last Day 3,080
Last Week 51,956
Last Month 222,821
Dependencies (3)
Dev Dependencies (1)
Dependents (294)

Copyright 2014 - 2016 © taobao.org |