fix all the byte units display labels to binary
see https://en.wikipedia.org/wiki/Kilobyte
This commit is contained in:
parent
aadedd1864
commit
e1f217ad80
1 changed files with 1 additions and 1 deletions
|
@ -103,7 +103,7 @@ module.exports = {
|
|||
const bits = options.bits ? value : value / 8;
|
||||
const k = 1024;
|
||||
const dm = options.decimals ? options.decimals : 0;
|
||||
const sizes = ["Bps", "Kbps", "MiBps", "Gbps", "Tbps", "Pbps", "Ebps", "Zbps", "Ybps"];
|
||||
const sizes = ["Bps", "KiBps", "MiBps", "GiBps", "TiBps", "PiBps", "EiBps", "ZiBps", "YiBps"];
|
||||
|
||||
const i = Math.floor(Math.log(bits) / Math.log(k));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue