# node-web-streams

> WhatWG web streams and conversion utilities for node.js

Latest version **0.2.2** (published 2016-09-27) · Apache-2.0 license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2016-09-27 |
| First published | 2016-07-30 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Author | Gabriel Wicke |
| Maintainers | gwicke |
| Keywords | streamspec, whatwg, streams, node, convert, readablestream |

## Links

- npm: https://www.npmjs.com/package/node-web-streams
- Repository: https://github.com/gwicke/node-web-streams
- Issues: https://github.com/gwicke/node-web-streams/issues
- npm.io page: https://npm.io/package/node-web-streams

## Dependencies (2)

- [is-stream](https://npm.io/package/is-stream.md) ^1.1.0
- [web-streams-polyfill](https://npm.io/package/web-streams-polyfill.md) git://github.com/gwicke/web-streams-polyfill#spec_performance_improvements

## 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.2.2 (latest) — 2016-09-27
- 0.2.1 — 2016-07-30
- 0.2.0 — 2016-07-30
- 0.1.1 — 2016-07-30
- 0.1.0 — 2016-07-30

## README

# node-web-streams
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), but also addresses
performance issues in that implementation.

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

## 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);
```

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