Last active
March 30, 2017 05:39
-
-
Save DmitrySoshnikov/2502a262b15f1251ec11ffb3d521dfba to your computer and use it in GitHub Desktop.
regexp-tree-generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const regexpTree = require('regexp-tree'); | |
const re = regexpTree.generate({ | |
type: 'RegExp', | |
body: { | |
type: 'Char', | |
value: 'a', | |
kind: 'simple', | |
}, | |
flags: 'gi', | |
}); | |
console.log(re); // '/a/gi' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment