Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped
27 lines
714 B
Plaintext
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;
|