Comparing version 0.2.7 to 0.2.8
@@ -54,3 +54,3 @@ 'use strict'; | ||
if (config.minSigFigs && value.toString().replace('.', '').length < config.minSigFigs){ | ||
if (config.minSigFigs && value.toString().replace('.', '').length <= config.minSigFigs){ | ||
value = value.toPrecision(config.minSigFigs); | ||
@@ -57,0 +57,0 @@ } else if (value > 1 || unit !== 'B') { |
{ | ||
"name": "8bits", | ||
"version": "0.2.7", | ||
"version": "0.2.8", | ||
"description": "A Javascript library for manipulating and converting byte values", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -96,2 +96,6 @@ 'use strict'; | ||
expect(byte(1024, { minSigFigs: 3, from: 'MB', to: 'B' })).to.equal('1024000000 B'); | ||
expect(byte(450000000000, { minSigFigs: 2 })).to.equal('450 GB'); | ||
expect(byte(45000000000, { minSigFigs: 2 })).to.equal('45 GB'); | ||
expect(byte(4500000000, { minSigFigs: 2 })).to.equal('4.5 GB'); | ||
}); |
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
8844
175