mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Simplify null/undefined check in _.isEqual and edit _.cloneDeep docs.
Former-commit-id: 62455ba83df04318856fbc889743f44101b24fe3
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user