Files
NapCatQQ/.pnpm-store/v3/files/9c/6aea8a33fd5026390867b7d3eb1c47730344457d980bea042c54ec73fb4c13682b9ef40055cde8ec5960b3a3e9bfba234188ae41d91cab74add56524ea1e92
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +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;