mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-01-14 10:42:56 -05:00
more optimization/error handling
This commit is contained in:
5
lib/helpers/format-number.ts
Normal file
5
lib/helpers/format-number.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { siteLocale } from "../config";
|
||||
|
||||
// adds thousands separator
|
||||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat
|
||||
export const commafy = Intl.NumberFormat(siteLocale, { useGrouping: true }).format;
|
||||
Reference in New Issue
Block a user