UNPKG

escape-string-regexp-browser

Version:
1 lines 173 B
"use strict";module.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};