Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pgilad/babel-plugin-add-regex-unicode
Babel plugin to add regex Unicode flag
https://github.com/pgilad/babel-plugin-add-regex-unicode
babel plugin productivity regexp unicode
Last synced: 28 days ago
JSON representation
Babel plugin to add regex Unicode flag
- Host: GitHub
- URL: https://github.com/pgilad/babel-plugin-add-regex-unicode
- Owner: pgilad
- License: mit
- Created: 2018-02-04T16:52:40.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-04-04T08:07:17.000Z (almost 5 years ago)
- Last Synced: 2024-11-24T09:15:46.780Z (about 2 months ago)
- Topics: babel, plugin, productivity, regexp, unicode
- Language: JavaScript
- Size: 24.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# babel-plugin-add-regex-unicode
> Babel plugin to add regex Unicode flag[![Build Status](https://travis-ci.org/pgilad/babel-plugin-add-regex-unicode.svg?branch=master)](https://travis-ci.org/pgilad/babel-plugin-add-regex-unicode)
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
```shell
$ npm install babel-plugin-add-regex-unicode --save-dev
```**.babelrc**
```json
{
"plugins": [
["babel-plugin-add-regex-unicode"]
]
}
```**Source Code**:
```js
var regex = /anything/;
```**Output Code**:
```js
var regex = /anything/u;
```## License
MIT © [Gilad Peleg](https://www.giladpeleg.com)