# events-promise

> Promise that shares Node.js EventEmitter interface

Latest version **1.0.0** (published 2019-01-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install events-promise
pnpm add events-promise
yarn add events-promise
bun add events-promise
```

## 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 | 2019-01-14 |
| First published | 2019-01-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Mariusz Nowak |
| Maintainers | medikoo |
| Keywords | promise, events, emitter, event-emitter |

## Links

- npm: https://www.npmjs.com/package/events-promise
- Repository: https://github.com/medikoo/events-promise
- Homepage: https://github.com/medikoo/events-promise#readme
- Issues: https://github.com/medikoo/events-promise/issues
- npm.io page: https://npm.io/package/events-promise

## 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) — 2019-01-14

## README

[![*nix build status][nix-build-image]][nix-build-url]
[![Windows build status][win-build-image]][win-build-url]
[![Tests coverage][cov-image]][cov-url]
![Transpilation status][transpilation-image]
[![npm version][npm-image]][npm-url]

# events-promise

## Promise that's a also a Node.js EventEmitter

Useful when we want to serve both `EventEmitter` (e.g. `Stream`) instance and `Promise` instance as one object

### Installation

```bash
npm install events-promise
```

# Usage

```javascript
const EventsPromise = require("events-promise");

const eventsPromise = new EventsPromise((resolve, reject) => {
	...
});

eventsPromise.addListener("someevent", event => {
	...
});
eventsPromise.emit("someevent", { ... });
```

### Tests

```bash
npm test
```

[nix-build-image]: https://semaphoreci.com/api/v1/medikoo-org/events-promise/branches/master/shields_badge.svg
[nix-build-url]: https://semaphoreci.com/medikoo-org/events-promise
[win-build-image]: https://ci.appveyor.com/api/projects/status/007fsmnrqubql3p5?svg=true
[win-build-url]: https://ci.appveyor.com/api/project/medikoo/events-promise
[cov-image]: https://img.shields.io/codecov/c/github/medikoo/events-promise.svg
[cov-url]: https://codecov.io/gh/medikoo/events-promise
[transpilation-image]: https://img.shields.io/badge/transpilation-free-brightgreen.svg
[npm-image]: https://img.shields.io/npm/v/events-promise.svg
[npm-url]: https://www.npmjs.com/package/events-promise

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