UNPKG

102 BJavaScriptView Raw
1export const escape = function(string) {
2 return string.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
3};