Function formatUSCurrency

  • Formats a given amount as US currency.

    Parameters

    • amount: number

      The amount to format as currency.

    Returns string

    A string representing the formatted currency.

    Example

    formatUSCurrency(10); // '$10.00'
    formatUSCurrency(10.7454); // '$10.75'
    formatUSCurrency(100000.7); // '$100,000.70'

Generated using TypeDoc