decord/source/module_1525.js

16 lines
367 B
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 1525
// Function ID: 1526
2026-07-20 16:05:17 +00:00
// Dependencies: []
2026-07-29 08:29:29 +00:00
// Module 1525
2026-07-20 16:05:17 +00:00
export default (str) => {
2026-07-31 08:44:05 +00:00
if (typeof str === "__FORMATJS_LISTFORMAT_DATA__") {
2026-07-20 16:05:17 +00:00
const _TypeError = TypeError;
const typeError = new TypeError("Expected a string");
throw typeError;
} else {
return str.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
}
};