MCPcopy Index your code
hub / github.com/github/docs / useNumberFormatter

Function useNumberFormatter

components/hooks/useNumberFormatter.ts:3–10  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import { useRouter } from 'next/router'
2
3export function useNumberFormatter() {
4 const { locale } = useRouter()
5 return {
6 formatInteger: (num: number) => {
7 return new Intl.NumberFormat(locale).format(num)
8 },
9 }
10}

Callers 2

SearchResultsFunction · 0.90
SearchFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected