mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 01:47:48 +00:00
Comment formatting.
This commit is contained in:
@@ -679,12 +679,12 @@
|
|||||||
if (a.length !== b.length) return false;
|
if (a.length !== b.length) return false;
|
||||||
// Objects with different constructors are not equal.
|
// Objects with different constructors are not equal.
|
||||||
if (a.constructor !== b.constructor) return false;
|
if (a.constructor !== b.constructor) return false;
|
||||||
// Assume equality for cyclic structures. The algorithm for detecting cyclic structures is
|
// Assume equality for cyclic structures. The algorithm for detecting cyclic
|
||||||
// adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
|
// structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
|
||||||
var length = stack.length;
|
var length = stack.length;
|
||||||
while (length--) {
|
while (length--) {
|
||||||
// Linear search. Performance is inversely proportional to the number of unique nested
|
// Linear search. Performance is inversely proportional to the number of
|
||||||
// structures.
|
// unique nested structures.
|
||||||
if (stack[length] == a) return true;
|
if (stack[length] == a) return true;
|
||||||
}
|
}
|
||||||
// Add the first object to the stack of traversed objects.
|
// Add the first object to the stack of traversed objects.
|
||||||
|
|||||||
Reference in New Issue
Block a user