decord/source/module_1539.js
2026-08-06 08:05:19 +00:00

27 lines
649 B
JavaScript

// Module ID: 1539
// Function ID: 1540
// Dependencies: []
// Module 1539
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;
}
}
}
const typeError = new TypeError("Expected the arguments to be of type `string`");
throw typeError;
};