Skip to main content
Module

x/streamtools/mod.ts

🦕 This is a Deno module that provides utilities for handling Streams API.
Go to Latest
import * as streamtools from "https://deno.land/x/streamtools@v0.4.0/mod.ts";

Functions

Creates a new channel, which is a pair of a readable and writable stream.

Reads all chunks from a readable stream and returns them as an array of chunks.

Reads the next chunk from a readable stream.

Provides the given values to the writable stream by piping them from a readable stream created from the values. Returns a promise that resolves when all the values have been successfully written to the stream.

Writes a chunk to a writable stream.

Reads all available bytes from a given ReadableStream<Uint8Array> and concatenates them into a single Uint8Array.

Writes all data in a Uint8Array to a writable stream in chunk-size units.