intl-sup
    Preparing search index...

    Function formatCurrency

    • Format currency based on current user locale and provided currency code, with cents if local supports it.

      Parameters

      • amount: number

        Amount to display, either as a float or an integer.

      • currencyCode: string

        The currency code (for instance "USD", "EUR", "JPY", etc.).

      Returns string

      formatted amount with the currency symbol.

      1.0.0

      Browser support: Chrome 24, Edge 12, Firefox 29, Opera 15, Safari 10, Node 0.23, Deno 1.8, Bun 1