1.0.0 • Published 5 years ago

@savalazic/event-bus v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

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.