• Searches for the value in iterable.

    Type Parameters

    • T

      Iterated elements type.

    • TFound

      Found value type.

    Parameters

    • iterable: Iterable<T>

      An iterable to extract element from.

    • search: ((this, element) => undefined | false | TFound)

      A function extracting the value from elements. It is called for each iterated element until the value found. Accepts element as the only parameter, and returns extracted value. If returns false or undefined the search continues from the next element.

        • (this, element): undefined | false | TFound
        • Parameters

          • this: void
          • element: T

          Returns undefined | false | TFound

    Returns TFound | undefined

    Either found value or undefined.

Generated using TypeDoc