@szilanor/stream
    Preparing search index...

    Variable atConst

    at: <T>(index: number) => CollectorFunction<T, T | undefined> = elementAt

    Type Declaration

      • <T>(index: number): CollectorFunction<T, T | undefined>
      • Returns a collector that returns the element at the specified index.

        Type Parameters

        • T

          Type of items in the source.

        Parameters

        • index: number

          Index of the element to get.

        Returns CollectorFunction<T, T | undefined>

        Collector that returns the element at the specified index.

        const result = elementAt<number>(1)([1, 2, 3]);
        console.log(result); // 2