Skip to main content

isObject

function isObject
Jump to headingisObject(object: unknown): boolean
Deprecated

Returns true if the given object is strictly an Objectand not aFunction (even though functions are objects in JavaScript). Otherwise, returns false.

import util from 'node:util';

util.isObject(5);
// Returns: false
util.isObject(null);
// Returns: false
util.isObject({});
// Returns: true
util.isObject(() => {});
// Returns: false

Parameters Jump to heading

Jump to headingobject: unknown

Return Type Jump to heading

boolean
Back to top