Skip to content

isPlainObject

isPlainObject(value): value is Record<string, unknown>

Defined in: merge.ts:55

true for a plain {} object — not null, not an array, not a class instance (Object.getPrototypeOf is Object.prototype or null, so Object.create(null) counts too).

unknown

value is Record<string, unknown>

import { isPlainObject } from "@theholocron/object-utils";
isPlainObject({}); // true
isPlainObject([]); // false
isPlainObject(new Date()); // false