• This function is like find except that it returns the key of the first element predicate returns truthy for instead of the element itself.

    Contribution to minified bundle size, when it is the only function imported:

    • Lodash: 16,048 bytes
    • Micro-dash: 377 bytes

    Type Parameters

    • T

    Parameters

    • array: T[]
    • predicate: ArrayIteratee<T, boolean>

    Returns string | undefined

  • Type Parameters

    • I

    • T extends {}

    • O

    Parameters

    • object: I
    • predicate: ValueNarrowingIteratee<T, O>

    Returns IfCouldBe<I, Nil, undefined> | PossibleValueMatches<T, O> | (DefiniteValueMatches<T, O> extends never
        ? undefined
        : never)

  • Type Parameters

    • I

    • T extends {}

    • O

    Parameters

    • object: I
    • predicate: KeyNarrowingIteratee<T, O>

    Returns IfCouldBe<I, Nil, undefined> | PossibleKeyMatch<T, O> | (DefiniteKeyMatch<T, O> extends never
        ? undefined
        : never)

  • Type Parameters

    • T

    Parameters

    • object: Nil | T
    • predicate: ObjectIteratee<T, boolean>

    Returns Cast<keyof T, string> | undefined

Generated using TypeDoc