tguard-js
    Preparing search index...

    Function isObject

    • Determines whether the provided value is an object (excluding null).

      Parameters

      • o: unknown

        The value to be checked.

      Returns o is object

      true if the value is an object and not null.

      This function returns true for any value whose typeof result is "object" except null. This includes arrays, dates, maps, sets, and class instances.

      This function does NOT check whether a value is a plain object ({}). Use isPlainObject for that purpose.

      Value Result
      {} true
      [] true
      new Date() true
      new Map() true
      null false
      undefined false
      () => {} false
      'text' false

      1.0