# readable-stream-polyfill

> A [WHATWG-compliant](https://streams.spec.whatwg.org/#readablestream) polyfill for `ReadableStream` based on the eponymous implementation in Node.js.

Latest version **0.0.0** (published 2022-06-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install readable-stream-polyfill
pnpm add readable-stream-polyfill
yarn add readable-stream-polyfill
bun add readable-stream-polyfill
```

## 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.0.0 |
| Published | 2022-06-14 |
| First published | 2022-06-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 28.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Artem Zakharchenko |
| Maintainers | kettanaito |

## Links

- npm: https://www.npmjs.com/package/readable-stream-polyfill
- npm.io page: https://npm.io/package/readable-stream-polyfill

## Dependencies (1)

- [outvariant](https://npm.io/package/outvariant.md) ^1.3.0

## Recent versions

- 0.0.0 (latest) — 2022-06-14

## README

# `ReadableStream`

A [WHATWG-compliant](https://streams.spec.whatwg.org/#readablestream) polyfill for `ReadableStream` based on the eponymous implementation in Node.js.

## Install

```sh
npm install readable-stream-polyfill
```

## Node.js API

```js
const { ReadableStream } = require('readable-stream-polyfill')

const stream = new ReadableStream({
  start(controller) {
    controller.enqueue('hello')
    controller.enqueue('world')
    controller.end()
  },
})

const reader = await stream.getReader()
```

## Polyfill

```js
// Polyfills the global "ReadableStream" class
// if it's not already implemented.
require('readable-stream-polyfill/globals')
```

## Usage

- [`ReadableStream` on MDN](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)

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