We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc8421e commit 39d840cCopy full SHA for 39d840c
assets/js/homepage_stats.js
@@ -1,6 +1,6 @@
1
function formatBytes(numBytes) {
2
const units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
3
- const factor = 1000; // Conversion factor for bytes to the next unit
+ const factor = 1024; // Conversion factor for bytes to the next unit
4
5
let unitIndex = 0;
6
while (numBytes >= factor && unitIndex < units.length - 1) {
0 commit comments