Is Object

Checks if the provided parameter is a plain object.

CategoryValidations
AuthorPol Gubau
Since1.0.0
Last Updated2025-03-15
TypeSync
CompatibilityUniversal

Example

  • Input

    isObject({})

    Output:

    true
  • Input

    isObject(`string`)

    Output:

    false

Return

Returns true if the item is a plain object, otherwise false.

Type: boolean

Props

NameTypeDefaultRequiredDescription
itemunknownnullYesThe item to check.

Notes

A plain object is one that is created using the `Object` constructor, not an instance of a class.

Tags

  • object
  • type checking

Related