Skip to content

Variable: isPlainObject() ​

ts
const isPlainObject: (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