tinybench - v6.0.0-rc.1
    Preparing search index...

    Function formatNumber

    • Formats a number with the specified significant digits and maximum fraction digits.

      Parameters

      • value: number

        the number to format

      • significantDigits: number = 5

        the number of significant digits in the output to aim for

      • maxFractionDigits: number = 2

        hard limit for the number of digits after the decimal dot

      Returns string

      the formatted number