• This function formats a value as currency

    Parameters

    • value: undefined | string | number | string[] | number[]

      Number to be formatted

    • decimals: undefined | number

      Number of decimal places to display

    • Optional defaultValue: number

      Default value

    Returns string | undefined

    Formatted currency string