Skip to main content
ReadableStreamGetReaderOptions.mode - stream/web - Node documentation
property ReadableStreamGetReaderOptions.mode

Usage in Deno

import { type ReadableStreamGetReaderOptions } from "node:stream/web";

Creates a ReadableStreamBYOBReader and locks the stream to the new reader.

This call behaves the same way as the no-argument variant, except that it only works on readable byte streams, i.e. streams which were constructed specifically with the ability to handle "bring your own buffer" reading. The returned BYOB reader provides the ability to directly read individual chunks from the stream via its read() method, into developer-supplied buffers, allowing more precise control over allocation.

Type

Back to top