mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Convert formatBytes to TypeScript
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { filesize } from 'filesize';
|
||||
|
||||
function formatBytes(input) {
|
||||
function formatBytes(input: string | number) {
|
||||
const size = Number(input);
|
||||
|
||||
if (isNaN(size)) {
|
||||
@@ -9,7 +9,7 @@ function formatBytes(input) {
|
||||
|
||||
return `${filesize(size, {
|
||||
base: 2,
|
||||
round: 1
|
||||
round: 1,
|
||||
})}`;
|
||||
}
|
||||
|
Reference in New Issue
Block a user