- filter<I, O>(array, predicate): (Extract<I, O> | Extract<O, I>)[]
Parameters
- array: Nil | readonly I[]
- predicate: ArrayNarrowingIteratee<O>
Returns (Extract<I, O> | Extract<O, I>)[]
- filter<T>(array, predicate): T[]
Parameters
- array: Nil | readonly T[]
- predicate: ArrayIteratee<T, boolean>
Returns T[]
- filter<I, O>(object, predicate): (Extract<I[keyof I], O> | Extract<O, I[keyof I]>)[]
Parameters
- object: Nil | I
- predicate: ValueNarrowingIteratee<I, O>
Returns (Extract<I[keyof I], O> | Extract<O, I[keyof I]>)[]
- filter<I, O>(object, predicate): {
[K in keyof I]: IfCouldBe<Cast<K, string>, O, I[K]>
}[keyof I][] Parameters
- object: Nil | I
- predicate: KeyNarrowingIteratee<I, O>
Returns {
[K in keyof I]: IfCouldBe<Cast<K, string>, O, I[K]>
}[keyof I][]
- filter<T>(object, predicate): T[keyof T][]
Parameters
- object: Nil | T
- predicate: ObjectIteratee<T, boolean>
Returns T[keyof T][]
Iterates over elements of
collection
, returning an array of all elementspredicate
returns truthy for.Contribution to minified bundle size, when it is the only function imported: