Package Exports
- readable-from-web
- readable-from-web/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (readable-from-web) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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.
Install
This package can be installed via npm.
npm install readable-from-webUsage
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.