Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 439 Bytes

README.md

File metadata and controls

35 lines (22 loc) · 439 Bytes

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