PubSub for the browser
bower install backbone.pubsub --save
or
npm install backbone.pubsub --save
var PubSub = require("backbone.pubsub");
var pubSub = new PubSub();
pubSub.on("custom:trigger", function(data){
console.log("Custom trigger fire!!", data);
});
setTimeout(function(){
pubSub.trigger("custom:trigger", {custom: data});
}, 5000);
MIT