Skip to main content
Module

x/dtils/deps.ts>streamUtils

The best unofficial library of utilities for Deno applications
Go to Latest
namespace streamUtils
import { streamUtils } from "https://deno.land/x/dtils@2.6.0/deps.ts";

Utilities for working with the Streams API.

Includes buffering and conversion.

Classes

A variable-sized buffer of bytes with read() and write() methods.

A transform stream that only transforms from the zero-indexed start and end bytes (both inclusive).

Divide a stream into chunks delimited by a given byte sequence.

A TransformStream that will only read & enqueue size amount of bytes. This operation is chunk based and not BYOB based, and as such will read more than needed.

A TransformStream that will only read & enqueue size amount of chunks.

Transform a stream into a stream where each chunk is divided by a given delimiter.

Transform a stream into a stream where each chunk is divided by a newline, be it \n or \r\n. \r can be enabled via the allowCR option.

Functions

f
streamUtils.copy
deprecated

Merge multiple streams into a single one, taking order into account, and each stream will wait for a chunk to enqueue before the next stream can append another chunk. If a stream ends before other ones, the others will be cancelled.

Merge multiple streams into a single one, not taking order into account. If a stream ends before other ones, the other will continue adding data, and the finished one will not add any more data.

Convert the generator function into a TransformStream.

Merge multiple streams into a single one, taking order into account, and each stream will wait for a chunk to enqueue before the next stream can append another chunk. If a stream ends before other ones, the others will continue adding data in order, and the finished one will not add any more data.

Type Aliases

Disposition of the delimiter.