Is Object Like

Checks if the value is an object (excluding null).

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

Example

  • Input

    isObjectLike({ a: 1 })

    Output:

    true

Return

Returns `true` if the value is an object and not null, otherwise `false`.

Type: boolean

Props

NameTypeDefaultRequiredDescription
valueunknownnullYesThe value to check.

Notes

This function is used internally to determine whether the target or source values in the `merge` function should be deeply merged or simply replaced.

Tags

  • type check
  • object
  • null check

Related