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
| Parameter | Type |
|---|---|
iterable | AsyncIterable<T> |
opts | CollectAllOptions |
Returns
Promise<T[]>
Example
import { collectAll } from '@cdot65/prisma-airs-sdk';
const firstThousand = await collectAll(client.listAllIter(), { max: 1_000 });