voll
voll copied to clipboard
Support Regex
Explore if could be possible handle regex expressions.
const test = voll('r[ae]d')
const output = test('red')
console.log(output) // => true
The strategy here is:
- Detect is the input text is a regex. Related: https://github.com/ljharb/is-regex
- If is a regex, calculate all the possibilities