Node.js Custom Event/Messaging system lib
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
signals.js

README.md

Signals for Node.js

Node.js version of JS Signals by Miller Medeiros. For documentation read JS Signals documentation.

Example

var signals = require('./signals');

//custom object that dispatch a `started` signal
var myObject = {
  started : new signals.Signal()
};
function onStarted(param1, param2){
  console.log(param1 + param2);
}
myObject.started.add(onStarted); //add listener
myObject.started.dispatch('foo', 'bar'); //dispatch signal passing custom parameters
myObject.started.remove(onStarted); //remove a single listener

License

Released under MIT License. Enjoy and Fork!