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

    Variable formatUptime

    formatUptime: (uptime: string) => string

    Type Declaration

      • (uptime: string): string
      • Format uptime percentage for availability display

        Normalizes uptime values which may be provided in different formats (with or without % symbol, as string or number). Ensures consistent percentage display format.

        Parameters

        • uptime: string

          Uptime value in various formats

        Returns string

        Formatted uptime string with % symbol

        formatUptime("99.9%")     // "99.9%" (already formatted)
        formatUptime("99.9") // "99.9%" (adds % symbol)
        formatUptime("0.999") // "99.9%" (converts decimal to percentage)
        formatUptime("invalid") // "invalid" (returns as-is if not parseable)