pretty-bytes
Advanced tools
Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "pretty-bytes", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Convert bytes to a human readable string: 1337 → 1.34 kB", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -11,4 +11,9 @@ /*! | ||
// Number.isNaN() polyfill | ||
var isNaN = function (val) { | ||
return val !== val; | ||
}; | ||
var prettyBytes = function (num) { | ||
if (typeof num !== 'number' || Number.isNaN(num)) { | ||
if (typeof num !== 'number' || isNaN(num)) { | ||
throw new TypeError('Input must be a number'); | ||
@@ -15,0 +20,0 @@ } |
3145
55