• Iterates over elements of collection, returning an array of all elements predicate returns truthy for.

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

    • Lodash: 16,224 bytes
    • Micro-dash: 319 bytes

    Type Parameters

    • I
    • O

    Parameters

    • array: Nil | readonly I[]
    • predicate: ArrayNarrowingIteratee<O>

    Returns (Extract<I, O> | Extract<O, I>)[]

  • Type Parameters

    • T

    Parameters

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

    Returns T[]

  • Type Parameters

    • I
    • O

    Parameters

    • object: Nil | I
    • predicate: ValueNarrowingIteratee<I, O>

    Returns (Extract<I[keyof I], O> | Extract<O, I[keyof I]>)[]

  • Type Parameters

    • I
    • O

    Parameters

    • object: Nil | I
    • predicate: KeyNarrowingIteratee<I, O>

    Returns {
        [K in keyof I]: IfCouldBe<Cast<K, string>, O, I[K]>
    }[keyof I][]

  • Type Parameters

    • T

    Parameters

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

    Returns T[keyof T][]