@pawover/kit 0.1.1 → 0.2.1

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,34 @@ declare class TypeUtil {
4358
4358
  *
4359
4359
  * @param value 待检查值
4360
4360
  * @param prototypeCheck 是否进行原型检查,默认 `true`
4361
- * @returns 是否为 Plain Object (当 checkPrototype=true) 或 object
4361
+ * @returns 是否为 Plain Object (当 prototypeCheck=true) 或 object
4362
+ * @example
4363
+ * ```ts
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
4371
+ * ```
4372
+ */
4373
+ static isPlainObject(value: unknown, prototypeCheck?: boolean): value is Record<PropertyKey, unknown>;
4374
+ /**
4375
+ * 判断是否为广义对象类型
4376
+ *
4377
+ * @param value 待检查值
4378
+ * @returns 是否为对象
4362
4379
  * @example
4363
4380
  * ```ts
4364
4381
  * TypeUtil.isObject({}); // true
4365
- * TypeUtil.isObject([]); // false
4366
- * TypeUtil.isObject(new Date()); // false
4367
- * TypeUtil.isObject(new Date(), false); // true
4368
- * TypeUtil.isObject(Object.create(null)) // false
4369
- * TypeUtil.isObject(Object.create(null), false) // true
4382
+ * TypeUtil.isObject([]); // true
4383
+ * TypeUtil.isObject(new Date()); // true
4384
+ * TypeUtil.isObject(null); // false
4385
+ * TypeUtil.isObject("string"); // false
4370
4386
  * ```
4371
4387
  */
4372
- static isObject(value: unknown, prototypeCheck?: boolean): value is Record<PropertyKey, unknown>;
4388
+ static isObject(value: unknown): value is object;
4373
4389
  /**
4374
4390
  * 判断一个对象是否为有效的枚举
4375
4391
  * - 枚举成员不能为空