# rx-from-event-emitter

> Makes an Observable from the successive outputs an EventEmitter would give to a callback function.

Latest version **1.0.6** (published 2018-01-18) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install rx-from-event-emitter
pnpm add rx-from-event-emitter
yarn add rx-from-event-emitter
bun add rx-from-event-emitter
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2018-01-18 |
| First published | 2018-01-13 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Thomas Hugel |
| Maintainers | thomas.hugel |
| Keywords | Node.js, EventEmitter, RxJS, TypeScript |

## Links

- npm: https://www.npmjs.com/package/rx-from-event-emitter
- Repository: https://gitlab.com/rx-from-event-emitter/rx-from-event-emitter
- Homepage: https://gitlab.com/rx-from-event-emitter/rx-from-event-emitter#README
- Issues: https://gitlab.com/rx-from-event-emitter/rx-from-event-emitter/issues
- npm.io page: https://npm.io/package/rx-from-event-emitter

## Dependencies (2)

- [@types/node](https://npm.io/package/@types/node.md) ^8.5.8
- [@reactivex/rxjs](https://npm.io/package/@reactivex/rxjs.md) ^5.5.6

## 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.6 (latest) — 2018-01-18
- 1.0.5 — 2018-01-17
- 1.0.4 — 2018-01-15
- 1.0.3 — 2018-01-15
- 1.0.2 — 2018-01-15
- 1.0.1 — 2018-01-15
- 1.0.0 — 2018-01-13

## README

# Description

This module extends the capabilities offered by Rx.Observable.fromEvent(), by allowing multiple kinds of events to be handled in one of the three ways a subscription allows.

# Usage

Example: suppose that `message` is of type `http.IncomingMessage`; you can use several kinds of events from it and they will be treated in one of the three ways corresponding to the subscription mechanism:
  * ['data']: put here the normal events, and their outputs will be given to `next()`;
  * ['error']: put here the error events, and their outputs will be given to `error()`;
  * ['close', 'end']: put here the events corresponding to `complete()`.

The events arrays must be given in that order: next, error, complete.

So you can write:
`makeRxObservableFromEventEmitter<Buffer>(message, ['data'], ['error'], ['close', 'end'])`

In some cases, the normal output is an Array, such as `Buffer[]`. In these cases, use this function:
`makeRxObservableFromEventEmitterArray<Buffer>(emitter, ['data'], ['error'], ['close', 'end'])`

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