# modapp-eventbus

> EventBus used for implementing modapp's Model interface, Collection interface, and LocaleString interface.

Latest version **1.8.2** (published 2023-11-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install modapp-eventbus
pnpm add modapp-eventbus
yarn add modapp-eventbus
bun add modapp-eventbus
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.8.2 |
| Published | 2023-11-26 |
| First published | 2020-06-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 49.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Samuel Jirénius |
| Maintainers | jirenius |

## Links

- npm: https://www.npmjs.com/package/modapp-eventbus
- Repository: https://github.com/jirenius/modapp-eventbus
- Issues: https://github.com/jirenius/modapp-eventbus/issues
- npm.io page: https://npm.io/package/modapp-eventbus

## Recent versions

- 1.8.2 (latest) — 2023-11-26
- 1.8.1 — 2023-07-25
- 1.8.0 — 2022-10-31
- 1.7.0 — 2020-11-13
- 1.0.1 — 2020-06-08
- 1.0.0 — 2020-06-08

## README

[![view on npm](http://img.shields.io/npm/v/modapp-eventbus.svg)](https://www.npmjs.org/package/modapp-eventbus)

# ModApp EventBus

EventBus used for implementing modapp's [Model interface](https://github.com/jirenius/modapp/blob/master/docs/docs.md#Model), [Collection interface](https://github.com/jirenius/modapp/blob/master/docs/docs.md#Model), and [LocaleString interface](https://github.com/jirenius/modapp/blob/master/docs/docs.md#LocaleString).

## Installation

With npm:
```sh
npm install modapp-eventbus --save
```

With yarn:
```sh
yarn add modapp-eventbus
```

## Usage

```javascript
import eventBus from 'modapp-eventbus';

let callback = data => {
	console.log("data");
};

// Add event listener
eventBus.on('client.disconnect', cb);

// Emit an event
eventBus.emit('client.disconnect', /* data */ { foo: "bar" });

// Remove event listener
eventBus.off('client.disconnect', cb);
```

## Documentation

[Markdown documentation](https://github.com/jirenius/modapp-eventbus/blob/master/docs/docs.md)

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