@fangzhongya/utils 0.0.11 → 0.0.16
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/README.md +5 -1
- package/dist/basic/array/index.cjs +11 -7
- package/dist/basic/array/index.d.cts +1 -0
- package/dist/basic/array/index.d.ts +1 -0
- package/dist/basic/array/index.js +11 -7
- package/dist/basic/array/sortObj.cjs +7 -0
- package/dist/basic/array/sortObj.d.cts +10 -0
- package/dist/basic/array/sortObj.d.ts +10 -0
- package/dist/basic/array/sortObj.js +7 -0
- package/dist/basic/index.cjs +22 -17
- package/dist/basic/index.d.cts +8 -3
- package/dist/basic/index.d.ts +8 -3
- package/dist/basic/index.js +21 -16
- package/dist/basic/object/index.cjs +14 -8
- package/dist/basic/object/index.d.cts +1 -0
- package/dist/basic/object/index.d.ts +1 -0
- package/dist/basic/object/index.js +13 -7
- package/dist/basic/object/objValue.cjs +9 -0
- package/dist/basic/object/objValue.d.cts +7 -0
- package/dist/basic/object/objValue.d.ts +7 -0
- package/dist/basic/object/objValue.js +9 -0
- package/dist/basic/string/appearNum.cjs +2 -2
- package/dist/basic/string/appearNum.js +1 -1
- package/dist/basic/string/getStrNunPosit.cjs +7 -0
- package/dist/basic/string/getStrNunPosit.d.cts +10 -0
- package/dist/basic/string/getStrNunPosit.d.ts +10 -0
- package/dist/basic/string/getStrNunPosit.js +7 -0
- package/dist/basic/string/index.cjs +26 -7
- package/dist/basic/string/index.d.cts +3 -0
- package/dist/basic/string/index.d.ts +3 -0
- package/dist/basic/string/index.js +29 -10
- package/dist/basic/string/startsNum.cjs +7 -0
- package/dist/basic/string/startsNum.d.cts +9 -0
- package/dist/basic/string/startsNum.d.ts +9 -0
- package/dist/basic/string/startsNum.js +7 -0
- package/dist/basic/string/toFunction.cjs +2 -2
- package/dist/basic/string/toFunction.d.cts +15 -7
- package/dist/basic/string/toFunction.d.ts +15 -7
- package/dist/basic/string/toFunction.js +1 -1
- package/dist/basic/string/toJson.cjs +3 -3
- package/dist/basic/string/toJson.d.cts +2 -5
- package/dist/basic/string/toJson.d.ts +2 -5
- package/dist/basic/string/toJson.js +2 -2
- package/dist/basic/string/toJsons.cjs +15 -0
- package/dist/basic/string/toJsons.d.cts +60 -0
- package/dist/basic/string/toJsons.d.ts +60 -0
- package/dist/basic/string/toJsons.js +15 -0
- package/dist/chunk-2H3KVSFA.cjs +16 -0
- package/dist/{chunk-LZ7JIJ4I.cjs → chunk-2J3S75C6.cjs} +6 -2
- package/dist/{chunk-6RIGEV6G.cjs → chunk-3DD7YCN2.cjs} +2 -2
- package/dist/chunk-3NBXSBFM.js +29 -0
- package/dist/{chunk-VQKOHGV5.cjs → chunk-4BGJIMWM.cjs} +9 -5
- package/dist/chunk-5HC662VK.js +432 -0
- package/dist/chunk-754Z5VW6.js +29 -0
- package/dist/chunk-7O4MJOHM.js +142 -0
- package/dist/{chunk-X4WTO4NR.js → chunk-CMBQ66JH.js} +5 -1
- package/dist/chunk-E4WBX6J5.cjs +29 -0
- package/dist/chunk-ETMYYVQJ.cjs +432 -0
- package/dist/{chunk-R5TH6GQE.js → chunk-FSIQKHKH.js} +5 -5
- package/dist/{chunk-QJVB3JIZ.js → chunk-HWR2FRME.js} +1 -1
- package/dist/{chunk-JJLYV6GY.js → chunk-IEQHKLEL.js} +12 -6
- package/dist/chunk-ILJLXJ5O.cjs +15 -0
- package/dist/chunk-JHV27P2Q.cjs +54 -0
- package/dist/{chunk-SNABGVNO.js → chunk-LPMR5W6M.js} +1 -1
- package/dist/{chunk-2KT66KQH.js → chunk-LU22MUUS.js} +10 -6
- package/dist/chunk-NESVPZNF.cjs +29 -0
- package/dist/chunk-O34QAOO7.js +16 -0
- package/dist/{chunk-3HXQ7TGV.cjs → chunk-OJBZ7UUC.cjs} +1 -1
- package/dist/{chunk-YHLI3SF7.js → chunk-OVHYLUAS.js} +8 -0
- package/dist/chunk-P7AWHISY.js +15 -0
- package/dist/chunk-PLNZCEDI.js +442 -0
- package/dist/chunk-PSHKOVLY.cjs +24 -0
- package/dist/{chunk-V5HVA7TW.cjs → chunk-PV2N6PF2.cjs} +8 -0
- package/dist/chunk-QXK4IUBI.cjs +142 -0
- package/dist/chunk-RYBJGHXK.cjs +153 -0
- package/dist/{chunk-ZRZ5HATA.js → chunk-SE7A43WC.js} +1 -1
- package/dist/chunk-U3PZBQ6G.js +54 -0
- package/dist/{chunk-SLRWY5FH.cjs → chunk-UGT4QBTM.cjs} +12 -6
- package/dist/chunk-UHKL2RG3.cjs +80 -0
- package/dist/chunk-USIMBBLW.js +16 -0
- package/dist/{chunk-FCCQIHFD.js → chunk-UZ3LZBJ5.js} +1 -1
- package/dist/chunk-V2DXOH6B.cjs +442 -0
- package/dist/chunk-VJUGYXBC.cjs +70 -0
- package/dist/chunk-XQOH3NGZ.js +153 -0
- package/dist/chunk-XW3XIK3D.cjs +16 -0
- package/dist/chunk-YKNGDK4I.js +80 -0
- package/dist/{chunk-GIJMEVTJ.js → chunk-ZEMAXGD5.js} +27 -9
- package/dist/index-20jIrGxr.d.ts +36 -0
- package/dist/index-B7gdHwF9.d.cts +40 -0
- package/dist/{index-EY4Ag8_f.d.cts → index-BU0xla6v.d.cts} +4 -1
- package/dist/{index-D92-6As_.d.ts → index-C29DFVeC.d.ts} +3 -1
- package/dist/index-C6CeIuau.d.cts +36 -0
- package/dist/index-CPO1AFVg.d.ts +14 -0
- package/dist/{index-Dm5gvjpr.d.cts → index-C__Goqn1.d.cts} +3 -1
- package/dist/index-D1WceQZE.d.ts +9 -0
- package/dist/{index-CsP95PJy.d.ts → index-DOq59RNr.d.ts} +4 -1
- package/dist/index-DPrdy8Ms.d.ts +40 -0
- package/dist/{index-D-JJ6qt2.d.ts → index-IJlghj8j.d.ts} +3 -1
- package/dist/index-cuR7l2XV.d.cts +14 -0
- package/dist/index-haAz3CpA.d.cts +9 -0
- package/dist/{index-BrxHOuw0.d.cts → index-qUiGxoy_.d.cts} +3 -1
- package/dist/index.cjs +45 -37
- package/dist/index.d.cts +15 -7
- package/dist/index.d.ts +15 -7
- package/dist/index.js +48 -40
- package/dist/judge/index.cjs +57 -5
- package/dist/judge/index.d.cts +1 -0
- package/dist/judge/index.d.ts +1 -0
- package/dist/judge/index.js +57 -5
- package/dist/judge/judge.cjs +55 -0
- package/dist/judge/judge.d.cts +155 -0
- package/dist/judge/judge.d.ts +155 -0
- package/dist/judge/judge.js +55 -0
- package/dist/judge/matchs.cjs +3 -3
- package/dist/judge/matchs.js +2 -2
- package/dist/name/index.cjs +3 -3
- package/dist/name/index.js +4 -4
- package/dist/node/getPort.js +1 -1
- package/dist/node/index.js +2 -2
- package/dist/tree/index.cjs +11 -2
- package/dist/tree/index.d.cts +1 -0
- package/dist/tree/index.d.ts +1 -0
- package/dist/tree/index.js +10 -1
- package/dist/tree/splitGroup.cjs +12 -0
- package/dist/tree/splitGroup.d.cts +15 -0
- package/dist/tree/splitGroup.d.ts +15 -0
- package/dist/tree/splitGroup.js +12 -0
- package/dist/urls/getReplaceCompleteUrl.cjs +10 -0
- package/dist/urls/getReplaceCompleteUrl.d.cts +9 -0
- package/dist/urls/getReplaceCompleteUrl.d.ts +9 -0
- package/dist/urls/getReplaceCompleteUrl.js +10 -0
- package/dist/urls/getReplaceUrl.cjs +3 -3
- package/dist/urls/getReplaceUrl.js +2 -2
- package/dist/urls/index.cjs +10 -4
- package/dist/urls/index.d.cts +1 -0
- package/dist/urls/index.d.ts +1 -0
- package/dist/urls/index.js +9 -3
- package/package.json +46 -6
- package/dist/chunk-45M6CPWK.cjs +0 -52
- package/dist/chunk-6YI3CDEW.js +0 -35
- package/dist/chunk-AFKJQ4QP.js +0 -35
- package/dist/chunk-JYPJ5QJ5.cjs +0 -35
- package/dist/chunk-T7XQBASK.js +0 -28
- package/dist/chunk-U5TCBGC3.cjs +0 -28
- package/dist/chunk-WMZ6P3AK.cjs +0 -24
- package/dist/chunk-ZJIRJ4YJ.cjs +0 -35
- package/dist/index-BWAB-b69.d.ts +0 -10
- package/dist/index-CIOxFVHu.d.ts +0 -9
- package/dist/index-CVNtXK0N.d.ts +0 -14
- package/dist/index-D-5HNg2W.d.cts +0 -14
- package/dist/index-DBBlm0PZ.d.cts +0 -26
- package/dist/index-DTk8hXm8.d.cts +0 -10
- package/dist/index-DfmnOk56.d.cts +0 -9
- package/dist/index-DjtNMmhM.d.ts +0 -26
- package/dist/{chunk-IVDRKJ33.js → chunk-BFN33JM5.js} +3 -3
- package/dist/{chunk-ZXWKQRGH.cjs → chunk-BG2YS767.cjs} +2 -2
- package/dist/{chunk-NGQKVTCR.cjs → chunk-T22I7TJQ.cjs} +3 -3
- package/dist/{chunk-FRGDQOX4.js → chunk-T2QKEABG.js} +3 -3
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@fangzhongya/utils",
|
|
3
3
|
"private": false,
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.16",
|
|
6
6
|
"description ": "个人工具库",
|
|
7
7
|
"author": "fangzhongya ",
|
|
8
8
|
"license": "MIT",
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"registry": "https://registry.npmjs.org/"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@fangzhongya/create": "0.2.
|
|
22
|
-
"@types/node": "^
|
|
21
|
+
"@fangzhongya/create": "0.2.23",
|
|
22
|
+
"@types/node": "^24.0.15",
|
|
23
23
|
"ts-node": "^10.9.2",
|
|
24
|
-
"tsup": "^8.
|
|
24
|
+
"tsup": "^8.5.0",
|
|
25
25
|
"typescript": "^5.8.3",
|
|
26
|
-
"vite": "^
|
|
27
|
-
"vitest": "^3.
|
|
26
|
+
"vite": "^7.0.5",
|
|
27
|
+
"vitest": "^3.2.4"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"dist"
|
|
@@ -76,6 +76,11 @@
|
|
|
76
76
|
"require": "./dist/basic/array/replaceAfter.cjs",
|
|
77
77
|
"import": "./dist/basic/array/replaceAfter.js"
|
|
78
78
|
},
|
|
79
|
+
"./basic/array/sortObj": {
|
|
80
|
+
"types": "./dist/basic/array/sortObj.d.ts",
|
|
81
|
+
"require": "./dist/basic/array/sortObj.cjs",
|
|
82
|
+
"import": "./dist/basic/array/sortObj.js"
|
|
83
|
+
},
|
|
79
84
|
"./basic/array/toggleArray": {
|
|
80
85
|
"types": "./dist/basic/array/toggleArray.d.ts",
|
|
81
86
|
"require": "./dist/basic/array/toggleArray.cjs",
|
|
@@ -126,6 +131,11 @@
|
|
|
126
131
|
"require": "./dist/basic/object/mergeObject.cjs",
|
|
127
132
|
"import": "./dist/basic/object/mergeObject.js"
|
|
128
133
|
},
|
|
134
|
+
"./basic/object/objValue": {
|
|
135
|
+
"types": "./dist/basic/object/objValue.d.ts",
|
|
136
|
+
"require": "./dist/basic/object/objValue.cjs",
|
|
137
|
+
"import": "./dist/basic/object/objValue.js"
|
|
138
|
+
},
|
|
129
139
|
"./basic/object/reverseObj": {
|
|
130
140
|
"types": "./dist/basic/object/reverseObj.d.ts",
|
|
131
141
|
"require": "./dist/basic/object/reverseObj.cjs",
|
|
@@ -176,11 +186,21 @@
|
|
|
176
186
|
"require": "./dist/basic/string/getStartSames.cjs",
|
|
177
187
|
"import": "./dist/basic/string/getStartSames.js"
|
|
178
188
|
},
|
|
189
|
+
"./basic/string/getStrNunPosit": {
|
|
190
|
+
"types": "./dist/basic/string/getStrNunPosit.d.ts",
|
|
191
|
+
"require": "./dist/basic/string/getStrNunPosit.cjs",
|
|
192
|
+
"import": "./dist/basic/string/getStrNunPosit.js"
|
|
193
|
+
},
|
|
179
194
|
"./basic/string/splitUpper": {
|
|
180
195
|
"types": "./dist/basic/string/splitUpper.d.ts",
|
|
181
196
|
"require": "./dist/basic/string/splitUpper.cjs",
|
|
182
197
|
"import": "./dist/basic/string/splitUpper.js"
|
|
183
198
|
},
|
|
199
|
+
"./basic/string/startsNum": {
|
|
200
|
+
"types": "./dist/basic/string/startsNum.d.ts",
|
|
201
|
+
"require": "./dist/basic/string/startsNum.cjs",
|
|
202
|
+
"import": "./dist/basic/string/startsNum.js"
|
|
203
|
+
},
|
|
184
204
|
"./basic/string/toFunction": {
|
|
185
205
|
"types": "./dist/basic/string/toFunction.d.ts",
|
|
186
206
|
"require": "./dist/basic/string/toFunction.cjs",
|
|
@@ -191,6 +211,11 @@
|
|
|
191
211
|
"require": "./dist/basic/string/toJson.cjs",
|
|
192
212
|
"import": "./dist/basic/string/toJson.js"
|
|
193
213
|
},
|
|
214
|
+
"./basic/string/toJsons": {
|
|
215
|
+
"types": "./dist/basic/string/toJsons.d.ts",
|
|
216
|
+
"require": "./dist/basic/string/toJsons.cjs",
|
|
217
|
+
"import": "./dist/basic/string/toJsons.js"
|
|
218
|
+
},
|
|
194
219
|
"./css": {
|
|
195
220
|
"types": "./dist/css/index.d.ts",
|
|
196
221
|
"require": "./dist/css/index.cjs",
|
|
@@ -291,6 +316,11 @@
|
|
|
291
316
|
"require": "./dist/judge/index.cjs",
|
|
292
317
|
"import": "./dist/judge/index.js"
|
|
293
318
|
},
|
|
319
|
+
"./judge/judge": {
|
|
320
|
+
"types": "./dist/judge/judge.d.ts",
|
|
321
|
+
"require": "./dist/judge/judge.cjs",
|
|
322
|
+
"import": "./dist/judge/judge.js"
|
|
323
|
+
},
|
|
294
324
|
"./judge/matchs": {
|
|
295
325
|
"types": "./dist/judge/matchs.d.ts",
|
|
296
326
|
"require": "./dist/judge/matchs.cjs",
|
|
@@ -386,6 +416,11 @@
|
|
|
386
416
|
"require": "./dist/tree/getTreeObj.cjs",
|
|
387
417
|
"import": "./dist/tree/getTreeObj.js"
|
|
388
418
|
},
|
|
419
|
+
"./tree/splitGroup": {
|
|
420
|
+
"types": "./dist/tree/splitGroup.d.ts",
|
|
421
|
+
"require": "./dist/tree/splitGroup.cjs",
|
|
422
|
+
"import": "./dist/tree/splitGroup.js"
|
|
423
|
+
},
|
|
389
424
|
"./urls": {
|
|
390
425
|
"types": "./dist/urls/index.d.ts",
|
|
391
426
|
"require": "./dist/urls/index.cjs",
|
|
@@ -406,6 +441,11 @@
|
|
|
406
441
|
"require": "./dist/urls/getNewFileName.cjs",
|
|
407
442
|
"import": "./dist/urls/getNewFileName.js"
|
|
408
443
|
},
|
|
444
|
+
"./urls/getReplaceCompleteUrl": {
|
|
445
|
+
"types": "./dist/urls/getReplaceCompleteUrl.d.ts",
|
|
446
|
+
"require": "./dist/urls/getReplaceCompleteUrl.cjs",
|
|
447
|
+
"import": "./dist/urls/getReplaceCompleteUrl.js"
|
|
448
|
+
},
|
|
409
449
|
"./urls/getReplaceImportUrl": {
|
|
410
450
|
"types": "./dist/urls/getReplaceImportUrl.d.ts",
|
|
411
451
|
"require": "./dist/urls/getReplaceImportUrl.cjs",
|
package/dist/chunk-45M6CPWK.cjs
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkJ7S3KBHLcjs = require('./chunk-J7S3KBHL.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunkL7FSHU27cjs = require('./chunk-L7FSHU27.cjs');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _chunkJYPJ5QJ5cjs = require('./chunk-JYPJ5QJ5.cjs');
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var _chunkZJIRJ4YJcjs = require('./chunk-ZJIRJ4YJ.cjs');
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var _chunk3HXQ7TGVcjs = require('./chunk-3HXQ7TGV.cjs');
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var _chunkJR6ZN6QDcjs = require('./chunk-JR6ZN6QD.cjs');
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var _chunkPW7RP73Jcjs = require('./chunk-PW7RP73J.cjs');
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var _chunkUEVMS6QDcjs = require('./chunk-UEVMS6QD.cjs');
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var _chunkOQL4GIEJcjs = require('./chunk-OQL4GIEJ.cjs');
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var _chunk75ZPJI57cjs = require('./chunk-75ZPJI57.cjs');
|
|
33
|
-
|
|
34
|
-
// packages/basic/string/index.ts
|
|
35
|
-
var string_exports = {};
|
|
36
|
-
_chunk75ZPJI57cjs.__export.call(void 0, string_exports, {
|
|
37
|
-
appearNum: () => _chunk3HXQ7TGVcjs.appearNum,
|
|
38
|
-
appearNumSeat: () => _chunkJR6ZN6QDcjs.appearNumSeat,
|
|
39
|
-
firstLower: () => _chunkUEVMS6QDcjs.firstLower,
|
|
40
|
-
firstUpper: () => _chunkOQL4GIEJcjs.firstUpper,
|
|
41
|
-
getFunctionFormat: () => _chunkZJIRJ4YJcjs.getFunctionFormat,
|
|
42
|
-
getStartSame: () => _chunkJ7S3KBHLcjs.getStartSame,
|
|
43
|
-
getStartSames: () => _chunkPW7RP73Jcjs.getStartSames,
|
|
44
|
-
splitUpper: () => _chunkL7FSHU27cjs.splitUpper,
|
|
45
|
-
toFunction: () => _chunkZJIRJ4YJcjs.toFunction,
|
|
46
|
-
toJSONParse: () => _chunkJYPJ5QJ5cjs.toJSONParse,
|
|
47
|
-
toJSONStringify: () => _chunkJYPJ5QJ5cjs.toJSONStringify
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
exports.string_exports = string_exports;
|
package/dist/chunk-6YI3CDEW.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// packages/basic/string/toFunction.ts
|
|
2
|
-
function toFunction(str) {
|
|
3
|
-
const obj = getFunctionFormat(str);
|
|
4
|
-
if (obj && obj.body) {
|
|
5
|
-
const param = (obj.param || "").split(",").map((o) => o.trim()).filter((v) => v);
|
|
6
|
-
return new Function(...param, obj.body);
|
|
7
|
-
} else {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
function getFunctionFormat(v) {
|
|
12
|
-
if (v) {
|
|
13
|
-
let st = v.toString();
|
|
14
|
-
st = st.trim();
|
|
15
|
-
let name = "([a-z|A-Z|_|$][a-z|A-Z|_|$|0-9]*)?";
|
|
16
|
-
let fun = "((function)?\\s*" + name + "\\s*)?";
|
|
17
|
-
let param = "(\\(([^\\(|\\)]*)\\)\\s*)?";
|
|
18
|
-
let body = "[\\s|\\n|\\r]*\\{((.|\n|\r)+?)\\}[\\s|\\n|\\r]*";
|
|
19
|
-
let reg = new RegExp("^" + fun + param + body + "$");
|
|
20
|
-
let vts = reg.exec(st);
|
|
21
|
-
if (vts && vts.length > 0) {
|
|
22
|
-
return {
|
|
23
|
-
name: vts[3],
|
|
24
|
-
param: vts[5],
|
|
25
|
-
body: vts[6]
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export {
|
|
33
|
-
toFunction,
|
|
34
|
-
getFunctionFormat
|
|
35
|
-
};
|
package/dist/chunk-AFKJQ4QP.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
toFunction
|
|
3
|
-
} from "./chunk-6YI3CDEW.js";
|
|
4
|
-
|
|
5
|
-
// packages/basic/string/toJson.ts
|
|
6
|
-
function toJSONStringify(obj, jb) {
|
|
7
|
-
return JSON.stringify(
|
|
8
|
-
obj,
|
|
9
|
-
function(_k, v) {
|
|
10
|
-
if (typeof v === "function") {
|
|
11
|
-
return "+Fun|" + v.toString().trim();
|
|
12
|
-
} else {
|
|
13
|
-
return v;
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
jb
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
function toJSONParse(str) {
|
|
20
|
-
return JSON.parse(str, function(_k, v) {
|
|
21
|
-
if (typeof v === "string") {
|
|
22
|
-
if (/^\+Fun\|(.|\n|\r)+?\}$/g.test(v)) {
|
|
23
|
-
return toFunction(v.replace(/^\+Fun\|/, "")) || v;
|
|
24
|
-
} else {
|
|
25
|
-
return v;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return v;
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export {
|
|
33
|
-
toJSONStringify,
|
|
34
|
-
toJSONParse
|
|
35
|
-
};
|
package/dist/chunk-JYPJ5QJ5.cjs
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkZJIRJ4YJcjs = require('./chunk-ZJIRJ4YJ.cjs');
|
|
4
|
-
|
|
5
|
-
// packages/basic/string/toJson.ts
|
|
6
|
-
function toJSONStringify(obj, jb) {
|
|
7
|
-
return JSON.stringify(
|
|
8
|
-
obj,
|
|
9
|
-
function(_k, v) {
|
|
10
|
-
if (typeof v === "function") {
|
|
11
|
-
return "+Fun|" + v.toString().trim();
|
|
12
|
-
} else {
|
|
13
|
-
return v;
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
jb
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
function toJSONParse(str) {
|
|
20
|
-
return JSON.parse(str, function(_k, v) {
|
|
21
|
-
if (typeof v === "string") {
|
|
22
|
-
if (/^\+Fun\|(.|\n|\r)+?\}$/g.test(v)) {
|
|
23
|
-
return _chunkZJIRJ4YJcjs.toFunction.call(void 0, v.replace(/^\+Fun\|/, "")) || v;
|
|
24
|
-
} else {
|
|
25
|
-
return v;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return v;
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
exports.toJSONStringify = toJSONStringify; exports.toJSONParse = toJSONParse;
|
package/dist/chunk-T7XQBASK.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
matchs
|
|
3
|
-
} from "./chunk-FRGDQOX4.js";
|
|
4
|
-
import {
|
|
5
|
-
matchsStart
|
|
6
|
-
} from "./chunk-S6JRKYPY.js";
|
|
7
|
-
import {
|
|
8
|
-
matchsWhole
|
|
9
|
-
} from "./chunk-IRGCP7KH.js";
|
|
10
|
-
import {
|
|
11
|
-
matchsEnd
|
|
12
|
-
} from "./chunk-YNOFNHEK.js";
|
|
13
|
-
import {
|
|
14
|
-
__export
|
|
15
|
-
} from "./chunk-MLKGABMK.js";
|
|
16
|
-
|
|
17
|
-
// packages/judge/index.ts
|
|
18
|
-
var judge_exports = {};
|
|
19
|
-
__export(judge_exports, {
|
|
20
|
-
matchs: () => matchs,
|
|
21
|
-
matchsEnd: () => matchsEnd,
|
|
22
|
-
matchsStart: () => matchsStart,
|
|
23
|
-
matchsWhole: () => matchsWhole
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export {
|
|
27
|
-
judge_exports
|
|
28
|
-
};
|
package/dist/chunk-U5TCBGC3.cjs
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkNGQKVTCRcjs = require('./chunk-NGQKVTCR.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunkZZEFL2TEcjs = require('./chunk-ZZEFL2TE.cjs');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _chunk2BY5RQHUcjs = require('./chunk-2BY5RQHU.cjs');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _chunkYGJOBIEOcjs = require('./chunk-YGJOBIEO.cjs');
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var _chunk75ZPJI57cjs = require('./chunk-75ZPJI57.cjs');
|
|
16
|
-
|
|
17
|
-
// packages/judge/index.ts
|
|
18
|
-
var judge_exports = {};
|
|
19
|
-
_chunk75ZPJI57cjs.__export.call(void 0, judge_exports, {
|
|
20
|
-
matchs: () => _chunkNGQKVTCRcjs.matchs,
|
|
21
|
-
matchsEnd: () => _chunkYGJOBIEOcjs.matchsEnd,
|
|
22
|
-
matchsStart: () => _chunkZZEFL2TEcjs.matchsStart,
|
|
23
|
-
matchsWhole: () => _chunk2BY5RQHUcjs.matchsWhole
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
exports.judge_exports = judge_exports;
|
package/dist/chunk-WMZ6P3AK.cjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkSLRWY5FHcjs = require('./chunk-SLRWY5FH.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunk45M6CPWKcjs = require('./chunk-45M6CPWK.cjs');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _chunkVQKOHGV5cjs = require('./chunk-VQKOHGV5.cjs');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _chunk75ZPJI57cjs = require('./chunk-75ZPJI57.cjs');
|
|
13
|
-
|
|
14
|
-
// packages/basic/index.ts
|
|
15
|
-
var basic_exports = {};
|
|
16
|
-
_chunk75ZPJI57cjs.__export.call(void 0, basic_exports, {
|
|
17
|
-
array: () => _chunkVQKOHGV5cjs.array_exports,
|
|
18
|
-
object: () => _chunkSLRWY5FHcjs.object_exports,
|
|
19
|
-
string: () => _chunk45M6CPWKcjs.string_exports
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
exports.basic_exports = basic_exports;
|
package/dist/chunk-ZJIRJ4YJ.cjs
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/string/toFunction.ts
|
|
2
|
-
function toFunction(str) {
|
|
3
|
-
const obj = getFunctionFormat(str);
|
|
4
|
-
if (obj && obj.body) {
|
|
5
|
-
const param = (obj.param || "").split(",").map((o) => o.trim()).filter((v) => v);
|
|
6
|
-
return new Function(...param, obj.body);
|
|
7
|
-
} else {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
function getFunctionFormat(v) {
|
|
12
|
-
if (v) {
|
|
13
|
-
let st = v.toString();
|
|
14
|
-
st = st.trim();
|
|
15
|
-
let name = "([a-z|A-Z|_|$][a-z|A-Z|_|$|0-9]*)?";
|
|
16
|
-
let fun = "((function)?\\s*" + name + "\\s*)?";
|
|
17
|
-
let param = "(\\(([^\\(|\\)]*)\\)\\s*)?";
|
|
18
|
-
let body = "[\\s|\\n|\\r]*\\{((.|\n|\r)+?)\\}[\\s|\\n|\\r]*";
|
|
19
|
-
let reg = new RegExp("^" + fun + param + body + "$");
|
|
20
|
-
let vts = reg.exec(st);
|
|
21
|
-
if (vts && vts.length > 0) {
|
|
22
|
-
return {
|
|
23
|
-
name: vts[3],
|
|
24
|
-
param: vts[5],
|
|
25
|
-
body: vts[6]
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
exports.toFunction = toFunction; exports.getFunctionFormat = getFunctionFormat;
|
package/dist/index-BWAB-b69.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { arrayToTree, getTreeObj, treeToArray } from './tree/getTreeObj.js';
|
|
2
|
-
|
|
3
|
-
declare const index_arrayToTree: typeof arrayToTree;
|
|
4
|
-
declare const index_getTreeObj: typeof getTreeObj;
|
|
5
|
-
declare const index_treeToArray: typeof treeToArray;
|
|
6
|
-
declare namespace index {
|
|
7
|
-
export { index_arrayToTree as arrayToTree, index_getTreeObj as getTreeObj, index_treeToArray as treeToArray };
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { index as i };
|
package/dist/index-CIOxFVHu.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { i as index$1 } from './index-D92-6As_.js';
|
|
2
|
-
import { i as index$2 } from './index-CsP95PJy.js';
|
|
3
|
-
import { i as index$3 } from './index-DjtNMmhM.js';
|
|
4
|
-
|
|
5
|
-
declare namespace index {
|
|
6
|
-
export { index$1 as array, index$2 as object, index$3 as string };
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export { index as i };
|
package/dist/index-CVNtXK0N.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { matchs } from './judge/matchs.js';
|
|
2
|
-
import { matchsEnd } from './judge/matchsEnd.js';
|
|
3
|
-
import { matchsStart } from './judge/matchsStart.js';
|
|
4
|
-
import { matchsWhole } from './judge/matchsWhole.js';
|
|
5
|
-
|
|
6
|
-
declare const index_matchs: typeof matchs;
|
|
7
|
-
declare const index_matchsEnd: typeof matchsEnd;
|
|
8
|
-
declare const index_matchsStart: typeof matchsStart;
|
|
9
|
-
declare const index_matchsWhole: typeof matchsWhole;
|
|
10
|
-
declare namespace index {
|
|
11
|
-
export { index_matchs as matchs, index_matchsEnd as matchsEnd, index_matchsStart as matchsStart, index_matchsWhole as matchsWhole };
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export { index as i };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { matchs } from './judge/matchs.cjs';
|
|
2
|
-
import { matchsEnd } from './judge/matchsEnd.cjs';
|
|
3
|
-
import { matchsStart } from './judge/matchsStart.cjs';
|
|
4
|
-
import { matchsWhole } from './judge/matchsWhole.cjs';
|
|
5
|
-
|
|
6
|
-
declare const index_matchs: typeof matchs;
|
|
7
|
-
declare const index_matchsEnd: typeof matchsEnd;
|
|
8
|
-
declare const index_matchsStart: typeof matchsStart;
|
|
9
|
-
declare const index_matchsWhole: typeof matchsWhole;
|
|
10
|
-
declare namespace index {
|
|
11
|
-
export { index_matchs as matchs, index_matchsEnd as matchsEnd, index_matchsStart as matchsStart, index_matchsWhole as matchsWhole };
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export { index as i };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { appearNum } from './basic/string/appearNum.cjs';
|
|
2
|
-
import { appearNumSeat } from './basic/string/appearNumSeat.cjs';
|
|
3
|
-
import { firstLower } from './basic/string/firstLower.cjs';
|
|
4
|
-
import { firstUpper } from './basic/string/firstUpper.cjs';
|
|
5
|
-
import { getStartSame } from './basic/string/getStartSame.cjs';
|
|
6
|
-
import { getStartSames } from './basic/string/getStartSames.cjs';
|
|
7
|
-
import { splitUpper } from './basic/string/splitUpper.cjs';
|
|
8
|
-
import { getFunctionFormat, toFunction } from './basic/string/toFunction.cjs';
|
|
9
|
-
import { toJSONParse, toJSONStringify } from './basic/string/toJson.cjs';
|
|
10
|
-
|
|
11
|
-
declare const index_appearNum: typeof appearNum;
|
|
12
|
-
declare const index_appearNumSeat: typeof appearNumSeat;
|
|
13
|
-
declare const index_firstLower: typeof firstLower;
|
|
14
|
-
declare const index_firstUpper: typeof firstUpper;
|
|
15
|
-
declare const index_getFunctionFormat: typeof getFunctionFormat;
|
|
16
|
-
declare const index_getStartSame: typeof getStartSame;
|
|
17
|
-
declare const index_getStartSames: typeof getStartSames;
|
|
18
|
-
declare const index_splitUpper: typeof splitUpper;
|
|
19
|
-
declare const index_toFunction: typeof toFunction;
|
|
20
|
-
declare const index_toJSONParse: typeof toJSONParse;
|
|
21
|
-
declare const index_toJSONStringify: typeof toJSONStringify;
|
|
22
|
-
declare namespace index {
|
|
23
|
-
export { index_appearNum as appearNum, index_appearNumSeat as appearNumSeat, index_firstLower as firstLower, index_firstUpper as firstUpper, index_getFunctionFormat as getFunctionFormat, index_getStartSame as getStartSame, index_getStartSames as getStartSames, index_splitUpper as splitUpper, index_toFunction as toFunction, index_toJSONParse as toJSONParse, index_toJSONStringify as toJSONStringify };
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { index as i };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { arrayToTree, getTreeObj, treeToArray } from './tree/getTreeObj.cjs';
|
|
2
|
-
|
|
3
|
-
declare const index_arrayToTree: typeof arrayToTree;
|
|
4
|
-
declare const index_getTreeObj: typeof getTreeObj;
|
|
5
|
-
declare const index_treeToArray: typeof treeToArray;
|
|
6
|
-
declare namespace index {
|
|
7
|
-
export { index_arrayToTree as arrayToTree, index_getTreeObj as getTreeObj, index_treeToArray as treeToArray };
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { index as i };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { i as index$1 } from './index-BrxHOuw0.cjs';
|
|
2
|
-
import { i as index$2 } from './index-EY4Ag8_f.cjs';
|
|
3
|
-
import { i as index$3 } from './index-DBBlm0PZ.cjs';
|
|
4
|
-
|
|
5
|
-
declare namespace index {
|
|
6
|
-
export { index$1 as array, index$2 as object, index$3 as string };
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export { index as i };
|
package/dist/index-DjtNMmhM.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { appearNum } from './basic/string/appearNum.js';
|
|
2
|
-
import { appearNumSeat } from './basic/string/appearNumSeat.js';
|
|
3
|
-
import { firstLower } from './basic/string/firstLower.js';
|
|
4
|
-
import { firstUpper } from './basic/string/firstUpper.js';
|
|
5
|
-
import { getStartSame } from './basic/string/getStartSame.js';
|
|
6
|
-
import { getStartSames } from './basic/string/getStartSames.js';
|
|
7
|
-
import { splitUpper } from './basic/string/splitUpper.js';
|
|
8
|
-
import { getFunctionFormat, toFunction } from './basic/string/toFunction.js';
|
|
9
|
-
import { toJSONParse, toJSONStringify } from './basic/string/toJson.js';
|
|
10
|
-
|
|
11
|
-
declare const index_appearNum: typeof appearNum;
|
|
12
|
-
declare const index_appearNumSeat: typeof appearNumSeat;
|
|
13
|
-
declare const index_firstLower: typeof firstLower;
|
|
14
|
-
declare const index_firstUpper: typeof firstUpper;
|
|
15
|
-
declare const index_getFunctionFormat: typeof getFunctionFormat;
|
|
16
|
-
declare const index_getStartSame: typeof getStartSame;
|
|
17
|
-
declare const index_getStartSames: typeof getStartSames;
|
|
18
|
-
declare const index_splitUpper: typeof splitUpper;
|
|
19
|
-
declare const index_toFunction: typeof toFunction;
|
|
20
|
-
declare const index_toJSONParse: typeof toJSONParse;
|
|
21
|
-
declare const index_toJSONStringify: typeof toJSONStringify;
|
|
22
|
-
declare namespace index {
|
|
23
|
-
export { index_appearNum as appearNum, index_appearNumSeat as appearNumSeat, index_firstLower as firstLower, index_firstUpper as firstUpper, index_getFunctionFormat as getFunctionFormat, index_getStartSame as getStartSame, index_getStartSames as getStartSames, index_splitUpper as splitUpper, index_toFunction as toFunction, index_toJSONParse as toJSONParse, index_toJSONStringify as toJSONStringify };
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { index as i };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkKRBTSMT2cjs = require('./chunk-KRBTSMT2.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkO6P3QI3Bcjs = require('./chunk-O6P3QI3B.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkXHR36FJKcjs = require('./chunk-XHR36FJK.cjs');
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkYGJOBIEOcjs = require('./chunk-YGJOBIEO.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkZZEFL2TEcjs = require('./chunk-ZZEFL2TE.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk2BY5RQHUcjs = require('./chunk-2BY5RQHU.cjs');
|
|
10
10
|
|
|
11
11
|
// packages/judge/matchs.ts
|
|
12
12
|
function matchs(key, matchs2, type) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
matchsEnd
|
|
3
|
+
} from "./chunk-YNOFNHEK.js";
|
|
1
4
|
import {
|
|
2
5
|
matchsStart
|
|
3
6
|
} from "./chunk-S6JRKYPY.js";
|
|
4
7
|
import {
|
|
5
8
|
matchsWhole
|
|
6
9
|
} from "./chunk-IRGCP7KH.js";
|
|
7
|
-
import {
|
|
8
|
-
matchsEnd
|
|
9
|
-
} from "./chunk-YNOFNHEK.js";
|
|
10
10
|
|
|
11
11
|
// packages/judge/matchs.ts
|
|
12
12
|
function matchs(key, matchs2, type) {
|