pullAllWith
_.pullAllWith(comparator, values, array)
# Ⓢ [Ⓣ][1] Ⓝ
This method is like _.pullAll except that it accepts comparator which
is invoked to compare elements of array to values. The comparator is
invoked with two arguments: (arrVal, othVal).
Since
4.6.0
Arguments
comparator(Function): The comparator invoked per element.values(Array): The values to remove.array(Array): The array to modify.
Returns
(Array): Returns array.
Example
var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
_.pullAllWith(_.isEqual, [{ 'x': 3, 'y': 4 }], array);
// => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]