MCPcopy Index your code
hub / github.com/pubkey/broadcast-channel

github.com/pubkey/broadcast-channel @7.3.0 sqlite

repository ↗ · DeepWiki ↗ · release 7.3.0 ↗
1,741 symbols 3,712 edges 55 files 108 documented · 6% 5 cross-repo links
README

BroadcastChannel

A BroadcastChannel that works in old browsers, new browsers, WebWorkers and NodeJs and Deno

+ LeaderElection over the channels

<a href="https://twitter.com/pubkeypubkey">
    <img src="https://img.shields.io/twitter/follow/pubkeypubkey.svg?style=social&logo=twitter"
        alt="follow on Twitter" />
</a>

demo.gif


A BroadcastChannel that allows you to send data between different browser-tabs or nodejs-processes. And a LeaderElection over the channels.

Read the full documentation on github

Sponsored by

<a href="https://rxdb.info/?utm_source=github&utm_medium=repo&utm_campaign=github-broadcast-channel-npm">
    <img
        src="https://rxdb.info/files/logo/logo_text.svg"
        alt="JavaScript Database"
        width="300"
     />






     <span>The <b>JavaScript Database</b></span>
</a>

Extension points exported contracts — how you extend this code

BroadcastChannelEventMap (Interface)
(no doc)
types/broadcast-channel.d.ts
BroadcastMethod (Interface)
(no doc)
types/broadcast-channel.d.ts

Core symbols most depended-on inside this repo

has
called by 161
docs/e2e.js
close
called by 146
types/broadcast-channel.d.ts
$export
called by 118
docs/index.js
$export
called by 118
docs/iframe.js
$export
called by 118
docs/e2e.js
$export
called by 118
docs/leader-iframe.js
$export
called by 118
docs/worker.js
postMessage
called by 99
types/broadcast-channel.d.ts

Shape

Function 1,694
Method 29
Class 16
Interface 2

Languages

TypeScript100%

Modules by API surface

docs/e2e.js661 symbols
docs/worker.js353 symbols
docs/iframe.js190 symbols
docs/leader-iframe.js189 symbols
docs/index.js189 symbols
src/methods/node.js32 symbols
src/methods/indexed-db.js19 symbols
src/broadcast-channel.js19 symbols
src/leader-election.js14 symbols
types/broadcast-channel.d.ts11 symbols
src/methods/localstorage.js11 symbols
src/util.js6 symbols

Dependencies from manifests, versioned

@babel/cli7.28.6 · 1×
@babel/core7.28.6 · 1×
@babel/plugin-proposal-object-rest-spread7.20.7 · 1×
@babel/plugin-transform-member-expression-literals7.27.1 · 1×
@babel/plugin-transform-property-literals7.27.1 · 1×
@babel/plugin-transform-runtime7.28.5 · 1×
@babel/polyfill7.12.1 · 1×
@babel/preset-env7.28.6 · 1×
@babel/runtime7.28.6 · 1×
@babel/types7.28.6 · 1×
@rollup/plugin-terser0.4.4 · 1×
@types/core-js2.5.8 · 1×

For agents

$ claude mcp add broadcast-channel \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact