Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

Commit 9d4ecdb

Browse files
authored
Version 5.0.0
1 parent 4db18e7 commit 9d4ecdb

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/utils/format.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,15 @@ export function getFolderStructure(folder: string): string {
1515
}
1616

1717
return "/" + folders.join("/");
18+
}
19+
20+
21+
export function formatFileSizeKBMB(total_bytes: number): string {
22+
if (total_bytes < 1024) {
23+
return '';
24+
} else if (total_bytes < 1048576) {
25+
return ` (${(total_bytes / 1024).toFixed(2)} KB)`;
26+
} else {
27+
return ` (${(total_bytes / (1024 * 1024)).toFixed(2)} MB)`;
28+
}
1829
}

src/utils/tags.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,5 @@ export function getPropsPerFile(file: TFile): string {
4646

4747
return fileProperties.join(' \n');
4848
}
49+
50+

0 commit comments

Comments
 (0)