# @gotoeasy/bus

> event bus

Latest version **1.0.0** (published 2020-03-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @gotoeasy/bus
pnpm add @gotoeasy/bus
yarn add @gotoeasy/bus
bun add @gotoeasy/bus
```

## 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.0 |
| Published | 2020-03-30 |
| First published | 2018-11-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | 青松 |
| Maintainers | rpose |
| Keywords | gotoeasy, event, bus, event bus |

## Links

- npm: https://www.npmjs.com/package/@gotoeasy/bus
- Repository: https://github.com/gotoeasy/npm-packages
- Homepage: https://github.com/gotoeasy/npm-packages/blob/master/bus/README.md
- Issues: https://github.com/gotoeasy/npm-packages/issues
- npm.io page: https://npm.io/package/@gotoeasy/bus

## 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.0 (latest) — 2020-03-30
- 0.2.1 — 2019-09-16
- 0.1.0 — 2019-05-29
- 0.0.15 — 2019-04-28
- 0.0.14 — 2019-02-22
- 0.0.13 — 2019-02-22
- 0.0.12 — 2019-02-21
- 0.0.11 — 2019-02-21
- 0.0.10 — 2018-11-27
- 0.0.9 — 2018-11-15
- 0.0.8 — 2018-11-14
- 0.0.7 — 2018-11-14
- 0.0.6 — 2018-11-13
- 0.0.5 — 2018-11-13
- 0.0.4 — 2018-11-13
- … 3 more at https://npm.io/package/@gotoeasy/bus/versions

## README

# `@gotoeasy/bus`
simple event bus
<br>
<br>

[![NPM version](https://img.shields.io/npm/v/@gotoeasy/bus.svg)](https://www.npmjs.com/package/@gotoeasy/bus)
[![License](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://github.com/gotoeasy/npm-packages/blob/master/LICENSE)
<br>
<br>

## Install
```
npm i @gotoeasy/bus
```

## API
```js
const bus = require('@gotoeasy/bus');

bus.on('input', function(txt){
    console.log('input ...', txt);
})
bus.once('once', function(txt){
    console.log('once ...', txt);
})

bus.at('input', 'abc'); // input ... abc

bus.at('once', '123'); // once ... 123
bus.at('once', '123'); // do nothing

bus.off('input');
bus.at('input', 'abc'); // do nothing

bus.clear();            // clear all events

```
<br>
<br>

## `Links`
* `npm-packages` https://github.com/gotoeasy/npm-packages

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