1.0.0 • Published 2 months ago

readable-from-web v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Readable from Web

CI Coverage Version

An experimental converter from WHATWG ReadableStream to readable-stream Readable, loosely following the functionality of Node's own implementation of Readable.fromWeb to the extent possible without introducing anything new.

Install

This package can be installed via npm.

npm install readable-from-web

Usage

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.

1.0.0

2 months ago

0.0.4

2 months ago

0.0.1

2 months ago