$ cnpm install string-escape-regex
A tiny function for escaping a string to be used as the source in a regex.
npm install --save string-escape-regex
import escape from 'string-escape-regex';
escape ( 'foo()' ); // => 'foo\\(\\)'
MIT © Fabio Spampinato
Copyright 2013 - present © cnpmjs.org | Home |