@pawover/kit 0.3.1 → 0.4.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.
- package/package.json +9 -9
- package/packages/hooks/dist/index.d.ts +1 -1
- package/packages/hooks/dist/react.js +4 -3
- package/packages/utils/dist/index.d.ts +1129 -923
- package/packages/utils/dist/index.js +141 -2
- package/packages/utils/dist/{stringUtil-DbYpnL4l.js → math-Cvy9HBP0.js} +58 -3
- package/packages/utils/dist/math.js +1 -55
- package/packages/utils/dist/metadata.json +1 -0
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://github.com/pawover"
|
|
7
7
|
},
|
|
8
8
|
"description": "一个基于 TypeScript 的开发工具包",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.4.1",
|
|
10
10
|
"type": "module",
|
|
11
11
|
"engines": {
|
|
12
12
|
"node": ">=22.20.0"
|
|
@@ -53,13 +53,13 @@
|
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@commitlint/cli": "^21.2.1",
|
|
55
55
|
"@commitlint/config-conventional": "^21.2.0",
|
|
56
|
-
"@eslint-react/eslint-plugin": "^5.
|
|
56
|
+
"@eslint-react/eslint-plugin": "^5.17.3",
|
|
57
57
|
"@pawover/eslint-rules": "^0.2.3",
|
|
58
58
|
"@playwright/test": "^1.61.1",
|
|
59
59
|
"@stylistic/eslint-plugin": "^6.0.0-beta.5",
|
|
60
60
|
"@types/fs-extra": "^11.0.4",
|
|
61
61
|
"@types/node": "^26.1.1",
|
|
62
|
-
"@vitejs/plugin-react": "^6.0.
|
|
62
|
+
"@vitejs/plugin-react": "^6.0.4",
|
|
63
63
|
"@vitest/browser-playwright": "^4.1.10",
|
|
64
64
|
"commitizen": "^4.3.2",
|
|
65
65
|
"cz-customizable": "^7.5.4",
|
|
@@ -70,18 +70,18 @@
|
|
|
70
70
|
"fs-extra": "^11.3.6",
|
|
71
71
|
"husky": "^9.1.7",
|
|
72
72
|
"jsdom": "^29.1.1",
|
|
73
|
-
"lint-staged": "^17.
|
|
74
|
-
"prettier": "^3.9.
|
|
73
|
+
"lint-staged": "^17.1.1",
|
|
74
|
+
"prettier": "^3.9.6",
|
|
75
75
|
"rimraf": "^6.1.3",
|
|
76
|
-
"taze": "^19.
|
|
77
|
-
"tsdown": "^0.22.
|
|
76
|
+
"taze": "^19.16.0",
|
|
77
|
+
"tsdown": "^0.22.13",
|
|
78
78
|
"turbo": "^2.10.5",
|
|
79
79
|
"typescript": "^6.0.3",
|
|
80
|
-
"typescript-eslint": "^8.
|
|
80
|
+
"typescript-eslint": "^8.65.0",
|
|
81
81
|
"vitest": "^4.1.10"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
|
-
"alova": "^3.
|
|
84
|
+
"alova": "^3.5.1",
|
|
85
85
|
"mathjs": "^15.0.0",
|
|
86
86
|
"react": "^19.2.0",
|
|
87
87
|
"vite": "^7 || ^8",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {}
|
|
@@ -11,7 +11,7 @@ function useLatest(value) {
|
|
|
11
11
|
return ref;
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
|
-
//#region ../utils/dist/
|
|
14
|
+
//#region ../utils/dist/math-Cvy9HBP0.js
|
|
15
15
|
/**
|
|
16
16
|
* 类型工具类
|
|
17
17
|
*/
|
|
@@ -732,12 +732,13 @@ var TypeUtil = class {
|
|
|
732
732
|
* 字符串工具类
|
|
733
733
|
*/
|
|
734
734
|
var StringUtil = class {
|
|
735
|
-
static cast(candidate, checkEmpty = true) {
|
|
735
|
+
static cast(candidate, checkEmpty = true, trim = true) {
|
|
736
736
|
if (checkEmpty) {
|
|
737
737
|
if (candidate === null || candidate === void 0) return "";
|
|
738
738
|
if (typeof candidate === "string" && candidate.trim().length === 0) return "";
|
|
739
739
|
}
|
|
740
|
-
|
|
740
|
+
const result = String(candidate);
|
|
741
|
+
return trim ? result.trim() : result;
|
|
741
742
|
}
|
|
742
743
|
/**
|
|
743
744
|
* 从字符串中提取数字字符串
|