# @junk-temporary-prototypes/channels

Latest version **7.2.5** (published 2023-06-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @junk-temporary-prototypes/channels
pnpm add @junk-temporary-prototypes/channels
yarn add @junk-temporary-prototypes/channels
bun add @junk-temporary-prototypes/channels
```

## Health

**Score 50/100 (C)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 7.2.5 |
| Published | 2023-06-08 |
| First published | 2023-05-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 91445 |
| Maintainers | kasperpeulen, jreinhold |
| Keywords | storybook |

## Links

- npm: https://www.npmjs.com/package/@junk-temporary-prototypes/channels
- Repository: https://github.com/storybookjs/storybook
- Homepage: https://github.com/storybookjs/storybook/tree/main/lib/channels
- Issues: https://github.com/storybookjs/storybook/issues
- Funding: https://opencollective.com/storybook
- npm.io page: https://npm.io/package/@junk-temporary-prototypes/channels

## Recent versions

- 7.2.5 (latest) — 2023-06-08
- 7.2.0-pr-47-60d512b.0 (pr-47) — 2023-07-06
- 7.2.1 (next) — 2023-06-07
- 7.2.0-pr-46-b35a952.0 (pr-46) — 2023-06-06
- 7.2.0-pr-43-e055456.0 (pr-43) — 2023-06-05
- 7.2.0-pr-40-asdf123.0 (pr-40) — 2023-06-01
- 7.0.8-alpha.4 (next}) — 2023-05-25
- 7.1.0-beta.2 (beta) — 2023-05-01
- 7.1.0-alpha.1 (alpha) — 2023-05-01
- 7.2.4 — 2023-06-08
- 7.2.3 — 2023-06-08
- 7.2.2 — 2023-06-08
- 7.2.0 — 2023-06-06
- 7.2.0-pr-43-b6a1f17.0 — 2023-06-05
- 7.2.0-pr-43-3a3d678.0 — 2023-06-05
- … 16 more at https://npm.io/package/@junk-temporary-prototypes/channels/versions

## README

# Storybook Channel

Storybook Channel is similar to an EventEmitter.
Channels are used with Storybook implementations to send/receive events between the Storybook Manager and the Storybook Renderer.

```js
class Channel {
  addListener(type, listener) {}
  addPeerListener(type, listener) {} // ignore events from itself
  emit(type, ...args) {}
  eventNames() {}
  listenerCount(type) {}
  listeners(type) {}
  on(type, listener) {}
  once(type, listener) {}
  prependListener(type, listener) {}
  prependOnceListener(type, listener) {}
  removeAllListeners(type) {}
  removeListener(type, listener) {}
}
```

The channel takes a Transport object as a parameter which will be used to send/receive messages. The transport object should implement this interface.

```js
class Transport {
  send(event) {}
  setHandler(handler) {}
}
```

For more information visit: [storybook.js.org](https://storybook.js.org)

---
_Source: https://npm.io/package/@junk-temporary-prototypes/channels · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
