Preparing search index...

    Module NumberFormat

    NumberFormat - Single source of truth for rendering floating-point numbers

    Splits number formatting into two deliberately separate concerns:

    • Display (formatDecimalForDisplay) follows the device's regional convention, so quantities and nutrition values read the way every other app on the phone renders numbers.
    • Storage (formatDecimalForStorage) is locale-independent, because scaled quantities are persisted to the database. A stored value must not change meaning when the user travels or changes their device region.

    Separators are a regional convention rather than a language one, so display follows the device region (expo-localization) and not the app's language setting: a French speaker on a US device still sees 8.53.

    storageDecimalSeparator
    deviceDecimalSeparator
    normalizeDecimalSeparators
    formatDecimalForDisplay
    formatDecimalForStorage