Function some

  • Returns true if the given test function returns true for any value in the given iterable. This method returns as soon as test returns a truthy value or all values are iterated over. Equivalent to array.some.

    Type Parameters

    • T

    Parameters

    • iterable: Iterable<T>
    • test: ((value, index, iterable) => unknown)
        • (value, index, iterable): unknown
        • Parameters

          • value: T
          • index: number
          • iterable: Iterable<T>

          Returns unknown

    Returns boolean