escapeRegExp.js 164 Bytes Raw Blame History Permalink 1 2 3 4 5 var makeString = require('./makeString'); module.exports = function escapeRegExp(str) { return makeString(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); };