Files
SnowLuma/.pnpm-store/v11/files/9c/6aea8a33fd5026390867b7d3eb1c47730344457d980bea042c54ec73fb4c13682b9ef40055cde8ec5960b3a3e9bfba234188ae41d91cab74add56524ea1e92
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

27 lines
714 B
Plaintext

/**
* Check if the value is a plain object
*
* 校验是否是一个普通对象
*
* @example
* ```js
* import { isPlainObject } from 'is-what-type';
*
* isPlainObject({}); // true
* isPlainObject({ key: 'value' }); // true
* isPlainObject([]); // false
* isPlainObject(null); // false
* isPlainObject(undefined); // false
* isPlainObject(function() {}); // false
* isPlainObject(new Date()); // false
* isPlainObject(new (class {})()); // false
*
* function Fn() {}
* isPlainObject(new Fn()); // false
* ```
*
* @param value The value to check
* @returns `true` if the value is a plain object, else `false`
*/
export declare function isPlainObject<T = object>(value: unknown): value is T;