Module

std/node/stream.ts

Deno standard library
Go to Latest
import * as mod from "https://dotland.deno.dev/std@0.177.0/node/stream.ts";

Classes

Duplex streams are streams that implement both the Readable and Writable interfaces.

The stream.PassThrough class is a trivial implementation of a Transform stream that simply passes the input bytes across to the output. Its purpose is primarily for examples and testing, but there are some use cases where stream.PassThrough is useful as a building block for novel sorts of streams.

Transform streams are Duplex streams where the output is in some way related to the input. Like all Duplex streams, Transform streams implement both the Readable and Writable interfaces.

Functions

Attaches an AbortSignal to a readable or writeable stream. This lets code control stream destruction using an AbortController.

A function to get notified when a stream is no longer readable, writable or has experienced an error or a premature close event.

A module method to pipe between streams and generators forwarding errors and properly cleaning up and provide a callback when the pipeline is complete.