Skip to content

vash15/backbone.pubsub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pubsub

PubSub for the browser

Install

	bower install backbone.pubsub --save
	or 
	npm install backbone.pubsub --save

Usage

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

License

MIT