Compile ES2015 sticky regex to an ES5 RegExp constructor
> Compile ES2015 sticky regex to an ES5 RegExp constructor
``sh`
npm install --save-dev babel-plugin-transform-es2015-sticky-regex
.babelrc
`json`
{
"plugins": ["transform-es2015-sticky-regex"]
}
`sh`
babel --plugins transform-es2015-sticky-regex script.js
`javascript``
require("babel-core").transform("code", {
plugins: ["transform-es2015-sticky-regex"]
});