JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6425
  • Score
    100M100P100Q137128F
  • License MIT

Package Exports

  • pull-notify

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 (pull-notify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

pull-notify

Notify many listeners via pull-streams.

you could use when you might otherwise use an event emitter. Why not just use an event emitter? EventEmitters have a weird security contract: anyone who can listen can also emit, and they can emit or listen to any events!

Instead, events should travel down a single channel, and the ability to emit an event should be separated from the ability to listen.

var Notify = require('pull-notify')

var notify = Notify()

//create a pull stream that listens on events.
//it will eventually get all events.
pull(notify.listen(), pull.drain(console.log))

notify('hello') //emit an event.

notify.end() //tell all listeners it's over.

listers can abort (using the normal pull-stream abort), and that will remove them from the list.

License

MIT