mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-05-08 12:43:19 +02:00
Convert formatBytes to TypeScript
This commit is contained in:
parent
5cbbd060a4
commit
379071f838
1 changed files with 2 additions and 2 deletions
|
|
@ -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,
|
||||
})}`;
|
||||
}
|
||||
|
||||
Loading…
Reference in a new issue