JSPM

@bestyled/contrib-event-emitter

0.5.9
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q33996F
  • License MIT

Simple Event Emitter

Package Exports

  • @bestyled/contrib-event-emitter

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@bestyled/contrib-event-emitter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@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