extra-stream
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i extra-stream

Weekly Downloads

8

Version

0.3.1

License

MIT

Unpacked Size

19.3 kB

Total Files

63

Last publish

Collaborators

  • black_glory