16 lines
346 B
JavaScript
16 lines
346 B
JavaScript
// Module ID: 7753
|
|
// Function ID: 7754
|
|
// Dependencies: []
|
|
|
|
// Module 7753
|
|
const re0 = /[|\\{}()[\]^$+*?.-]/g;
|
|
|
|
export default (str) => {
|
|
if (typeof str !== "string") {
|
|
const _TypeError = TypeError;
|
|
const typeError = new TypeError("Expected a string");
|
|
throw typeError;
|
|
} else {
|
|
return str.replace(closure_0, "\\$&");
|
|
}
|
|
};
|