mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-25 02:48:23 +01:00
Consolidate fileSize formatting logic
This commit is contained in:
7
ts/util/formatFileSize.ts
Normal file
7
ts/util/formatFileSize.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
// Copyright 2024 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
import filesize from 'filesize';
|
||||
|
||||
export function formatFileSize(size: number): string {
|
||||
return filesize(size, { round: 0 });
|
||||
}
|
||||
Reference in New Issue
Block a user