• Removes all elements from array that predicate returns truthy for and returns an array of the removed elements. The predicate is invoked with three arguments: (value, index, array).

    Note: Unlike _.filter, this method mutates array.

    Type Parameters

    • T

    Parameters

    • array: List<T>

      The array to modify.

    • Optionalpredicate: ListIteratee<T>

      The function invoked per iteration.

    Returns T[]

    Returns the new array of removed elements.