Installation
Install and save the pubsub module.
npm i --save pubsub
Or use with script tag
<script type="text/javascript" src="https://gitlab.me/wski/pubsub/raw/master/dist.js"></script>
Then simply require it at the root level of your project.
;
Usage
Join a channel
PubSub;
Leave a channel
// You can leave the channel by passing the uuid provided in join.PubSub ;
Publish to a channel
PubSub ;
Enable cross tab communication (for web applications)
PubSub;
Enable history
PubSub;
Increase history limit (default 15)
PubSub;
Get history
PubSubhistory'general' 15; // Returns 15 messages from history