Skip to main content

Function: collectAll()

function collectAll<T>(iterable, opts?): Promise<T[]>;

Defined in: src/listing.ts:66

Collect an async listing into an array with a runaway-walk safety cap.

Type Parameters​

Type Parameter
T

Parameters​

ParameterType
iterableAsyncIterable<T>
optsCollectAllOptions

Returns​

Promise<T[]>

Example​

import { collectAll } from '@cdot65/prisma-airs-sdk';
const firstThousand = await collectAll(client.listAllIter(), { max: 1_000 });