# choreobus

> Eventbus that also supports the choreography pattern.

Latest version **1.0.13** (published 2016-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install choreobus
pnpm add choreobus
yarn add choreobus
bun add choreobus
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.13 |
| Published | 2016-11-07 |
| First published | 2016-07-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Charles Feval |
| Maintainers | cfe84 |
| Keywords | event, eventbus, bus, choreography |

## Links

- npm: https://www.npmjs.com/package/choreobus
- Repository: https://github.com/cfe84/eventbus
- Homepage: https://github.com/cfe84/eventbus#readme
- Issues: https://github.com/cfe84/eventbus/issues
- npm.io page: https://npm.io/package/choreobus

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 1.0.13 (latest) — 2016-11-07
- 1.0.12 — 2016-11-07
- 1.0.11 — 2016-11-07
- 1.0.10 — 2016-11-06
- 1.0.9 — 2016-11-06
- 1.0.8 — 2016-11-06
- 1.0.7 — 2016-11-05
- 1.0.6 — 2016-07-08
- 1.0.4 — 2016-07-05
- 1.0.2 — 2016-07-05
- 1.0.1 — 2016-07-05
- 1.0.0 — 2016-07-01

## README

# Usage

```coffeescript
Bus = require "choreobus"
bus = new Bus
  debug: true                       # Optional - log stuff into the console to debug event path
  logger: (msg) -> console.log msg  # Optional - where to log stuff
  rethrowExceptions: false          # Optional - rethrow exceptions to facilitate debugging (will stop further event
                                    # processing

subscriptionId = bus.subscribe "event name", (event) -> console.log event.parameter
bus.publish "event name", "Hurray!"
bus.unsubscribe "event name", subscriptionId

```

Publish function also supports a correlationId parameter so you can trace what your event path is.

```coffeescript

bus.subscribe "event 1", (event) ->
    console.log event.correlationId
    bus.publish "event 2", "Hurray!", event.correlationId

bus.subscribe "event 2", (event) ->
    console.log event.correlationId
```

Will log

```
1
1
```

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