Skip to content

BlackGlory/extra-stream

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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