CIA Compliance Manager — API Documentation - v1.1.50
    Preparing search index...

    Function formatSecurityLevel

    • Format security level string to the standardized format

      Normalizes security level strings to match the SecurityLevel enum values, handling case variations and trimming whitespace. Essential for ensuring consistent level representation across the application.

      Parameters

      • level: string | null | undefined

        Security level string to format

      Returns string

      Formatted security level matching SecurityLevel enum

      formatSecurityLevel('high')        // 'High'
      formatSecurityLevel('VERY HIGH') // 'Very High'
      formatSecurityLevel(' low ') // 'Low'
      formatSecurityLevel(null) // 'None'
      formatSecurityLevel(undefined) // 'None'
      formatSecurityLevel('invalid') // 'None' (defaults to None)