do to formatters
This commit is contained in:
14
apps/website/lib/formatters/DashboardCountFormatter.ts
Normal file
14
apps/website/lib/formatters/DashboardCountFormatter.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* DashboardCountDisplay
|
||||
*
|
||||
* Deterministic count formatting for dashboard display.
|
||||
*/
|
||||
|
||||
export class DashboardCountFormatter {
|
||||
static format(count: number | null | undefined): string {
|
||||
if (count === null || count === undefined) {
|
||||
return '0';
|
||||
}
|
||||
return count.toString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user