For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /reference/predicate/isObject.md.

isObject

Checks if a value is a non-null object.

Returns true for plain objects, arrays, class instances, etc. Returns false for null, primitives, and functions.

isObject({}) // true
isObject(null) // false

Usage

isObject(value: unknown)

Checks if a value is a non-null object.

Returns true for plain objects, arrays, class instances, etc. Returns false for null, primitives, and functions.

import { isObject } from 'massaman'
// or:  import { isObject } from 'massaman/predicate'

isObject({}) // true
isObject(null) // false

Parameters

valueunknownrequired

the value to test.

Returns

whether value is a non-null object; a true result narrows it to object.

value is object