decord/source/13409_result4.js

52 lines
1.3 KiB
JavaScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 13409
// Function ID: 102944
2026-07-23 10:11:24 +00:00
// Name: result4
2026-07-20 16:05:17 +00:00
// Dependencies: []
2026-07-24 07:16:23 +00:00
// Module 13409 (result4)
2026-07-20 16:05:17 +00:00
arg5.default = function repl() {
return (arg0) => {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
2026-07-20 16:05:17 +00:00
let closure_1 = {};
2026-07-23 10:11:24 +00:00
obj = {
2026-07-20 16:05:17 +00:00
onCommand(arg0) {
2026-07-23 10:11:24 +00:00
let closure_0;
2026-07-20 16:05:17 +00:00
let type;
({ type, payload: closure_0 } = arg0);
if ("repl." === type.substr(0, 5)) {
const substr = type.substr(5);
if ("ls" === substr) {
const _Object = Object;
2026-07-23 10:11:24 +00:00
closure_0.send("repl.ls.response", Object.keys(closure_1));
2026-07-20 16:05:17 +00:00
} else if ("execute" === substr) {
const fn = () => {
// DirectEval (0x5e)
return closure_0;
};
2026-07-23 10:11:24 +00:00
closure_0.send("repl.execute.response", fn.call(closure_1));
2026-07-20 16:05:17 +00:00
}
}
},
features: obj
};
obj = {
repl(arg0, arg1) {
if (arg0) {
2026-07-23 10:11:24 +00:00
if (table[arg0]) {
2026-07-20 16:05:17 +00:00
const _Error2 = Error;
const error = new Error("You are already REPLing an item with that name");
throw error;
} else {
2026-07-23 10:11:24 +00:00
table[arg0] = arg1;
2026-07-20 16:05:17 +00:00
}
} else {
const _Error = Error;
const error1 = new Error("You must provide a name for your REPL");
throw error1;
}
}
};
return obj;
};
};