Comparing version 0.3.0 to 1.0.0
1.0.0 / 2014-05-05 | ||
================== | ||
* add negative support. fixes #6 | ||
0.3.0 / 2014-03-19 | ||
@@ -3,0 +8,0 @@ ================== |
10
index.js
@@ -35,8 +35,8 @@ | ||
function convert (b) { | ||
var tb = ((1 << 30) * 1024), gb = 1 << 30, mb = 1 << 20, kb = 1 << 10; | ||
if (b >= tb) return (Math.round(b / tb * 100) / 100) + 'tb'; | ||
if (b >= gb) return (Math.round(b / gb * 100) / 100) + 'gb'; | ||
if (b >= mb) return (Math.round(b / mb * 100) / 100) + 'mb'; | ||
if (b >= kb) return (Math.round(b / kb * 100) / 100) + 'kb'; | ||
var tb = ((1 << 30) * 1024), gb = 1 << 30, mb = 1 << 20, kb = 1 << 10, abs = Math.abs(b); | ||
if (abs >= tb) return (Math.round(b / tb * 100) / 100) + 'tb'; | ||
if (abs >= gb) return (Math.round(b / gb * 100) / 100) + 'gb'; | ||
if (abs >= mb) return (Math.round(b / mb * 100) / 100) + 'mb'; | ||
if (abs >= kb) return (Math.round(b / kb * 100) / 100) + 'kb'; | ||
return b + 'b'; | ||
} |
@@ -9,3 +9,3 @@ { | ||
}, | ||
"version": "0.3.0", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
@@ -12,0 +12,0 @@ "dependencies": {}, |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3452
1