Add item count widget to dashboard

This commit is contained in:
Bill Thornton
2025-06-09 14:48:43 -04:00
parent 02d4857a9e
commit 1c6dac5936
8 changed files with 230 additions and 10 deletions
+14
View File
@@ -13,6 +13,20 @@ export function randomInt(min: number, max: number): number {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
/**
* Gets the value of a number formatted as a string.
* @param {number} value The value as a number.
* @param {string} locale The locale to use for formatting (i.e. en-us).
* @returns {string} The value formatted as a string.
*/
export function toLocaleString(value: number, locale: string): string {
if (toLocaleStringSupportsOptions()) {
return value.toLocaleString(locale);
}
return value.toString();
}
/**
* Gets the value of a number formatted as a perentage.
* @param {number} value The value as a number.