without source npm

_.without(array, [values])

Creates an array excluding all provided values using SameValueZero for equality comparisons.

Arguments

  1. array (Array)

    The array to filter.

  2. [values] (...*)

    The values to exclude.

Returns (Array)

Returns the new array of filtered values.

Example

_.without([1, 2, 1, 3], 1, 2);
// => [3]