Package Exports
- browser-pubsub
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (browser-pubsub) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
browser-pubsub
PubSub in the browser, across tabs & windows. Just 0.5kb
Usage
// Create a new PubSub channel.
let Channel = new PubSub('my_channel');
// Easily subscribe, data provided via callback.
Channel.subscribe((data) => {
console.log(data);
});
// Publish a new message to channel.
Channel.publish({message: 'Hello world!'});