broadcaster

Singleton event emitter for inter-application communication.

npm install broadcaster
28 downloads in the last month

broadcaster logo

Singleton event emitter for inter-application communication. Just require to have the same instance across your application.

Usage

To run the tests:

$ npm install broadcaster
$ make test
$ open http://localhost:3000

And when ready to use:

$ make build

Ready for usage with RequireJS and Ender.

var broadcaster = require('broadcaster');

/**
 * Register a listener.
 */

broadcaster.on('some:event', function(a, b, c, d) {
  // Do something because some:event occured.
});

/**
 * Now lets emit an event.
 */

broadcaster.emit('some:event', 1, 2, 3, 4);
npm loves you