Move more components to shlink-web-component when applicable

This commit is contained in:
Alejandro Celaya
2023-07-29 10:43:15 +02:00
parent 275745fd3a
commit 8d24116859
94 changed files with 224 additions and 209 deletions

View File

@@ -0,0 +1,7 @@
const TEN_ROUNDING_NUMBER = 10;
const { ceil } = Math;
const formatter = new Intl.NumberFormat('en-US');
export const prettify = (number: number | string) => formatter.format(Number(number));
export const roundTen = (number: number) => ceil(number / TEN_ROUNDING_NUMBER) * TEN_ROUNDING_NUMBER;