# await-emitter

> add `finish` method on node EventEmitter for waiting all aync listeners to finish

Latest version **1.0.1** (published 2017-05-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install await-emitter
pnpm add await-emitter
yarn add await-emitter
bun add await-emitter
```

## 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.1 |
| Published | 2017-05-13 |
| First published | 2017-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Hsieh, Chang-Hsi |
| Maintainers | chhsieh |
| Keywords | events, emitter, EventEmitter, async, await, listener, done, Promise |

## Links

- npm: https://www.npmjs.com/package/await-emitter
- Repository: https://github.com/codevcode/await-emitter
- Homepage: https://github.com/codevcode/await-emitter#readme
- Issues: https://github.com/codevcode/await-emitter/issues
- npm.io page: https://npm.io/package/await-emitter

## Dependencies (1)

- [events](https://npm.io/package/events.md) ^1.1.1

## 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.1 (latest) — 2017-05-13
- 1.0.0 — 2017-05-13

## README

# await-emitter

add `finish` method on node EventEmitter for waiting all aync listeners to finish.

```
npm install await-emitter
```

## Usage

Create a emitter instance and put it in the context or inject into modules used it.
```js
import Emitter from 'await-emitter'

const emitter = new Emitter()

```

Use `emitter.finish` to emit an event, you can waiting all listeners finish their work.
Then do the next action.
```js
await emitter.finish('flushCache')
await emitter.finish('saveData')
emitter.emit('saveDone')
```

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