Function paginateDocuments
- paginateDocuments<T>(iterator, limit, offset): Promise<T[]>
Parameters
- iterator: AsyncGenerator<T | T[], void, unknown>
- limit: number
- offset: number
Returns Promise<T[]>
- A promise that resolves to the flattened array of documents.
Resolves the documents from an async generator and paginates them.