mirror of
https://github.com/karl0ss/homepage.git
synced 2025-04-29 12:03:41 +01:00
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
@ -103,7 +103,7 @@ module.exports = {
|
|||||||
const bits = options.bits ? value : value / 8;
|
const bits = options.bits ? value : value / 8;
|
||||||
const k = 1024;
|
const k = 1024;
|
||||||
const dm = options.decimals ? options.decimals : 0;
|
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));
|
const i = Math.floor(Math.log(bits) / Math.log(k));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user