fix: remove unnecessary units in humanSize.ts
This commit is contained in:
parent
0f01c05830
commit
d562c1c9a5
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "aquavox",
|
||||
"version": "1.14.0",
|
||||
"version": "1.14.1",
|
||||
"private": false,
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
|
@ -1,6 +1,6 @@
|
||||
export default function toHumanSize(size: number | undefined){
|
||||
if (!size) return '0 B'
|
||||
const units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
||||
const units = ['B', 'KB', 'MB', 'GB'];
|
||||
let unitIndex = 0;
|
||||
while (size >= 1000 && unitIndex < units.length - 1) {
|
||||
size /= 1000;
|
||||
|
Loading…
Reference in New Issue
Block a user