_.disappear
Removes elements from an array if the function passed as a parameter returns true
_.disappear(array, callbackFunction)
Parameters:
array [array]:
the array that will have elements removed
callbackFunction [function]:
function that is responsible for removing elements from the array
Example:
_.disappear([10,20,30,40,50], (value) => value < 25)
// => { array: [30,40,50], slicedCount: 2 }
Last updated