babel-plugin-transform-unicode-regexp-runtime

This replaces regexp literals and constructors that contain the unicode flag at compile time or at runtime if needed.

Usage no npm install needed!

<script type="module">
  import babelPluginTransformUnicodeRegexpRuntime from 'https://cdn.skypack.dev/babel-plugin-transform-unicode-regexp-runtime';
</script>

README

babel-plugin-transform-unicode-regexp-runtime

This replaces regexp literals and constructors that contain the unicode flag at compile time or at runtime if needed.

Installation

npm  install  --save-dev  babel-plugin-transform-unicode-regexp-runtime

Usage

Via .babelrc

.babelrc

{
  "plugins": [ "transform-unicode-regexp-runtime" ]
}

Via CLI

babel  --plugins transform-unicode-regexp-runtime  script.js

Via Node API

require('@babel/core').transform('code', {
  plugins: [ 'transform-unicode-regexp-runtime' ],
})