Consolidate fileSize formatting logic

This commit is contained in:
trevor-signal 2024-05-03 17:25:24 -04:00 committed by GitHub
parent 568e31a7bf
commit c4ba3c44ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 16 additions and 11 deletions

View 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 });
}