chore: Apply linting rules and add git hok (#611)

Co-authored-by: Fredrik Burmester <fredrik.burmester@gmail.com>
This commit is contained in:
lostb1t
2025-03-16 18:01:12 +01:00
committed by GitHub
parent 2688e1b981
commit 92513e234f
268 changed files with 9197 additions and 8394 deletions

View File

@@ -3,6 +3,8 @@ export const formatBitrate = (bitrate?: number | null) => {
const sizes = ["bps", "Kbps", "Mbps", "Gbps", "Tbps"];
if (bitrate === 0) return "0 bps";
const i = parseInt(Math.floor(Math.log(bitrate) / Math.log(1000)).toString());
const i = Number.parseInt(
Math.floor(Math.log(bitrate) / Math.log(1000)).toString(),
);
return Math.round((bitrate / Math.pow(1000, i)) * 100) / 100 + " " + sizes[i];
};