JSPM

browser-pubsub

1.2.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q19985F
  • License ISC

PubSub in the browser, across tabs & windows. Just 0.5kb

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