@pawover/kit 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4358,18 +4358,19 @@ declare class TypeUtil {
|
|
|
4358
4358
|
*
|
|
4359
4359
|
* @param value 待检查值
|
|
4360
4360
|
* @param prototypeCheck 是否进行原型检查,默认 `true`
|
|
4361
|
-
* @returns 是否为 Plain Object (当
|
|
4361
|
+
* @returns 是否为 Plain Object (当 prototypeCheck=true) 或 object
|
|
4362
4362
|
* @example
|
|
4363
4363
|
* ```ts
|
|
4364
|
-
* TypeUtil.
|
|
4365
|
-
* TypeUtil.
|
|
4366
|
-
* TypeUtil.
|
|
4367
|
-
* TypeUtil.
|
|
4368
|
-
* TypeUtil.
|
|
4369
|
-
* TypeUtil.
|
|
4364
|
+
* TypeUtil.isPlainObject({}); // true
|
|
4365
|
+
* TypeUtil.isPlainObject([]); // false
|
|
4366
|
+
* TypeUtil.isPlainObject(new Date()); // false
|
|
4367
|
+
* TypeUtil.isPlainObject(new (class {})()); // false
|
|
4368
|
+
* TypeUtil.isPlainObject(new (class {})(), false); // true
|
|
4369
|
+
* TypeUtil.isPlainObject(Object.create(null)) // false
|
|
4370
|
+
* TypeUtil.isPlainObject(Object.create(null), false) // true
|
|
4370
4371
|
* ```
|
|
4371
4372
|
*/
|
|
4372
|
-
static
|
|
4373
|
+
static isPlainObject(value: unknown, prototypeCheck?: boolean): value is Record<PropertyKey, unknown>;
|
|
4373
4374
|
/**
|
|
4374
4375
|
* 判断一个对象是否为有效的枚举
|
|
4375
4376
|
* - 枚举成员不能为空
|