npm.io
1.0.0 • Published 7 years ago

@savalazic/event-bus

Licence
MIT
Version
1.0.0
Deps
0
Size
8 kB
Vulns
0
Weekly
0

event-bus

Simple Event Bus library for event management.

API

addEventListener

// @event - string
// @callback - function
EventBus.addEventListener(event, callback);
removeEventListener
// @event - string
// @callback - function
EventBus.removeEventListener(event, callback);
dispatchEvents
// @event - string
// @detail (optional) - object
EventBus.dispatchEvents(event, detail);

Example

All examples

Licence

event-bus is released under the MIT license. Copyright 2018 Sava Lazic.