Function findIndex

  • Finds the index of the first value that passes a truthy vale to predicate, then returns it. Only consumes the iterator's values up to the found value, then stops. So if it's not found, then the iterator is exhausted.

    Type Parameters

    • T

    Parameters

    Returns number

  • Finds the index of the first value that passes a truthy vale to predicate, then returns it. Only consumes the iterator's values up to the found value, then stops. So if it's not found, then the iterator is exhausted.

    Type Parameters

    • T

    Parameters

    Returns (arg: IteratorOrIterable<T>) => number