6 lines
164 B
JavaScript
6 lines
164 B
JavaScript
|
var makeString = require('./makeString');
|
||
|
|
||
|
module.exports = function escapeRegExp(str) {
|
||
|
return makeString(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
|
||
|
};
|