- find<I, O>(array, predicate, fromIndex?): Extract<I, O> | Extract<O, I> | undefined
Parameters
- array: Nil | readonly I[]
- predicate: ArrayNarrowingIteratee<O>
Optional
fromIndex: number
Returns Extract<I, O> | Extract<O, I> | undefined
- find<T>(array, predicate, fromIndex?): T | undefined
Parameters
- array: Nil | readonly T[]
- predicate: ArrayIteratee<T, boolean>
Optional
fromIndex: number
Returns T | undefined
- find<I, T, O, F>(object, predicate, fromIndex?): IfCouldBe<F, number, undefined> | IfCouldBe<I, Nil, undefined> | PossibleValueMatches<T, O> | (DefiniteValueMatches<T, O> extends never
? undefined
: never) Type Parameters
- I
- T extends {}
- O
- F extends undefined | number = undefined
Parameters
- object: I
- predicate: ValueNarrowingIteratee<T, O>
Optional
fromIndex: F
Returns IfCouldBe<F, number, undefined> | IfCouldBe<I, Nil, undefined> | PossibleValueMatches<T, O> | (DefiniteValueMatches<T, O> extends never
? undefined
: never)
- find<I, T, O, F>(object, predicate, fromIndex?): IfCouldBe<F, number, undefined> | IfCouldBe<I, Nil, undefined> | PossibleKeyMatches<T, O> | (DefiniteKeyMatches<T, O> extends never
? undefined
: never) Type Parameters
- I
- T extends {}
- O
- F extends undefined | number = undefined
Parameters
- object: I
- predicate: KeyNarrowingIteratee<T, O>
Optional
fromIndex: F
Returns IfCouldBe<F, number, undefined> | IfCouldBe<I, Nil, undefined> | PossibleKeyMatches<T, O> | (DefiniteKeyMatches<T, O> extends never
? undefined
: never)
- find<T>(object, predicate, fromIndex?): T[keyof T] | undefined
Parameters
- object: Nil | T
- predicate: ObjectIteratee<T, boolean>
Optional
fromIndex: number
Returns T[keyof T] | undefined
Iterates over elements of
collection
, returning the first elementpredicate
returns truthy for.Contribution to minified bundle size, when it is the only function imported: