• This function formats a number.

    Returns

    Formatted number string

    Parameters

    • value: undefined | number | number[]

      Number to be formatted

    • decimals: number

      Number of decimal places to display

    • Optional defaultValue: number

      Default value

    Returns string | undefined