@szilanor/stream
    Preparing search index...

    Function elementAtAsync

    • Returns a collector that returns the nth entry from the Iterable.

      Type Parameters

      • T

        Type of items in the source.

      Parameters

      • index: number

        Index of the entry to return.

      Returns AsyncCollectorFunction<T, T | undefined>

      Collector that returns the nth entry from the Iterable.

      const result = elementAtAsync(2)([1, 2, 3]);
      console.log(result); // 3