23 lines
487 B
JavaScript
23 lines
487 B
JavaScript
// Module ID: 4222
|
|
// Function ID: 4223
|
|
// Name: escapeRegExp
|
|
// Dependencies: [762]
|
|
|
|
// Module 4222 (escapeRegExp)
|
|
import toString from "toString" /* 762 */;
|
|
|
|
const tmp = /[\\^$.*+?()[\]{}|]/g;
|
|
const re2 = tmp;
|
|
let closure_3 = RegExp(tmp.source);
|
|
|
|
export default function escapeRegExp(arg0) {
|
|
const str = toString(arg0);
|
|
let replaced = str;
|
|
if (str) {
|
|
replaced = str;
|
|
if (regex.test(str)) {
|
|
replaced = str.replace(closure_2, "\\$&");
|
|
}
|
|
}
|
|
return replaced;
|
|
};
|