3.0.0 • Published 4 years ago

babel-plugin-add-regex-unicode v3.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

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