25 lines
No EOL
454 B
JavaScript
25 lines
No EOL
454 B
JavaScript
let on = async function (input, objects) {
|
|
objects.events.addEventListener(input[0],(async function() {
|
|
for (let a of input[1]) {
|
|
await a();
|
|
}
|
|
}));
|
|
}
|
|
|
|
let echo = async function (input, objects) {
|
|
console.log(input);
|
|
return input;
|
|
}
|
|
|
|
let add = async function (input, objects) {
|
|
return input[0] * 1 + input[1] * 1;
|
|
}
|
|
|
|
let events = new EventTarget();
|
|
|
|
export default {
|
|
on,
|
|
events,
|
|
echo,
|
|
add
|
|
}; |