@mr-samani/event-bus
Version:
A lightweight JavaScript event bus for any framework with auto-global support
2 lines • 454 B
JavaScript
var a={events:{},on(e,s){this.events[e]||(this.events[e]=[]),this.events[e].push(s);},off(e){delete this.events[e];},trigger(e,...s){this.events[e]&&this.events[e].forEach(n=>n(...s));}},i=a;typeof window!="undefined"?(window.app||(window.app={}),window.app.event=i):typeof globalThis!="undefined"&&(globalThis.app||(globalThis.app={}),globalThis.app.event=i);var r=i;export{r as default};//# sourceMappingURL=auto.js.map
//# sourceMappingURL=auto.js.map