iggs-utils - v2.4.0
    Preparing search index...

    Function isPlainObject

    • Checks if a value is a plain object (not null, not array, not date, not promise, not function)

      Parameters

      • v: unknown

        value to check

      Returns v is Object

      boolean indicating if the value is a plain object

      isPlainObject({}) // => true
      isPlainObject({ a: 1, b: { c: 2 } }) // => true
      isPlainObject(() => {}) // => false
      isPlainObject(null) // => false
      isPlainObject(undefined) // => false
      isPlainObject([]) // => false
      isPlainObject(new Date()) // => false
      isPlainObject("hello") // => false
      isPlainObject(123) // => false
      isPlainObject(true) // => false
      isPlainObject(Symbol("sym")) // => false
      isPlainObject(BigInt(123)) // => false
      isPlainObject(Promise.resolve(123)) // => false