- findKey<T>(array, predicate): string | undefined
Parameters
array: T[]
predicate: ArrayIteratee<T, boolean>
Returns string | undefined
- findKey<I, T, O>(object, predicate): IfCouldBe<I, Nil, undefined> | PossibleValueMatches<T, O> | (DefiniteValueMatches<T, O> extends never
? undefined
: never) Parameters
object: I
predicate: ValueNarrowingIteratee<T, O>
Returns IfCouldBe<I, Nil, undefined> | PossibleValueMatches<T, O> | (DefiniteValueMatches<T, O> extends never
? undefined
: never)
- findKey<I, T, O>(object, predicate): IfCouldBe<I, Nil, undefined> | PossibleKeyMatch<T, O> | (DefiniteKeyMatch<T, O> extends never
? undefined
: never) Parameters
object: I
predicate: KeyNarrowingIteratee<T, O>
Returns IfCouldBe<I, Nil, undefined> | PossibleKeyMatch<T, O> | (DefiniteKeyMatch<T, O> extends never
? undefined
: never)
- findKey<T>(object, predicate): Cast<keyof T, string> | undefined
Parameters
object: Nil | T
predicate: ObjectIteratee<T, boolean>
Returns Cast<keyof T, string> | undefined
This function is like
find
except that it returns the key of the first elementpredicate
returns truthy for instead of the element itself.Contribution to minified bundle size, when it is the only function imported: