@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.
Files changed (158) hide show
  1. package/README.md +5 -1
  2. package/dist/basic/array/index.cjs +11 -7
  3. package/dist/basic/array/index.d.cts +1 -0
  4. package/dist/basic/array/index.d.ts +1 -0
  5. package/dist/basic/array/index.js +11 -7
  6. package/dist/basic/array/sortObj.cjs +7 -0
  7. package/dist/basic/array/sortObj.d.cts +10 -0
  8. package/dist/basic/array/sortObj.d.ts +10 -0
  9. package/dist/basic/array/sortObj.js +7 -0
  10. package/dist/basic/index.cjs +22 -17
  11. package/dist/basic/index.d.cts +8 -3
  12. package/dist/basic/index.d.ts +8 -3
  13. package/dist/basic/index.js +21 -16
  14. package/dist/basic/object/index.cjs +14 -8
  15. package/dist/basic/object/index.d.cts +1 -0
  16. package/dist/basic/object/index.d.ts +1 -0
  17. package/dist/basic/object/index.js +13 -7
  18. package/dist/basic/object/objValue.cjs +9 -0
  19. package/dist/basic/object/objValue.d.cts +7 -0
  20. package/dist/basic/object/objValue.d.ts +7 -0
  21. package/dist/basic/object/objValue.js +9 -0
  22. package/dist/basic/string/appearNum.cjs +2 -2
  23. package/dist/basic/string/appearNum.js +1 -1
  24. package/dist/basic/string/getStrNunPosit.cjs +7 -0
  25. package/dist/basic/string/getStrNunPosit.d.cts +10 -0
  26. package/dist/basic/string/getStrNunPosit.d.ts +10 -0
  27. package/dist/basic/string/getStrNunPosit.js +7 -0
  28. package/dist/basic/string/index.cjs +26 -7
  29. package/dist/basic/string/index.d.cts +3 -0
  30. package/dist/basic/string/index.d.ts +3 -0
  31. package/dist/basic/string/index.js +29 -10
  32. package/dist/basic/string/startsNum.cjs +7 -0
  33. package/dist/basic/string/startsNum.d.cts +9 -0
  34. package/dist/basic/string/startsNum.d.ts +9 -0
  35. package/dist/basic/string/startsNum.js +7 -0
  36. package/dist/basic/string/toFunction.cjs +2 -2
  37. package/dist/basic/string/toFunction.d.cts +15 -7
  38. package/dist/basic/string/toFunction.d.ts +15 -7
  39. package/dist/basic/string/toFunction.js +1 -1
  40. package/dist/basic/string/toJson.cjs +3 -3
  41. package/dist/basic/string/toJson.d.cts +2 -5
  42. package/dist/basic/string/toJson.d.ts +2 -5
  43. package/dist/basic/string/toJson.js +2 -2
  44. package/dist/basic/string/toJsons.cjs +15 -0
  45. package/dist/basic/string/toJsons.d.cts +60 -0
  46. package/dist/basic/string/toJsons.d.ts +60 -0
  47. package/dist/basic/string/toJsons.js +15 -0
  48. package/dist/chunk-2H3KVSFA.cjs +16 -0
  49. package/dist/{chunk-LZ7JIJ4I.cjs → chunk-2J3S75C6.cjs} +6 -2
  50. package/dist/{chunk-6RIGEV6G.cjs → chunk-3DD7YCN2.cjs} +2 -2
  51. package/dist/chunk-3NBXSBFM.js +29 -0
  52. package/dist/{chunk-VQKOHGV5.cjs → chunk-4BGJIMWM.cjs} +9 -5
  53. package/dist/chunk-5HC662VK.js +432 -0
  54. package/dist/chunk-754Z5VW6.js +29 -0
  55. package/dist/chunk-7O4MJOHM.js +142 -0
  56. package/dist/{chunk-X4WTO4NR.js → chunk-CMBQ66JH.js} +5 -1
  57. package/dist/chunk-E4WBX6J5.cjs +29 -0
  58. package/dist/chunk-ETMYYVQJ.cjs +432 -0
  59. package/dist/{chunk-R5TH6GQE.js → chunk-FSIQKHKH.js} +5 -5
  60. package/dist/{chunk-QJVB3JIZ.js → chunk-HWR2FRME.js} +1 -1
  61. package/dist/{chunk-JJLYV6GY.js → chunk-IEQHKLEL.js} +12 -6
  62. package/dist/chunk-ILJLXJ5O.cjs +15 -0
  63. package/dist/chunk-JHV27P2Q.cjs +54 -0
  64. package/dist/{chunk-SNABGVNO.js → chunk-LPMR5W6M.js} +1 -1
  65. package/dist/{chunk-2KT66KQH.js → chunk-LU22MUUS.js} +10 -6
  66. package/dist/chunk-NESVPZNF.cjs +29 -0
  67. package/dist/chunk-O34QAOO7.js +16 -0
  68. package/dist/{chunk-3HXQ7TGV.cjs → chunk-OJBZ7UUC.cjs} +1 -1
  69. package/dist/{chunk-YHLI3SF7.js → chunk-OVHYLUAS.js} +8 -0
  70. package/dist/chunk-P7AWHISY.js +15 -0
  71. package/dist/chunk-PLNZCEDI.js +442 -0
  72. package/dist/chunk-PSHKOVLY.cjs +24 -0
  73. package/dist/{chunk-V5HVA7TW.cjs → chunk-PV2N6PF2.cjs} +8 -0
  74. package/dist/chunk-QXK4IUBI.cjs +142 -0
  75. package/dist/chunk-RYBJGHXK.cjs +153 -0
  76. package/dist/{chunk-ZRZ5HATA.js → chunk-SE7A43WC.js} +1 -1
  77. package/dist/chunk-U3PZBQ6G.js +54 -0
  78. package/dist/{chunk-SLRWY5FH.cjs → chunk-UGT4QBTM.cjs} +12 -6
  79. package/dist/chunk-UHKL2RG3.cjs +80 -0
  80. package/dist/chunk-USIMBBLW.js +16 -0
  81. package/dist/{chunk-FCCQIHFD.js → chunk-UZ3LZBJ5.js} +1 -1
  82. package/dist/chunk-V2DXOH6B.cjs +442 -0
  83. package/dist/chunk-VJUGYXBC.cjs +70 -0
  84. package/dist/chunk-XQOH3NGZ.js +153 -0
  85. package/dist/chunk-XW3XIK3D.cjs +16 -0
  86. package/dist/chunk-YKNGDK4I.js +80 -0
  87. package/dist/{chunk-GIJMEVTJ.js → chunk-ZEMAXGD5.js} +27 -9
  88. package/dist/index-20jIrGxr.d.ts +36 -0
  89. package/dist/index-B7gdHwF9.d.cts +40 -0
  90. package/dist/{index-EY4Ag8_f.d.cts → index-BU0xla6v.d.cts} +4 -1
  91. package/dist/{index-D92-6As_.d.ts → index-C29DFVeC.d.ts} +3 -1
  92. package/dist/index-C6CeIuau.d.cts +36 -0
  93. package/dist/index-CPO1AFVg.d.ts +14 -0
  94. package/dist/{index-Dm5gvjpr.d.cts → index-C__Goqn1.d.cts} +3 -1
  95. package/dist/index-D1WceQZE.d.ts +9 -0
  96. package/dist/{index-CsP95PJy.d.ts → index-DOq59RNr.d.ts} +4 -1
  97. package/dist/index-DPrdy8Ms.d.ts +40 -0
  98. package/dist/{index-D-JJ6qt2.d.ts → index-IJlghj8j.d.ts} +3 -1
  99. package/dist/index-cuR7l2XV.d.cts +14 -0
  100. package/dist/index-haAz3CpA.d.cts +9 -0
  101. package/dist/{index-BrxHOuw0.d.cts → index-qUiGxoy_.d.cts} +3 -1
  102. package/dist/index.cjs +45 -37
  103. package/dist/index.d.cts +15 -7
  104. package/dist/index.d.ts +15 -7
  105. package/dist/index.js +48 -40
  106. package/dist/judge/index.cjs +57 -5
  107. package/dist/judge/index.d.cts +1 -0
  108. package/dist/judge/index.d.ts +1 -0
  109. package/dist/judge/index.js +57 -5
  110. package/dist/judge/judge.cjs +55 -0
  111. package/dist/judge/judge.d.cts +155 -0
  112. package/dist/judge/judge.d.ts +155 -0
  113. package/dist/judge/judge.js +55 -0
  114. package/dist/judge/matchs.cjs +3 -3
  115. package/dist/judge/matchs.js +2 -2
  116. package/dist/name/index.cjs +3 -3
  117. package/dist/name/index.js +4 -4
  118. package/dist/node/getPort.js +1 -1
  119. package/dist/node/index.js +2 -2
  120. package/dist/tree/index.cjs +11 -2
  121. package/dist/tree/index.d.cts +1 -0
  122. package/dist/tree/index.d.ts +1 -0
  123. package/dist/tree/index.js +10 -1
  124. package/dist/tree/splitGroup.cjs +12 -0
  125. package/dist/tree/splitGroup.d.cts +15 -0
  126. package/dist/tree/splitGroup.d.ts +15 -0
  127. package/dist/tree/splitGroup.js +12 -0
  128. package/dist/urls/getReplaceCompleteUrl.cjs +10 -0
  129. package/dist/urls/getReplaceCompleteUrl.d.cts +9 -0
  130. package/dist/urls/getReplaceCompleteUrl.d.ts +9 -0
  131. package/dist/urls/getReplaceCompleteUrl.js +10 -0
  132. package/dist/urls/getReplaceUrl.cjs +3 -3
  133. package/dist/urls/getReplaceUrl.js +2 -2
  134. package/dist/urls/index.cjs +10 -4
  135. package/dist/urls/index.d.cts +1 -0
  136. package/dist/urls/index.d.ts +1 -0
  137. package/dist/urls/index.js +9 -3
  138. package/package.json +46 -6
  139. package/dist/chunk-45M6CPWK.cjs +0 -52
  140. package/dist/chunk-6YI3CDEW.js +0 -35
  141. package/dist/chunk-AFKJQ4QP.js +0 -35
  142. package/dist/chunk-JYPJ5QJ5.cjs +0 -35
  143. package/dist/chunk-T7XQBASK.js +0 -28
  144. package/dist/chunk-U5TCBGC3.cjs +0 -28
  145. package/dist/chunk-WMZ6P3AK.cjs +0 -24
  146. package/dist/chunk-ZJIRJ4YJ.cjs +0 -35
  147. package/dist/index-BWAB-b69.d.ts +0 -10
  148. package/dist/index-CIOxFVHu.d.ts +0 -9
  149. package/dist/index-CVNtXK0N.d.ts +0 -14
  150. package/dist/index-D-5HNg2W.d.cts +0 -14
  151. package/dist/index-DBBlm0PZ.d.cts +0 -26
  152. package/dist/index-DTk8hXm8.d.cts +0 -10
  153. package/dist/index-DfmnOk56.d.cts +0 -9
  154. package/dist/index-DjtNMmhM.d.ts +0 -26
  155. package/dist/{chunk-IVDRKJ33.js → chunk-BFN33JM5.js} +3 -3
  156. package/dist/{chunk-ZXWKQRGH.cjs → chunk-BG2YS767.cjs} +2 -2
  157. package/dist/{chunk-NGQKVTCR.cjs → chunk-T22I7TJQ.cjs} +3 -3
  158. package/dist/{chunk-FRGDQOX4.js → chunk-T2QKEABG.js} +3 -3
@@ -1,24 +1,37 @@
1
- import "../../chunk-GIJMEVTJ.js";
2
- import {
3
- getStartSame
4
- } from "../../chunk-7DTHADVK.js";
5
- import {
6
- splitUpper
7
- } from "../../chunk-VKE5JARB.js";
1
+ import "../../chunk-ZEMAXGD5.js";
8
2
  import {
9
3
  toJSONParse,
10
4
  toJSONStringify
11
- } from "../../chunk-AFKJQ4QP.js";
5
+ } from "../../chunk-U3PZBQ6G.js";
6
+ import {
7
+ serializeCodeBlock,
8
+ serializeFunctionRef,
9
+ toJSONSParse,
10
+ toJSONSStringify
11
+ } from "../../chunk-5HC662VK.js";
12
12
  import {
13
13
  getFunctionFormat,
14
14
  toFunction
15
- } from "../../chunk-6YI3CDEW.js";
15
+ } from "../../chunk-7O4MJOHM.js";
16
+ import {
17
+ getStartSame
18
+ } from "../../chunk-7DTHADVK.js";
19
+ import {
20
+ splitUpper
21
+ } from "../../chunk-VKE5JARB.js";
22
+ import "../../chunk-754Z5VW6.js";
16
23
  import {
17
24
  appearNum
18
- } from "../../chunk-SNABGVNO.js";
25
+ } from "../../chunk-LPMR5W6M.js";
19
26
  import {
20
27
  appearNumSeat
21
28
  } from "../../chunk-DMZP4RPN.js";
29
+ import {
30
+ getStrNunPosit
31
+ } from "../../chunk-USIMBBLW.js";
32
+ import {
33
+ startsNum
34
+ } from "../../chunk-P7AWHISY.js";
22
35
  import {
23
36
  getStartSames
24
37
  } from "../../chunk-A276ZDLP.js";
@@ -37,8 +50,14 @@ export {
37
50
  getFunctionFormat,
38
51
  getStartSame,
39
52
  getStartSames,
53
+ getStrNunPosit,
54
+ serializeCodeBlock,
55
+ serializeFunctionRef,
40
56
  splitUpper,
57
+ startsNum,
41
58
  toFunction,
42
59
  toJSONParse,
60
+ toJSONSParse,
61
+ toJSONSStringify,
43
62
  toJSONStringify
44
63
  };
@@ -0,0 +1,7 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkILJLXJ5Ocjs = require('../../chunk-ILJLXJ5O.cjs');
4
+ require('../../chunk-75ZPJI57.cjs');
5
+
6
+
7
+ exports.startsNum = _chunkILJLXJ5Ocjs.startsNum;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 字符串在头部出现次数
3
+ * @param str
4
+ * @param substring
5
+ * @returns
6
+ */
7
+ declare function startsNum(str: string, substring: string): number;
8
+
9
+ export { startsNum };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 字符串在头部出现次数
3
+ * @param str
4
+ * @param substring
5
+ * @returns
6
+ */
7
+ declare function startsNum(str: string, substring: string): number;
8
+
9
+ export { startsNum };
@@ -0,0 +1,7 @@
1
+ import {
2
+ startsNum
3
+ } from "../../chunk-P7AWHISY.js";
4
+ import "../../chunk-MLKGABMK.js";
5
+ export {
6
+ startsNum
7
+ };
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkZJIRJ4YJcjs = require('../../chunk-ZJIRJ4YJ.cjs');
4
+ var _chunkQXK4IUBIcjs = require('../../chunk-QXK4IUBI.cjs');
5
5
  require('../../chunk-75ZPJI57.cjs');
6
6
 
7
7
 
8
8
 
9
- exports.getFunctionFormat = _chunkZJIRJ4YJcjs.getFunctionFormat; exports.toFunction = _chunkZJIRJ4YJcjs.toFunction;
9
+ exports.getFunctionFormat = _chunkQXK4IUBIcjs.getFunctionFormat; exports.toFunction = _chunkQXK4IUBIcjs.toFunction;
@@ -1,11 +1,19 @@
1
- /**
2
- * 把字符串方法转成方法
3
- */
4
- declare function toFunction(str: string): Function | undefined;
5
- declare function getFunctionFormat(v: Function | string): {
6
- name: string;
1
+ interface FunctionFormat {
2
+ isAsync: boolean;
3
+ isGenerator: boolean;
4
+ name?: string;
7
5
  param: string;
8
6
  body: string;
9
- } | undefined;
7
+ }
8
+ /**
9
+ * 将函数字符串转换为可执行函数(支持异步函数)
10
+ */
11
+ declare function toFunction(str: string, key?: string): Function | undefined;
12
+ /**
13
+ * 解析函数字符串格式(合并正则表达式优化性能)
14
+ * @param v - 输入的函数或字符串
15
+ * @returns 解析后的函数结构对象,失败返回null
16
+ */
17
+ declare function getFunctionFormat(v: Function | string): FunctionFormat | undefined;
10
18
 
11
19
  export { getFunctionFormat, toFunction };
@@ -1,11 +1,19 @@
1
- /**
2
- * 把字符串方法转成方法
3
- */
4
- declare function toFunction(str: string): Function | undefined;
5
- declare function getFunctionFormat(v: Function | string): {
6
- name: string;
1
+ interface FunctionFormat {
2
+ isAsync: boolean;
3
+ isGenerator: boolean;
4
+ name?: string;
7
5
  param: string;
8
6
  body: string;
9
- } | undefined;
7
+ }
8
+ /**
9
+ * 将函数字符串转换为可执行函数(支持异步函数)
10
+ */
11
+ declare function toFunction(str: string, key?: string): Function | undefined;
12
+ /**
13
+ * 解析函数字符串格式(合并正则表达式优化性能)
14
+ * @param v - 输入的函数或字符串
15
+ * @returns 解析后的函数结构对象,失败返回null
16
+ */
17
+ declare function getFunctionFormat(v: Function | string): FunctionFormat | undefined;
10
18
 
11
19
  export { getFunctionFormat, toFunction };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getFunctionFormat,
3
3
  toFunction
4
- } from "../../chunk-6YI3CDEW.js";
4
+ } from "../../chunk-7O4MJOHM.js";
5
5
  import "../../chunk-MLKGABMK.js";
6
6
  export {
7
7
  getFunctionFormat,
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkJYPJ5QJ5cjs = require('../../chunk-JYPJ5QJ5.cjs');
5
- require('../../chunk-ZJIRJ4YJ.cjs');
4
+ var _chunkJHV27P2Qcjs = require('../../chunk-JHV27P2Q.cjs');
5
+ require('../../chunk-QXK4IUBI.cjs');
6
6
  require('../../chunk-75ZPJI57.cjs');
7
7
 
8
8
 
9
9
 
10
- exports.toJSONParse = _chunkJYPJ5QJ5cjs.toJSONParse; exports.toJSONStringify = _chunkJYPJ5QJ5cjs.toJSONStringify;
10
+ exports.toJSONParse = _chunkJHV27P2Qcjs.toJSONParse; exports.toJSONStringify = _chunkJHV27P2Qcjs.toJSONStringify;
@@ -1,7 +1,4 @@
1
- /**
2
- * 转换对象,把对象转字符串支持函数
3
- */
4
- declare function toJSONStringify(obj: any, jb?: number): string;
5
- declare function toJSONParse(str: string): any;
1
+ declare function toJSONStringify(obj: any, space?: number | string): string;
2
+ declare function toJSONParse<T = any>(str: string, reviver?: (this: any, key: string, value: any) => any): T;
6
3
 
7
4
  export { toJSONParse, toJSONStringify };
@@ -1,7 +1,4 @@
1
- /**
2
- * 转换对象,把对象转字符串支持函数
3
- */
4
- declare function toJSONStringify(obj: any, jb?: number): string;
5
- declare function toJSONParse(str: string): any;
1
+ declare function toJSONStringify(obj: any, space?: number | string): string;
2
+ declare function toJSONParse<T = any>(str: string, reviver?: (this: any, key: string, value: any) => any): T;
6
3
 
7
4
  export { toJSONParse, toJSONStringify };
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  toJSONParse,
3
3
  toJSONStringify
4
- } from "../../chunk-AFKJQ4QP.js";
5
- import "../../chunk-6YI3CDEW.js";
4
+ } from "../../chunk-U3PZBQ6G.js";
5
+ import "../../chunk-7O4MJOHM.js";
6
6
  import "../../chunk-MLKGABMK.js";
7
7
  export {
8
8
  toJSONParse,
@@ -0,0 +1,15 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+ var _chunkETMYYVQJcjs = require('../../chunk-ETMYYVQJ.cjs');
7
+ require('../../chunk-QXK4IUBI.cjs');
8
+ require('../../chunk-E4WBX6J5.cjs');
9
+ require('../../chunk-75ZPJI57.cjs');
10
+
11
+
12
+
13
+
14
+
15
+ exports.serializeCodeBlock = _chunkETMYYVQJcjs.serializeCodeBlock; exports.serializeFunctionRef = _chunkETMYYVQJcjs.serializeFunctionRef; exports.toJSONSParse = _chunkETMYYVQJcjs.toJSONSParse; exports.toJSONSStringify = _chunkETMYYVQJcjs.toJSONSStringify;
@@ -0,0 +1,60 @@
1
+ type ObjAny<T = any> = Record<string | number | symbol, T>;
2
+ declare const TYPE_MARKERS: {
3
+ FUNCTION_REF: string;
4
+ CODE_BLOCK: string;
5
+ /**内置对象*/
6
+ SYMBOL: string;
7
+ FUNCTION: string;
8
+ UNDEFINED: string;
9
+ DATE: string;
10
+ REGEXP: string;
11
+ NAN: string;
12
+ BIGINT: string;
13
+ MAP: string;
14
+ SET: string;
15
+ ARRAY_BUFFER: string;
16
+ TYPED_ARRAY: string;
17
+ DATA_VIEW: string;
18
+ ERROR: string;
19
+ URL: string;
20
+ INFINITY: string;
21
+ NEGATIVE_INFINITY: string;
22
+ INT8_ARRAY: string;
23
+ UINT8_ARRAY: string;
24
+ UINT8_CLAMPED_ARRAY: string;
25
+ INT16_ARRAY: string;
26
+ UINT16_ARRAY: string;
27
+ INT32_ARRAY: string;
28
+ UINT32_ARRAY: string;
29
+ FLOAT32_ARRAY: string;
30
+ FLOAT64_ARRAY: string;
31
+ BIGINT64_ARRAY: string;
32
+ BIGUINT64_ARRAY: string;
33
+ };
34
+ /**
35
+ * 安全序列化函数(支持更多内置对象)
36
+ */
37
+ declare function toJSONSStringify(obj: any, space?: number | string): string;
38
+ /**
39
+ * 安全反序列化函数(完整支持更多内置对象)
40
+ */
41
+ declare function toJSONSParse<T = any>(str: string, context?: ObjAny): T;
42
+ type CodeBlock = {
43
+ params: string[];
44
+ body: string;
45
+ name?: string;
46
+ };
47
+ /**
48
+ * 序列化函数引用
49
+ */
50
+ declare function serializeFunctionRef(key: string): {
51
+ [TYPE_MARKERS.FUNCTION_REF]: string;
52
+ };
53
+ /**
54
+ * 序列化代码块
55
+ */
56
+ declare function serializeCodeBlock(value: CodeBlock): {
57
+ [TYPE_MARKERS.CODE_BLOCK]: CodeBlock;
58
+ };
59
+
60
+ export { type CodeBlock, serializeCodeBlock, serializeFunctionRef, toJSONSParse, toJSONSStringify };
@@ -0,0 +1,60 @@
1
+ type ObjAny<T = any> = Record<string | number | symbol, T>;
2
+ declare const TYPE_MARKERS: {
3
+ FUNCTION_REF: string;
4
+ CODE_BLOCK: string;
5
+ /**内置对象*/
6
+ SYMBOL: string;
7
+ FUNCTION: string;
8
+ UNDEFINED: string;
9
+ DATE: string;
10
+ REGEXP: string;
11
+ NAN: string;
12
+ BIGINT: string;
13
+ MAP: string;
14
+ SET: string;
15
+ ARRAY_BUFFER: string;
16
+ TYPED_ARRAY: string;
17
+ DATA_VIEW: string;
18
+ ERROR: string;
19
+ URL: string;
20
+ INFINITY: string;
21
+ NEGATIVE_INFINITY: string;
22
+ INT8_ARRAY: string;
23
+ UINT8_ARRAY: string;
24
+ UINT8_CLAMPED_ARRAY: string;
25
+ INT16_ARRAY: string;
26
+ UINT16_ARRAY: string;
27
+ INT32_ARRAY: string;
28
+ UINT32_ARRAY: string;
29
+ FLOAT32_ARRAY: string;
30
+ FLOAT64_ARRAY: string;
31
+ BIGINT64_ARRAY: string;
32
+ BIGUINT64_ARRAY: string;
33
+ };
34
+ /**
35
+ * 安全序列化函数(支持更多内置对象)
36
+ */
37
+ declare function toJSONSStringify(obj: any, space?: number | string): string;
38
+ /**
39
+ * 安全反序列化函数(完整支持更多内置对象)
40
+ */
41
+ declare function toJSONSParse<T = any>(str: string, context?: ObjAny): T;
42
+ type CodeBlock = {
43
+ params: string[];
44
+ body: string;
45
+ name?: string;
46
+ };
47
+ /**
48
+ * 序列化函数引用
49
+ */
50
+ declare function serializeFunctionRef(key: string): {
51
+ [TYPE_MARKERS.FUNCTION_REF]: string;
52
+ };
53
+ /**
54
+ * 序列化代码块
55
+ */
56
+ declare function serializeCodeBlock(value: CodeBlock): {
57
+ [TYPE_MARKERS.CODE_BLOCK]: CodeBlock;
58
+ };
59
+
60
+ export { type CodeBlock, serializeCodeBlock, serializeFunctionRef, toJSONSParse, toJSONSStringify };
@@ -0,0 +1,15 @@
1
+ import {
2
+ serializeCodeBlock,
3
+ serializeFunctionRef,
4
+ toJSONSParse,
5
+ toJSONSStringify
6
+ } from "../../chunk-5HC662VK.js";
7
+ import "../../chunk-7O4MJOHM.js";
8
+ import "../../chunk-754Z5VW6.js";
9
+ import "../../chunk-MLKGABMK.js";
10
+ export {
11
+ serializeCodeBlock,
12
+ serializeFunctionRef,
13
+ toJSONSParse,
14
+ toJSONSStringify
15
+ };
@@ -0,0 +1,16 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/string/getStrNunPosit.ts
2
+ function getStrNunPosit(str, subStr, n) {
3
+ if (n <= 0 || subStr === "") return -1;
4
+ let currentIndex = str.length;
5
+ let foundIndex = -1;
6
+ for (let i = 0; i < n; i++) {
7
+ foundIndex = str.lastIndexOf(subStr, currentIndex - 1);
8
+ if (foundIndex === -1) return -1;
9
+ currentIndex = foundIndex;
10
+ }
11
+ return foundIndex;
12
+ }
13
+
14
+
15
+
16
+ exports.getStrNunPosit = getStrNunPosit;
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk6RIGEV6Gcjs = require('./chunk-6RIGEV6G.cjs');
3
+ var _chunk3DD7YCN2cjs = require('./chunk-3DD7YCN2.cjs');
4
4
 
5
5
 
6
6
  var _chunk6A6EAFGLcjs = require('./chunk-6A6EAFGL.cjs');
@@ -21,6 +21,9 @@ var _chunkIRKWYW5Bcjs = require('./chunk-IRKWYW5B.cjs');
21
21
  var _chunk43VE3KXLcjs = require('./chunk-43VE3KXL.cjs');
22
22
 
23
23
 
24
+ var _chunkNESVPZNFcjs = require('./chunk-NESVPZNF.cjs');
25
+
26
+
24
27
  var _chunk77SI5VSScjs = require('./chunk-77SI5VSS.cjs');
25
28
 
26
29
 
@@ -35,8 +38,9 @@ _chunk75ZPJI57cjs.__export.call(void 0, urls_exports, {
35
38
  getImportUrl: () => _chunkIRKWYW5Bcjs.getImportUrl,
36
39
  getImportUrlSuffix: () => _chunk27WA7EI2cjs.getImportUrlSuffix,
37
40
  getNewFileName: () => _chunk43VE3KXLcjs.getNewFileName,
41
+ getReplaceCompleteUrl: () => _chunkNESVPZNFcjs.getReplaceCompleteUrl,
38
42
  getReplaceImportUrl: () => _chunkRFUD3TOQcjs.getReplaceImportUrl,
39
- getReplaceUrl: () => _chunk6RIGEV6Gcjs.getReplaceUrl,
43
+ getReplaceUrl: () => _chunk3DD7YCN2cjs.getReplaceUrl,
40
44
  getSuffix: () => _chunk6A6EAFGLcjs.getSuffix,
41
45
  getUrlCatalogue: () => _chunkCP2ZSRMUcjs.getUrlCatalogue,
42
46
  getUrlCatalogueLast: () => _chunk3ERQHPTDcjs.getUrlCatalogueLast,
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk3HXQ7TGVcjs = require('./chunk-3HXQ7TGV.cjs');
3
+ var _chunkOJBZ7UUCcjs = require('./chunk-OJBZ7UUC.cjs');
4
4
 
5
5
 
6
6
  var _chunkJR6ZN6QDcjs = require('./chunk-JR6ZN6QD.cjs');
@@ -15,7 +15,7 @@ function getReplaceUrl(url, add) {
15
15
  const uz = _chunkJR6ZN6QDcjs.appearNumSeat.call(void 0,
16
16
  arr[1],
17
17
  reg,
18
- _chunk3HXQ7TGVcjs.appearNum.call(void 0, arr[2], reg) + 1
18
+ _chunkOJBZ7UUCcjs.appearNum.call(void 0, arr[2], reg) + 1
19
19
  );
20
20
  return add + arr[1].substring(uz);
21
21
  }
@@ -0,0 +1,29 @@
1
+ import {
2
+ getUrlCatalogueObj
3
+ } from "./chunk-TP5BP64T.js";
4
+ import {
5
+ getStrNunPosit
6
+ } from "./chunk-USIMBBLW.js";
7
+ import {
8
+ startsNum
9
+ } from "./chunk-P7AWHISY.js";
10
+
11
+ // packages/urls/getReplaceCompleteUrl.ts
12
+ function getReplaceCompleteUrl(url, imp) {
13
+ const obj = getUrlCatalogueObj(url);
14
+ if (!/[\\|\/]/.test(imp)) {
15
+ imp = "./" + imp;
16
+ }
17
+ const apart = obj.apart ?? "/";
18
+ if (imp.startsWith("./")) {
19
+ return obj.catalogue + apart + imp.replace(/^\.\//, "").replace(/[\\|\/]/g, apart);
20
+ } else {
21
+ const v = startsNum(imp, "../");
22
+ const m = obj.catalogue;
23
+ return m.substring(0, getStrNunPosit(m, "/", v)) + apart + imp.replace(RegExp("^(\\.\\.\\/){" + v + "}"), "");
24
+ }
25
+ }
26
+
27
+ export {
28
+ getReplaceCompleteUrl
29
+ };
@@ -1,18 +1,21 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkGD3OA7GUcjs = require('./chunk-GD3OA7GU.cjs');
3
+ var _chunkSOAKYJIGcjs = require('./chunk-SOAKYJIG.cjs');
4
4
 
5
5
 
6
- var _chunkMHHMXDHDcjs = require('./chunk-MHHMXDHD.cjs');
6
+ var _chunkTCMJPIRMcjs = require('./chunk-TCMJPIRM.cjs');
7
7
 
8
8
 
9
- var _chunkSOAKYJIGcjs = require('./chunk-SOAKYJIG.cjs');
9
+ var _chunkXSQOJWXLcjs = require('./chunk-XSQOJWXL.cjs');
10
10
 
11
11
 
12
- var _chunkTCMJPIRMcjs = require('./chunk-TCMJPIRM.cjs');
12
+ var _chunkGD3OA7GUcjs = require('./chunk-GD3OA7GU.cjs');
13
13
 
14
14
 
15
- var _chunkXSQOJWXLcjs = require('./chunk-XSQOJWXL.cjs');
15
+ var _chunkMHHMXDHDcjs = require('./chunk-MHHMXDHD.cjs');
16
+
17
+
18
+ var _chunkXW3XIK3Dcjs = require('./chunk-XW3XIK3D.cjs');
16
19
 
17
20
 
18
21
  var _chunkISHLY7WMcjs = require('./chunk-ISHLY7WM.cjs');
@@ -28,6 +31,7 @@ _chunk75ZPJI57cjs.__export.call(void 0, array_exports, {
28
31
  duplicateRemoval: () => _chunkGD3OA7GUcjs.duplicateRemoval,
29
32
  isArray: () => _chunkISHLY7WMcjs.isArray,
30
33
  replaceAfter: () => _chunkMHHMXDHDcjs.replaceAfter,
34
+ sortObj: () => _chunkXW3XIK3Dcjs.sortObj,
31
35
  toggleArray: () => _chunkSOAKYJIGcjs.toggleArray
32
36
  });
33
37