Comparing version 0.2.2 to 0.2.3
@@ -55,2 +55,6 @@ 'use strict'; | ||
if (_.isNaN(bytes) || !_.isNumber(bytes)){ | ||
bytes = 0; | ||
} | ||
// convert to bytes | ||
@@ -57,0 +61,0 @@ if (inputUnit !== 'B'){ |
{ | ||
"name": "8bits", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "A Javascript library for manipulating and converting byte values", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -70,1 +70,8 @@ 'use strict'; | ||
}); | ||
it('should return 0 for NaN, null, undefined, or falsy byte values', function () { | ||
expect(byte(NaN)).to.equal('0 B'); | ||
expect(byte(undefined)).to.equal('0 B'); | ||
expect(byte(null)).to.equal('0 B'); | ||
expect(byte('')).to.equal('0 B'); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7277
136