• Creates an array of elements split into two groups, the first of which contains elements predicate returns truthy for, while the second of which contains elements predicate returns falsey for. The predicate is invoked with three arguments: (value, index|key, collection).

    Type Parameters

    • T
    • U

    Parameters

    • collection: undefined | null | List<T>

      The collection to iterate over.

    • callback: ValueIteratorTypeGuard<T, U>

      The function called per iteration.

    Returns [U[], Exclude<T, U>[]]

    Returns the array of grouped elements.

  • Type Parameters

    • T

    Parameters

    • collection: undefined | null | List<T>
    • callback: ValueIteratee<T>

    Returns [T[], T[]]

    _.partition

  • Type Parameters

    • T extends object

    Parameters

    • collection: undefined | null | T
    • callback: ValueIteratee<T[keyof T]>

    Returns [T[keyof T][], T[keyof T][]]

    _.partition