• Find the first values in an iterator that matches the predicate function or undefined when not found

    Type Parameters

    • T

    Parameters

    • itr: Iterable<T>

      Iterable object

    • predicate: ((item, index) => any)

      predicate function

        • (item, index): any
        • Parameters

          • item: T
          • index: number

          Returns any

    Returns T | undefined