- filterDocuments<T>(iterator, predicate): AsyncGenerator<Awaited<T>, void, unknown>
Parameters
- iterator: AsyncGenerator<T | T[], void, unknown>
- predicate: ((value: T) => boolean | Promise<boolean>)
- (value): boolean | Promise<boolean>
Returns boolean | Promise<boolean>
Returns AsyncGenerator<Awaited<T>, void, unknown>
- A promise that resolves to the flattened array of documents.
Filters the documents from an async generator and yield them by the condition