derw-lang/js/objs.mjs
2024-11-29 21:04:43 -05:00

21 lines
No EOL
369 B
JavaScript

let on = async function (input, objects) {
objects.events.addEventListener(input[0],input[1]);
}
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
};