addyosmani / Pubsubz
Another Pub/Sub implementation
Stars: ✭ 170
Programming Languages
javascript
184084 projects - #8 most used programming language
Just another compact library-agnostic Pub/Sub implementation.
Usage
var testSubscriber = function( topics , data ){
console.log( topics + ": " + data );
};
var testSubscription = pubsubz.subscribe( 'example1', testSubscriber );
pubsubz.publish( 'example1', 'hello world!' );
pubsubz.publish( 'example1', ['test','a','b','c'] );
pubsubz.publish( 'example1', [{'color':'blue'},{'text':'hello'}] );
setTimeout(function(){
pubsubz.unsubscribe( testSubscription );
}, 0);
pubsubz.publish( 'example1', 'hello again!' );
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].