jobiqo-cl
Version:
[](https://circleci.com/gh/jobiqo/jobiqo-cl)
15 lines (12 loc) • 295 B
JavaScript
/**
* Escape regexp special characters in `str`.
*
* @param {String} str
* @return {String}
* @api public
*/
var escapeRegexp = function(str){
return String(str).replace(/([.*+?=^!:${}()|[\]\/\\])/g, '\\$1');
};
export default escapeRegexp;
export { escapeRegexp as __moduleExports };