mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-07-22 03:31:58 +00:00
Improved VisitsTable performance by memoizing visits lists
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
const TEN_ROUNDING_NUMBER = 10;
|
||||
const { ceil } = Math;
|
||||
|
||||
const formatter = new Intl.NumberFormat('en-US');
|
||||
|
||||
export const prettify = (number) => formatter.format(number);
|
||||
|
||||
export const roundTen = (number) => ceil(number / TEN_ROUNDING_NUMBER) * TEN_ROUNDING_NUMBER;
|
||||
|
||||
Reference in New Issue
Block a user