babel-plugin-add-regex-unicode

3.0.0 • Public • Published

babel-plugin-add-regex-unicode

Babel plugin to add regex Unicode flag

Build Status

This babel plugin will add /u flag to all your literal unicode regexp so that you don't need to remember to do it.

Off course it won't add it twice ;)

Now you can have fun with regex sleeping safely at night that you are handling unicode correctly

$ npm install babel-plugin-add-regex-unicode --save-dev

.babelrc

{
  "plugins": [
    ["babel-plugin-add-regex-unicode"]
  ]
}

Source Code:

var regex = /anything/;

Output Code:

var regex = /anything/u;

License

MIT © Gilad Peleg

Package Sidebar

Install

npm i babel-plugin-add-regex-unicode

Weekly Downloads

2

Version

3.0.0

License

MIT

Unpacked Size

2.99 kB

Total Files

4

Last publish

Collaborators

  • pgilad