Remix.run Logo
blatantly 3 days ago

23 byte version:

    // Lib code>>
    s={};call=(n)=>{s[n]()}
    // <<

    s.hello=()=>console.log('hello');
    call('hello');
    delete s.hello;
pavlov 3 days ago | parent [-]

This is missing the subscription feature?

Multiple independent listeners should be able to attach a callback that fires when “hello” is called.