Options
All
  • Public
  • Public/Protected
  • All
Menu

Module isPlainObject

Index

References

Functions Lang

References

Renames and re-exports isPlainObject

Lang Functions

  • isPlainObject(value: any): boolean
  • Checks if value is a plain object, that is, an object created by the Object constructor or one with a [[Prototype]] of null.

    since

    5.6.0

    example
    function Foo() {
    this.a = 1
    }

    isPlainObject(new Foo)
    // => false

    isPlainObject([1, 2, 3])
    // => false

    isPlainObject({ 'x': 0, 'y': 0 })
    // => true

    isPlainObject(Object.create(null))
    // => true

    Parameters

    • value: any

      The value to check.

    Returns boolean

    Returns true if value is a plain object, else false.