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

    Variable formatSecurityLevelFromWidget

    formatSecurityLevelFromWidget: (level: string | null | undefined) => string

    Type Declaration

      • (level: string | null | undefined): string
      • 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)