• This function formats a value as currency

    Returns

    Formatted currency string

    Parameters

    • value: undefined | number | number[]

      Number to be formatted

    • decimals: undefined | number

      Number of decimal places to display

    • Optional defaultValue: number

      Default value

    Returns string | undefined