Phase 3: Split utils.ts by responsibility
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m49s

This commit is contained in:
Refactoring Agent
2026-04-24 13:45:12 +02:00
parent b3291c3b5e
commit 23d0a129c1
6 changed files with 227 additions and 684 deletions
+1 -7
View File
@@ -1,8 +1,5 @@
// ─── Number Formatting Functions ────────────────────────────────────────────────
// ─── Formatting Functions ─────────────────────────────────────────────────────
/**
* Format a number with K, M, B suffixes for large numbers
*/
export function fmt(n: number): string {
if (!isFinite(n) || isNaN(n)) return '0';
if (n >= 1e9) return (n / 1e9).toFixed(2) + 'B';
@@ -11,9 +8,6 @@ export function fmt(n: number): string {
return Math.floor(n).toString();
}
/**
* Format a number with a fixed number of decimal places
*/
export function fmtDec(n: number, d: number = 1): string {
return isFinite(n) ? n.toFixed(d) : '0';
}