@bestyled/contrib-event-emitter
v0.5.9
Published
Simple Event Emitter
Downloads
4
Readme
@bestyled/contrib-event-emitter
A simpler event emitter for the browser
Features include:
- Event subscriptions return a
Disposable
object withdispose()
method to unsubscribe from event. - Group event subscriptions using
DisposablesComposite
and dispose them all with one call, i.eDisposableComposite#dispose()
- Listeners voice matters!! You can now dispatch an event using
EventEmitter#emithWithReturn
where each listener's return value can be accessed from returned array.
Motivation
Forked from Notificar
- Included as a core dependency of
bestyled
directly in the mono repository - Transpiled to typescript
- Standard to standard verbs
on
,emit
instead ofadd
,dispatch
License
MIT