MCPcopy Create free account
hub / github.com/npmx-dev/npmx.dev / useNumberFormatter

Function useNumberFormatter

app/composables/useNumberFormatter.ts:1–5  ·  view source on GitHub ↗
(options?: Intl.NumberFormatOptions)

Source from the content-addressed store, hash-verified

1export function useNumberFormatter(options?: Intl.NumberFormatOptions) {
2 const { locale } = useI18n()
3
4 return computed(() => new Intl.NumberFormat(locale.value, options))
5}
6
7export const useCompactNumberFormatter = () =>
8 useNumberFormatter({

Callers 3

usePackageComparisonFunction · 0.85
useBytesFormatterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected