mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 07:17:50 +00:00
Bump to v3.8.0.
This commit is contained in:
@@ -1,15 +1,11 @@
|
||||
import baseDifference from '../internal/baseDifference';
|
||||
import isArguments from '../lang/isArguments';
|
||||
import isArray from '../lang/isArray';
|
||||
import isArrayLike from '../internal/isArrayLike';
|
||||
import restParam from '../function/restParam';
|
||||
|
||||
/**
|
||||
* Creates an array excluding all provided values using `SameValueZero` for
|
||||
* equality comparisons.
|
||||
*
|
||||
* **Note:** [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
|
||||
* comparisons are like strict equality comparisons, e.g. `===`, except that
|
||||
* `NaN` matches `NaN`.
|
||||
* Creates an array excluding all provided values using
|
||||
* [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
|
||||
* for equality comparisons.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -23,7 +19,7 @@ import restParam from '../function/restParam';
|
||||
* // => [3]
|
||||
*/
|
||||
var without = restParam(function(array, values) {
|
||||
return (isArray(array) || isArguments(array))
|
||||
return isArrayLike(array)
|
||||
? baseDifference(array, values)
|
||||
: [];
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user