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

    Function isObject

    • Type guard to check if a value is a non-null object

      Useful for safely checking if a value is an object before accessing properties. Filters out null, arrays, and primitive values.

      Parameters

      • value: unknown

        Value to check

      Returns value is Record<string | number | symbol, unknown>

      True if value is a non-null object (excludes arrays)

      isObject({})              // true
      isObject({ key: 'val' }) // true
      isObject(null) // false
      isObject([]) // false (arrays excluded)
      isObject('string') // false
      isObject(123) // false

      // Usage in code
      const data: unknown = getUserData();
      if (isObject(data) && 'name' in data) {
      console.log(data.name); // Safe property access
      }