# readable-from-web

> Experimental converter from WHATWG ReadableStream to readable-stream Readable

Latest version **1.0.0** (published 2024-03-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install readable-from-web
pnpm add readable-from-web
yarn add readable-from-web
bun add readable-from-web
```

## Health

**Score 45/100 (D)** — status: abandoned.

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

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2024-03-25 |
| First published | 2024-03-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Maintainers | rubensworks, surilindur |

## Links

- npm: https://www.npmjs.com/package/readable-from-web
- Repository: https://github.com/comunica/readable-from-web.js
- Homepage: https://github.com/comunica/readable-from-web
- Issues: https://github.com/comunica/readable-from-web/issues
- npm.io page: https://npm.io/package/readable-from-web

## Dependencies (2)

- [readable-stream](https://npm.io/package/readable-stream.md) ^4.0.0
- [@types/readable-stream](https://npm.io/package/@types/readable-stream.md) ^4.0.0

## Recent versions

- 1.0.0 (latest) — 2024-03-25
- 0.0.4 — 2024-03-25
- 0.0.1 — 2024-03-25

## README

# Readable from Web

[![CI](https://github.com/comunica/readable-from-web.js/actions/workflows/ci.yml/badge.svg)](https://github.com/comunica/readable-from-web.js/actions/workflows/ci.yml)
[![Coverage](https://coveralls.io/repos/github/comunica/readable-from-web.js/badge.svg?branch=main)](https://coveralls.io/github/comunica/readable-from-web.js?branch=main)
[![Version](https://badge.fury.io/js/readable-from-web.svg)](https://www.npmjs.com/package/readable-from-web)

An experimental converter from [WHATWG `ReadableStream`](https://streams.spec.whatwg.org/#rs-class)
to [`readable-stream`](https://github.com/nodejs/readable-stream) `Readable`,
loosely following the functionality of Node's own [implementation](https://github.com/nodejs/node/blob/0b676736a0e9ab4939c195a516aa7e82fcd839aa/lib/internal/webstreams/adapters.js#L512)
of [`Readable.fromWeb`](https://nodejs.org/api/stream.html#streamreadablefromwebreadablestream-options)
to the extent possible without introducing anything new.

## Install

This package can be installed via [npm](https://www.npmjs.com/package/readable-from-web).

```bash
npm install readable-from-web
```

## Usage

```js
import { readableFromWeb } from 'readable-from-web';

async function example(request, init) {
  const response = await fetch(request, init);
  const whatwgReadableStream = fetch.body;
  const readableStreamReadable = readableFromWeb(whatwgReadableStream);
}
```

## License

This code is released under the [MIT license](http://opensource.org/licenses/MIT).

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