decord/source/module_7734.js

17 lines
346 B
JavaScript
Raw Normal View History

2026-08-04 08:36:32 +00:00
// Module ID: 7734
// Function ID: 7735
2026-07-21 06:55:02 +00:00
// Dependencies: []
2026-08-04 08:36:32 +00:00
// Module 7734
2026-07-23 10:11:24 +00:00
const re0 = /[|\\{}()[\]^$+*?.-]/g;
2026-07-21 06:55:02 +00:00
2026-07-21 22:01:30 +00:00
export default (str) => {
2026-08-04 21:03:28 +00:00
if (typeof str !== "string") {
2026-07-21 22:01:30 +00:00
const _TypeError = TypeError;
const typeError = new TypeError("Expected a string");
throw typeError;
} else {
return str.replace(closure_0, "\\$&");
}
};