Skip to content

ILFront-End/pubsubz

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

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

About

Another Pub/Sub implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published