Notable Pottery Manufacturer
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@bestyled/contrib-event-emitter

0.5.3 • Public • Published

@bestyled/contrib-event-emitter

A simpler event emitter for the browser

Features include:

  • Event subscriptions return a Disposable object with dispose() method to unsubscribe from event.
  • Group event subscriptions using DisposablesComposite and dispose them all with one call, i.e DisposableComposite#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 of add, dispatch

License

MIT

Install

npm i @bestyled/contrib-event-emitter

DownloadsWeekly Downloads

5

Version

0.5.3

License

MIT

Unpacked Size

14 kB

Total Files

8

Last publish

Collaborators

  • avatar