CIA Compliance Manager API Documentation - v1.0.1
    Preparing search index...

    Function formatNumberWithDecimals

    • Format a number with specified decimal places

      Similar to formatNumber but always returns a string with exact decimal places, without locale-based thousands separators.

      Parameters

      • value: number

        Number to format

      • decimalPlaces: number

        Exact number of decimal places to display

      Returns string

      Formatted number string with fixed decimals

      formatNumberWithDecimals(1234.5678, 2)   // "1234.57"
      formatNumberWithDecimals(99.5, 3) // "99.500"
      formatNumberWithDecimals(1000, 0) // "1000"