• This function formats a number.

    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 number string