ixfx
    Preparing search index...

    Function find

    • Returns the first found value that matches predicate or undefined.

      Use some if you don't care about the value, just whether it appears. Use filter to get all value(s) that match predicate.

      Type Parameters

      • V

      Parameters

      • map: ReadonlyMap<string, V>

        Map to search

      • predicate: (v: V) => boolean

        Function that returns true for a matching value

      Returns undefined | V

      Found value or undefined

      const overThirty = find(people, person => person.age > 30);