Files
openclaw/src/infra/plain-object.ts
2026-02-19 14:27:36 +00:00

12 lines
321 B
TypeScript

/**
* Strict plain-object guard (excludes arrays and host objects).
*/
export function isPlainObject(value: unknown): value is Record<string, unknown> {
return (
typeof value === "object" &&
value !== null &&
!Array.isArray(value) &&
Object.prototype.toString.call(value) === "[object Object]"
);
}