intl-sup
    Preparing search index...

    Function formatCurrencyWithoutDecimal

    • Format currency based on current user locale and provided currency code, without cents.

      Parameters

      • amount: number

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

      • currencyCode: string

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

      • roundingMethod: RoudingMethod = "round"

        The rounding method, "round" will round to the nearest integer, "ceil" will round up and "floor" will round down. Default is "round".

      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