Simplify null/undefined check in _.isEqual and edit _.cloneDeep docs.

Former-commit-id: 62455ba83df04318856fbc889743f44101b24fe3
This commit is contained in:
John-David Dalton
2013-01-25 00:20:55 -08:00
parent 0fc2ab4d41
commit 98eccf223a
5 changed files with 12 additions and 12 deletions

View File

@@ -415,7 +415,7 @@
*
* @private
* @param {Object} [options1, options2, ...] The compile options object(s).
* arrays - A boolean to specify support for iterating arrays and array-like objects.
* arrays - A string of code to determine if the iteratee is an array or array-like.
* useHas - A boolean to specify using `hasOwnProperty` checks in the object loop.
* args - A string of comma separated arguments the iteration function will accept.
* top - A string of code to execute before the iteration branches.
@@ -433,7 +433,7 @@
'shadowed': shadowed,
// iterator options
'arrays': "isArray(iteratee)",
'arrays': 'isArray(iteratee)',
'bottom': '',
'loop': '',
'top': '',
@@ -1078,9 +1078,9 @@
// treat `+0` vs. `-0` as not equal
return a !== 0 || (1 / a == 1 / b);
}
// a strict comparison is necessary because `null == undefined`
// exit early for unlike `null` or `undefined` values
if (a == null || b == null) {
return a === b;
return false;
}
// compare [[Class]] names
var className = toString.call(a),