Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pull-notify

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pull-notify

Notify many listeners via pull-streams.

  • 0.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 27 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc