1.1.3 • Published 7 years ago
str-to-regexp v1.1.3
Converts a string to a regex object with flags.
Installation
npm install str-to-regexp
Usage
import toRegExp from 'str-to-regexp'
let regex = toRegExp('pattern')
let regex = toRegExp('/pattern/')
let regex = toRegExp('/pattern/flags')