Skip to main content

Function: readableWebToNode

Utils.readableWebToNode

readableWebToNode(webStream, options?): NodeReadableNative

Function that converts WHATWG ReadableStream into Node's Readable

Taken over from https://github.com/gwicke/node-web-streams/blob/master/lib/conversions.js Because it uses forked web-streams-polyfill that is outdated.

Warning! If you want to use this function in browser you have to polyfill stream package with your bundler.

author https://github.com/gwicke

licence Apache License 2.0 https://github.com/gwicke/node-web-streams/blob/master/LICENSE

Parameters

NameType
webStreamReadableStream<unknown>
options?ReadableOptions

Returns

NodeReadableNative

Defined in

bee-js/src/utils/stream.ts:143