mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 19:52:51 +00:00
10 lines
291 B
TypeScript
10 lines
291 B
TypeScript
import { isObject } from './is-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;
|
|
}
|