diff options
author | Brian Kim <brian@tagg.id> | 2021-06-09 09:24:00 +0900 |
---|---|---|
committer | Brian Kim <brian@tagg.id> | 2021-06-09 09:24:00 +0900 |
commit | 2ddd29120980ebced560dac09bbe270dc4aee0d1 (patch) | |
tree | 9a0676d47e548e1f3c25e5c166cbd8941c5a80f9 /src/utils/common.ts | |
parent | 2f66fec878e9bba15ac7f2397820bb48d3f167bb (diff) |
Create separate pill component
Diffstat (limited to 'src/utils/common.ts')
-rw-r--r-- | src/utils/common.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/utils/common.ts b/src/utils/common.ts index 049dae90..cb0bd62d 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -198,6 +198,7 @@ export const validateImageLink = async (url: string | undefined) => { }); }; +// Documentation: https://stackoverflow.com/questions/2901102/how-to-print-a-number-with-commas-as-thousands-separators-in-javascript export const numberWithCommas = (digits: number) => { return digits.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); }; |