Skip to main content
ReadableBase.prototype.take - stream - Node documentation
method ReadableBase.prototype.take

Usage in Deno

import { ReadableBase } from "node:stream";
ReadableBase.prototype.take(
limit: number,
options?: Pick<ArrayOptions, "signal">,
): Readable

This method returns a new stream with the first limit chunks.

Parameters

limit: number

the number of chunks to take from the readable.

optional
options: Pick<ArrayOptions, "signal">

Return Type

Readable

a stream with limit chunks taken.