regexgen.macro
v1.1.0
Published
🎣 Convert your set of strings to optimized RegExp at build time.
Downloads
4
Readme
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,
})