raptor-pubsub
Super lightweight module to support EventEmitter-based Pub/Sub communication in the browser and on the server.
Installation
npm install raptor-pubsub --save
Usage
Communicating on the global pub/sub channel
var raptorPubsub = ; // Subscribe to an eventraptorPubsub; // Publish an eventraptorPubsub;
Communicating on named pub/sub channels
// Get a reference to named pub/sub channelvar channel = ; // Subscribe to an eventchannel; // Publish an eventchannel; // Removing a channel;
The global pub/sub channel and named channels are simply EventEmitter instances.
Contributors
- Patrick Steele-Idem (Twitter: @psteeleidem)
Contribute
Pull Requests welcome. Please submit Github issues for any feature enhancements, bugs or documentation problems.
License
Apache License v2.0