Awesome
regexgen.macro
Convert your set of strings to optimized RegExps at build time with babel macros.
Installation
npm install --save-dev regexgen.macro
Usage
import regexgen from 'regexgen.macro'
regexgen('children dangerouslySetInnerHTML key ref autoFocus defaultValue')
regexgen([
'children',
'dangerouslySetInnerHTML',
'key',
'ref',
'autoFocus',
'defaultValue',
])
regexgen({
children: true,
dangerouslySetInnerHTML: true,
key: true,
ref: true,
autoFocus: true,
defaultValue: true,
})