Skip to content

Function: isObject()

ts
function isObject(value: unknown): value is { [key: string]: unknown };

Type guard to check if a value is a plain object (not null, not array)

Parameters

ParameterTypeDescription
valueunknownThe value to check

Returns

value is { [key: string]: unknown }

True if the value is a plain object, false otherwise