mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Bump to v3.9.0.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import baseIsEqualDeep from './baseIsEqualDeep';
|
||||
import isObject from '../lang/isObject';
|
||||
|
||||
/**
|
||||
* The base implementation of `_.isEqual` without support for `this` binding
|
||||
@@ -14,17 +15,10 @@ import baseIsEqualDeep from './baseIsEqualDeep';
|
||||
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
||||
*/
|
||||
function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {
|
||||
// Exit early for identical values.
|
||||
if (value === other) {
|
||||
return true;
|
||||
}
|
||||
var valType = typeof value,
|
||||
othType = typeof other;
|
||||
|
||||
// Exit early for unlike primitive values.
|
||||
if ((valType != 'function' && valType != 'object' && othType != 'function' && othType != 'object') ||
|
||||
value == null || other == null) {
|
||||
// Return `false` unless both values are `NaN`.
|
||||
if (value == null || other == null || (!isObject(value) && !isObject(other))) {
|
||||
return value !== value && other !== other;
|
||||
}
|
||||
return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);
|
||||
|
||||
Reference in New Issue
Block a user