# web-streams-nodejs

> WhatWG web streams and conversion utilities for node.js

Latest version **0.1.1** (published 2024-04-13) · Apache-2.0 license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2024-04-13 |
| First published | 2024-04-13 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 130.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Author | Gabriel Wicke |
| Maintainers | hzongquan |
| Keywords | streamspec, whatwg, streams, node, convert, readablestream |

## Links

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

## Dependencies (1)

- [is-stream](https://npm.io/package/is-stream.md) ^1.1.0

## 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.1.1 (latest) — 2024-04-13
- 0.1.0 — 2024-04-13

## README

# web-streams-nodejs

forked from https://github.com/gwicke/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 web-streams-nodejs
```

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

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

// 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/web-streams-nodejs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
