Experimental converter from WHATWG ReadableStream to readable-stream Readable
npm install readable-from-web


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.
This package can be installed via npm.
``bash`
npm install readable-from-web
`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);
}
``
This code is released under the MIT license.