Function distinctDocuments

  • Resolves the documents from an async generator and distincts them.

    Type Parameters

    Parameters

    • iterator: AsyncGenerator<T | T[], void, unknown>

      The async generator to resolve documents from.

    Returns AsyncGenerator<T, void, unknown>

    • A promise that resolves to the flattened array of documents.