Skip to content

roundingModeFromIntl

roundingModeFromIntl(mode): RoundingMode

Defined in: packages/math-numbers/src/rounding-mode-from-intl.ts:28

Translates Intl.NumberFormatOptions.roundingMode into this package’s RoundingMode.

The two sets agree on nine modes under different spellings; the two this one has beyond them — unnecessary and half-odd — are arithmetic policies rather than rendering ones, so Intl names neither and nothing maps to them.

string | undefined

The resolved Intl mode. Intl defaults to halfExpand.

RoundingMode

The matching rounding mode.