# nk-mediator

> Mediator pattern

Latest version **1.1.1** (published 2015-10-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install nk-mediator
pnpm add nk-mediator
yarn add nk-mediator
bun add nk-mediator
```

## 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.1.1 |
| Published | 2015-10-15 |
| First published | 2014-12-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Antoine Lehurt |
| Maintainers | kewah |
| Keywords | mediator, component, emitter |

## Links

- npm: https://www.npmjs.com/package/nk-mediator
- Repository: https://github.com/nk-components/mediator
- Issues: https://github.com/nk-components/mediator/issues
- npm.io page: https://npm.io/package/nk-mediator

## Dependencies (1)

- [component-emitter](https://npm.io/package/component-emitter.md) ^1.1.3

## 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.1.1 (latest) — 2015-10-15
- 1.1.0 — 2014-12-04
- 1.0.1 — 2014-12-02

## README

# mediator

Mediator module (based on [component/emitter](https://github.com/component/emitter))

## Installation

Install with [component(1)](http://component.io):

```bash
$ component install nk-components/mediator
```

With npm:

```bash
$ npm i -S nk-mediator
```

## Usage

```js
var mediator = require('nk-mediator');

function handler(param) {}

mediator.sub('channel', handler);
mediator.subOnce('channel', function(param) {});

mediator.unsub('channel', handler);

mediator.pub('channel', 'param1', 'param2');
```

## License

MIT

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