broadcaster

1.0.10 • Public • Published

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);

Readme

Keywords

none

Package Sidebar

Install

npm i broadcaster

Weekly Downloads

0

Version

1.0.10

License

none

Last publish

Collaborators

  • chuckpreslar