Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/node/stream.ts

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
import * as mod from "https://deno.land/std@0.145.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 wherestream.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.