iter-fns - v0.13.0
    Preparing search index...

    Function find

    • Finds the first item in an iterable that matches the predicate, otherwise return undefined.

      Type Parameters

      • T

        type of the item

      • S

      Parameters

      • iterable: Iterable<T>

        the iterable

      • p: (x: T, i: number) => x is S

        the predicate

      Returns undefined | S

    • Finds the first item in an iterable that matches the predicate, otherwise return undefined.

      Type Parameters

      • T

        type of the item

      Parameters

      • iterable: Iterable<T>

        the iterable

      • p: (x: T, i: number) => boolean

        the predicate

      Returns undefined | T