MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / shortNumber

Function shortNumber

apps/start/src/hooks/use-numer-formatter.ts:25–32  ·  view source on GitHub ↗
(locale: string)

Source from the content-addressed store, hash-verified

23
24export const shortNumber =
25 (locale: string) => (value: number | null | undefined) => {
26 if (isNil(value)) {
27 return 'N/A';
28 }
29 return new Intl.NumberFormat(locale, {
30 notation: 'compact',
31 }).format(value);
32 };
33
34export const formatCurrency =
35 (locale: string) =>

Callers 1

useNumberFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected