about summary refs log tree commit diff
path: root/src/view/com/util/numeric/format.ts
blob: 8f3ebd0e71e86cd925b641c3503e10a692b49723 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
import {I18n} from '@lingui/core'

export const formatCount = (i18n: I18n, num: number) => {
  return i18n.number(num, {
    notation: 'compact',
    maximumFractionDigits: 1,
    // @ts-expect-error - roundingMode not in the types
    roundingMode: 'trunc',
  })
}