98 -> 99+

pull/21833/head
Travis Ralston 2020-06-09 08:01:03 -06:00
parent 33e4ecbe86
commit 8faa0936c9
1 changed files with 3 additions and 2 deletions

View File

@ -121,11 +121,12 @@ export function formatCommaSeparatedList(items: string[], itemLimit?: number): s
}
/**
* Formats a number into a 'minimal' badge count (9, 99, 99+).
* Formats a number into a 'minimal' badge count (9, 98, 99+).
* @param count The number to convert
* @returns The badge count, stringified.
*/
export function formatMinimalBadgeCount(count: number): string {
if (count < 100) return count.toString();
// we specifically go from "98" to "99+"
if (count < 99) return count.toString();
return "99+";
}