mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-14 19:40:40 +00:00
12 lines
321 B
TypeScript
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]"
|
|
);
|
|
}
|