string-escape-regex
v1.0.0
Published
A tiny function for escaping a string to be used as the source in a regex.
Downloads
65,027
Maintainers
Readme
String Escape Regex
A tiny function for escaping a string to be used as the source in a regex.
Install
npm install --save string-escape-regex
Usage
import escape from 'string-escape-regex';
escape ( 'foo()' ); // => 'foo\\(\\)'
License
MIT © Fabio Spampinato