UNPKG

@stream-io/escape-string-regexp

Version:

Escape RegExp special characters

3 lines (2 loc) 209 B
function e(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}export{e as default}; //# sourceMappingURL=index.module.js.map