Shout.js
Yet another pub/sub implementation.
To install via Bower
bower install shoutUsage
var vent = new Shout();Shout.prototype.on( events, handler )
vent.on('whine', function( arg ) {
console.log('enough with the' + arg + 'already');
});Shout.prototype.emit( events[, arg1, arg2, ...] )
vent.emit('whine', 'Miley');
// 'enough with the Miley already'Shout.prototype.off( events[, handler ] )
vent.off('whine');Shout.prototype.once( events, handler )
vent.once('whine' function() {
console.log('This callback will only fire once.');
});To contribute
- Get set up
sudo npm install -g grunt-cli
npm install- Run the lint/test suite
grunt- Submit a pull request!
