Add isnan() function for IE

This commit is contained in:
Winston Chang
2018-08-07 12:58:04 -05:00
parent 3354a47e8a
commit 79c5c9f95e
2 changed files with 7 additions and 1 deletions

View File

@@ -254,6 +254,12 @@ function mapValues(obj, f) {
return newObj;
}
// This is does the same as Number.isNaN, but that function unfortunately does
// not exist in any version of IE.
function isnan(x) {
return typeof(x) === 'number' && isNaN(x);
}
// Binary equality function used by the equal function.
function _equal(x, y) {
if ($.type(x) === "object" && $.type(y) === "object") {