forked from alibaba/lowcode-engine-ext
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.tsx
More file actions
11 lines (10 loc) · 373 Bytes
/
utils.tsx
File metadata and controls
11 lines (10 loc) · 373 Bytes
1
2
3
4
5
6
7
8
9
10
11
function isObject(value: any): value is Record<string, unknown> {
return value !== null && typeof value === 'object';
}
export function isPlainObject(value: any): value is any {
if (!isObject(value)) {
return false;
}
const proto = Object.getPrototypeOf(value);
return proto === Object.prototype || proto === null || Object.getPrototypeOf(proto) === null;
}