# web-streams-node

> WhatWG web streams and conversion utilities for node.js

Latest version **0.4.0** (published 2019-05-10) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install web-streams-node
pnpm add web-streams-node
yarn add web-streams-node
bun add web-streams-node
```

## 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.4.0 |
| Published | 2019-05-10 |
| First published | 2018-03-06 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 18.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Gabriel Wicke |
| Maintainers | jccr |
| Keywords | streamspec, whatwg, streams, node, convert, readablestream |

## Links

- npm: https://www.npmjs.com/package/web-streams-node
- Repository: https://github.com/JCCR/web-streams-node
- Homepage: https://github.com/JCCR/web-streams-node#readme
- Issues: https://github.com/JCCR/web-streams-node/issues
- npm.io page: https://npm.io/package/web-streams-node

## Dependencies (3)

- [is-stream](https://npm.io/package/is-stream.md) ^1.1.0
- [web-streams-ponyfill](https://npm.io/package/web-streams-ponyfill.md) ^1.4.1
- [readable-stream-node-to-web](https://npm.io/package/readable-stream-node-to-web.md) ^1.0.1

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 0.4.0 (latest) — 2019-05-10
- 0.3.1 — 2018-03-06
- 0.3.0 — 2018-03-06

## README

# web-streams-node
WhatWG web streams and conversion utilities for node.js

This provides the [WhatWG streams](https://streams.spec.whatwg.org) API for
node. It leverages the [WhatWG reference
implementation](https://github.com/whatwg/streams)

## Installation
```
npm install web-streams-node
```

## Usage
```javascript
// ES5 require syntax
var webStreams = require('node-web-streams');
var ReadableStream = webStreams.ReadableStream;
var toWebReadableStream = webStreams.toWebReadableStream;
var toNodeReadable = webStreams.toNodeReadable;

// ES6 import syntax
import { ReadableStream, toWebReadableStream, toNodeReadable } from "node-web-streams";

// Convert a node Readable to a web ReadableStream & back
const nodeReadable = require('fs').createReadStream('/tmp/test.txt');
const webReadable = toWebReadableStream(nodeReadable);
const roundTrippedNodeReadable = toNodeReadable(webReadable);
```

## Credits
Fork of [node-web-streams](https://github.com/gwicke/node-web-streams)

Original author:
 - Gabriel Wicke [gwicke](https://github.com/gwicke)

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