# bacon-node-stream

> Convert between Bacon.js event streams and Node readable streams

Latest version **0.1.2** (published 2017-09-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install bacon-node-stream
pnpm add bacon-node-stream
yarn add bacon-node-stream
bun add bacon-node-stream
```

## Health

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

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

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2017-09-19 |
| First published | 2017-09-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Janne Liuhtonen |
| Maintainers | jliuhtonen |
| Keywords | node, stream, frp, baconjs, bacon |

## Links

- npm: https://www.npmjs.com/package/bacon-node-stream
- Repository: https://github.com/jliuhtonen/bacon-node-stream
- Homepage: https://github.com/jliuhtonen/bacon-node-stream#readme
- Issues: https://github.com/jliuhtonen/bacon-node-stream/issues
- npm.io page: https://npm.io/package/bacon-node-stream

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2017-09-19

## README

# bacon-node-stream

Utility for creating [Node.js readable streams](https://nodejs.org/api/stream.html#stream_readable_streams) from [Bacon streams](http://baconjs.github.io/) and vice versa.

## Usage

Install this package and `baconjs`, that is this package's peer dependency.

### API

```typescript
readableToBacon(stream: Readable, options?: ReadableOptions): Bacon.EventStream<any, any>
```

Creates a new Node.js stream that is exposed as a Bacon event stream and pipes `stream` into it. Use this function for creating a Bacon EventStream from a Readable stream. You must provide the options accordingly, so if `stream` uses object mode, you must also specify it here, and so on. 

Note to TypeScript users: `Readable`'s values are not typed, so you must cast or determine the correct type yourself (use `.map()`).

```typescript
baconToReadable(stream: Bacon.EventStream<any, any>, options?: ReadableOptions): Readable {
```

Wraps a Bacon event stream as a Node.js Readable stream. If the Readable is paused, _all values and the possible end event of the stream are buffered until the Readable is resumed_. The exception to this are error events, that are emitted immediately when they occur in the Bacon stream. Remember to provide options if your stream uses the object mode.

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