decord/source/module_1559.js

28 lines
649 B
JavaScript
Raw Normal View History

2026-08-11 06:20:06 +00:00
// Module ID: 1559
// Function ID: 1560
2026-07-20 16:05:17 +00:00
// Dependencies: []
2026-08-11 06:20:06 +00:00
// Module 1559
2026-07-20 16:05:17 +00:00
2026-08-15 05:55:55 +00:00
export default (str, str2) => {
if (typeof str === "string") {
if (typeof str2 === "string") {
if ("" === str2) {
const items = [str];
return items;
} else {
const index = str.indexOf(str2);
if (-1 === index) {
const items1 = [str];
let items2 = items1;
} else {
items2 = [str.slice(0, index), str.slice(index + str2.length)];
}
return items2;
}
2026-07-20 16:05:17 +00:00
}
}
2026-08-15 05:55:55 +00:00
const typeError = new TypeError("Expected the arguments to be of type `string`");
throw typeError;
2026-07-20 16:05:17 +00:00
};