1 | ;
|
2 | function escapeRegExp(str) {
|
3 | if (typeof str !== 'string')
|
4 | throw new TypeError('str must be a string!');
|
5 | // http://stackoverflow.com/a/6969486
|
6 | return str.replace(/[-[\]/{}()*+?.\\^$|]/g, '\\$&');
|
7 | }
|
8 | module.exports = escapeRegExp;
|
9 | //# sourceMappingURL=escape_regexp.js.map |
\ | No newline at end of file |