# mojo-mediator

> Mojo-mediator is a plugin that provides a communication layer for different parts of your application. It uses [mediocre.js](https://github.com/classdojo/mediocre.js).

Latest version **0.2.0** (published 2014-12-01) · BSD-2-Clause license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2014-12-01 |
| First published | 2013-12-02 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | architectd |
| Keywords | mojo-plugin, mediator |

## Links

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

## Dependencies (1)

- [mediocre](https://npm.io/package/mediocre.md) 0.2.x

## Recent versions

- 0.2.0 (latest) — 2014-12-01
- 0.1.0 — 2014-10-14
- 0.0.5 — 2014-06-09
- 0.0.4 — 2014-01-24
- 0.0.3 — 2014-01-24
- 0.0.1 — 2013-12-02

## README

Mojo-mediator is a plugin that provides a communication layer for different parts of your application. It uses [mediocre.js](https://github.com/classdojo/mediocre.js).


entry.js:

```javascript
var mojo = require("mojojs"),
app      = new mojo.Application();

app.
  use(require("mojo-mediator")).
  use(require("./commands"));

app.mediator.execute("initialize", function () {
});
```

commands/index.js

```javascript
module.exports = function (app) {
  app.mediator.on("initialize", function (message, next) {
    // do stuff
    next();
  });
}
```

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