Minor comment nits for -0 and +0. [ci skip]

This commit is contained in:
John-David Dalton
2014-02-22 17:57:26 -08:00
parent 0860d9712e
commit c4e31e7a58

View File

@@ -1508,7 +1508,7 @@
// treat `NaN` vs. `NaN` as equal
return (a != +a)
? b != +b
// but treat `+0` vs. `-0` as not equal
// but treat `-0` vs. `+0` as not equal
: (a == 0 ? (1 / a == 1 / b) : a == +b);
case regexpClass:
@@ -6037,7 +6037,7 @@
if (!callback) {
// exit early for identical values
if (a === b) {
// treat `+0` vs. `-0` as not equal
// treat `-0` vs. `+0` as not equal
return a !== 0 || (1 / a == 1 / b);
}
var type = typeof a,
@@ -7131,7 +7131,7 @@
if (!hasOwnProperty.call(object, key)) {
return false;
}
// treat `+0` vs. `-0` as not equal
// treat `-0` vs. `+0` as not equal
var b = object[key];
return a === b && (a !== 0 || (1 / a == 1 / b));
};