mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-28 20:08:34 +03:00
8 lines
279 B
TypeScript
8 lines
279 B
TypeScript
|
const TEN_ROUNDING_NUMBER = 10;
|
||
|
const { ceil } = Math;
|
||
|
const formatter = new Intl.NumberFormat('en-US');
|
||
|
|
||
|
export const prettify = (number: number) => formatter.format(number);
|
||
|
|
||
|
export const roundTen = (number: number) => ceil(number / TEN_ROUNDING_NUMBER) * TEN_ROUNDING_NUMBER;
|