Function formatAmount

Formats the given value to a specific scale and separates the thousands with a separator.

  • Parameters

    • value: string | number

      The value to be formatted.

    • Optionalscale: number = 2

      The number of decimal places to round to.

    • Optionalseparator: string = ','

      The separator for thousands.

    Returns string

    The formatted value.