Skip to content

Variable: isObject()

ts
const 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