@pawover/kit 0.2.0 → 0.2.2

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.
@@ -1,4 +1,4 @@
1
- import { n as TypeUtil, t as StringUtil } from "./stringUtil-CaY_wCS-.js";
1
+ import { n as TypeUtil, t as StringUtil } from "./stringUtil-DbYpnL4l.js";
2
2
  //#region src/array/arrayUtil.ts
3
3
  /**
4
4
  * 数组工具类
@@ -667,9 +667,8 @@ var FunctionUtil = class {
667
667
  * ```
668
668
  */
669
669
  static toArgs(args, start) {
670
- if (args === null) throw new TypeError(`function [toArgs] Expected parameter [args] to be a arguments object, got ${typeof args}`);
671
- const array = Array.from(args);
672
- return TypeUtil.isNumber(start) ? array.slice(start) : array;
670
+ if (args === null || args === void 0) throw new TypeError(`function [toArgs] Expected parameter [args] to be a arguments object, got ${typeof args}`);
671
+ return Array.prototype.slice.call(args, start);
673
672
  }
674
673
  /**
675
674
  * 将同步或异步函数统一包装为 Promise
@@ -1,5 +1,4 @@
1
1
  import { BigNumber, MathExpression, MathJsInstance, Matrix } from "mathjs";
2
-
3
2
  //#region src/math/mathUtil.d.ts
4
3
  /**
5
4
  * 数学工具类
@@ -1,4 +1,4 @@
1
- import { n as TypeUtil, t as StringUtil } from "./stringUtil-CaY_wCS-.js";
1
+ import { n as TypeUtil, t as StringUtil } from "./stringUtil-DbYpnL4l.js";
2
2
  //#region src/math/mathUtil.ts
3
3
  /**
4
4
  * 数学工具类
@@ -355,6 +355,23 @@ var TypeUtil = class {
355
355
  return prototypeCheck ? check && Object.getPrototypeOf(value) === Object.prototype : check;
356
356
  }
357
357
  /**
358
+ * 判断是否为广义对象类型
359
+ *
360
+ * @param value 待检查值
361
+ * @returns 是否为对象
362
+ * @example
363
+ * ```ts
364
+ * TypeUtil.isObject({}); // true
365
+ * TypeUtil.isObject([]); // true
366
+ * TypeUtil.isObject(new Date()); // true
367
+ * TypeUtil.isObject(null); // false
368
+ * TypeUtil.isObject("string"); // false
369
+ * ```
370
+ */
371
+ static isObject(value) {
372
+ return typeof value === "object" && value !== null;
373
+ }
374
+ /**
358
375
  * 判断一个对象是否为有效的枚举
359
376
  * - 枚举成员不能为空
360
377
  * - 枚举成员的键不能具有数值名
@@ -1,5 +1,4 @@
1
1
  import { ProxyOptions } from "vite";
2
-
3
2
  //#region src/vite/viteUtil.d.ts
4
3
  /**
5
4
  * Vite 工具类
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
-
3
2
  //#region src/server.d.ts
4
3
  declare const id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
5
4
  declare const idAllowEmpty: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;