Skip to content

jaredmcateer/subpub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

SubPub

SubPub is a simple Publish/Subscription object.

How to use

Subscribe

subPub.subscribe('your subscription name', handlerFunction);

Publish

The optional dataMemo parameter will be passed on to the subscribed function handlers

subPub.publish('your subscriptio name'[, dataMemo]);

Unsubscribe

If you do not specify the function handler to unsubscribe, all handlers subscribed to the key will be removed.

subPub.unsubscribe('your subscription name'[, handlerFunction]);

About

A lightweight framework agnostic pub/sub observer object

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published