Skip to main content
ReadableBase.prototype.asIndexedPairs - node__stream.d.ts - Node documentation
method ReadableBase.prototype.asIndexedPairs

Usage in Deno

```typescript import { ReadableBase } from "node:node__stream.d.ts"; ```
ReadableBase.prototype.asIndexedPairs(options?: Pick<ArrayOptions, "signal">): Readable
This method returns a new stream with chunks of the underlying stream paired with a counter in the form `[index, chunk]`. The first index value is `0` and it increases by 1 for each chunk produced.

Parameters

optional
options: Pick<ArrayOptions, "signal">

Return Type

Readable
a stream of indexed pairs.