• Format a number in billions.

    Example

    formatBillions(1_888_000_000) // "1.88"
    formatBillions(1_888_000_000, { minimumFractionDigits: 3 }) // "1.888"

    Returns

    Formatted number (as string)

    Parameters

    • value: number

      Number to format

    • Optional places: number

      (optional) Number of decimal places to round to (defaults to 3)

    Returns string

  • Parameters

    • value: number
    • Optional options: NumberFormatOptions

    Returns string

Generated using TypeDoc