Closed kriskowal closed 10 years ago
Fixes for a bug in equals for same-shaped cyclic structures. Upon encountering a memo entry, return true and rely on the parent call to return false if the values are in fact inequal.
Was most concerned by this but worked it through and I'm satisfied it's correct.
Using -Infinity and +Infinity instead of arbitrary -1 or 1 for string comparison prevents "viscinity checks", like, is this string near this other one, from getting confused.
Much less cleverness about comparing null and undefined so that polymorphic comparators get a chance to run if they exist.
Fixes for a bug in equals for same-shaped cyclic structures. Upon encountering a memo entry, return true and rely on the parent call to return false if the values are in fact inequal.
Avoid redundant equals calls in comparing object literals. Only compare object literals, not objects derriving from the same prototype.