GoScrobble/web/node_modules/object-is/implementation.js

20 lines
286 B
JavaScript
Raw Normal View History

2022-04-25 02:47:15 +00:00
'use strict';
var numberIsNaN = function (value) {
return value !== value;
};
module.exports = function is(a, b) {
if (a === 0 && b === 0) {
return 1 / a === 1 / b;
}
if (a === b) {
return true;
}
if (numberIsNaN(a) && numberIsNaN(b)) {
return true;
}
return false;
};