# promisify-event

> Promisify EventEmitter's event.

Latest version **1.0.0** (published 2015-12-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install promisify-event
pnpm add promisify-event
yarn add promisify-event
bun add promisify-event
```

## 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 | 2015-12-10 |
| First published | 2015-12-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 35 |
| Author | Ivan Nikulin |
| Maintainers | inikulin |
| Keywords | promisify, promise, event, eventemitter |

## Links

- npm: https://www.npmjs.com/package/promisify-event
- Repository: https://github.com/inikulin/promisify-event
- Homepage: https://github.com/inikulin/promisify-event#readme
- Issues: https://github.com/inikulin/promisify-event/issues
- npm.io page: https://npm.io/package/promisify-event

## Dependencies (1)

- [pinkie-promise](https://npm.io/package/pinkie-promise.md) ^2.0.0

## 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) — 2015-12-10

## README

# promisify-event
[![Build Status](https://api.travis-ci.org/inikulin/promisify-event.svg)](https://travis-ci.org/inikulin/promisify-event)

*Promisify EventEmitter's event.*

## Install
```
npm install promisify-event
```

## Usage
```js
const promisifyEvent = require('promisify-event');

// Promisify server's `listening` event:
promisify(server, `listening`).then(() => {
  // ...
});

// Promisify `error` event. `error` event always rejects the promise:
promisify(server, 'error').catch(() => {
  // ...
});

// Cancel event subscription and promise (it will be never fulfilled):
var listeningPromise = promisify(server, `listening`);

listeningPromise.cancel();

listeningPromise.then(() => {
  // Will never happen
});

```

## Author
[Ivan Nikulin](https://github.com/inikulin) (ifaaan@gmail.com)

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