extra-stream
v0.3.1
Published
Utilities for Stream.
Downloads
1,549
Readme
extra-stream
Utilities for Stream.
Install
npm install --save extra-stream
# or
yarn add extra-stream
API
ReadableStream, WritableStream, TransformStream, TextDecoderStream, TextEncoderStream
The WHATWG ReadableStream
, WritableStream
, TransformStream
, TextDecoderStream
, TextEncoderStream
.
toReadableStream
function toReadableStream<T>(
iterable: Iterable<T> | AsyncIterable<T>
): ReadableStream<T>
toAsyncIterableIterator
function toAsyncIterableIterator<T>(stream: ReadableStream<T>): AsyncIterableIterator<T>
ReadableStream
should be an async iterable object,
but many runtimes don't support this yet.
isNodeJSReadableStream
function isNodeJSReadableStream(val: any): val is NodeJS.ReadableStream
isNodeJSWritableStream
function isNodeJSWritableStream(val: any): val is NodeJS.WritableStream