From c817cb80b5781a3a360b9f0bbc532bcefd548a13 Mon Sep 17 00:00:00 2001 From: Dominic Barnes Date: Mon, 13 Jan 2014 09:29:10 -0600 Subject: [PATCH] lowercasing NaN to nan --- index.js | 2 +- test/tests.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 38ffc4c..40998e4 100644 --- a/index.js +++ b/index.js @@ -23,7 +23,7 @@ module.exports = function(val){ if (val === null) return 'null'; if (val === undefined) return 'undefined'; - if (val !== val) return 'NaN'; + if (val !== val) return 'nan'; if (val && val.nodeType === 1) return 'element'; return typeof val.valueOf(); diff --git a/test/tests.js b/test/tests.js index 0d07535..cbec75d 100644 --- a/test/tests.js +++ b/test/tests.js @@ -17,7 +17,7 @@ describe('type', function(){ }); it('should match NaN', function () { - assert('NaN' === type(NaN)); + assert('nan' === type(NaN)); }); it('should match strings', function(){