@fangzhongya/utils 0.0.34 → 0.0.35

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 (251) hide show
  1. package/dist/basic/array/asyncMergeArray.d.cts +9 -0
  2. package/dist/basic/array/asyncMergeArray.d.ts +9 -0
  3. package/dist/basic/array/compareArray.cjs +7 -1
  4. package/dist/basic/array/compareArray.d.cts +11 -0
  5. package/dist/basic/array/compareArray.d.ts +11 -0
  6. package/dist/basic/array/compareArray.js +7 -1
  7. package/dist/basic/array/deleteArray.d.cts +6 -0
  8. package/dist/basic/array/deleteArray.d.ts +6 -0
  9. package/dist/basic/array/duplicateRemoval.d.cts +9 -0
  10. package/dist/basic/array/duplicateRemoval.d.ts +9 -0
  11. package/dist/basic/array/index.cjs +6 -3
  12. package/dist/basic/array/index.d.cts +8 -0
  13. package/dist/basic/array/index.d.ts +8 -0
  14. package/dist/basic/array/index.js +5 -2
  15. package/dist/basic/array/isArray.d.cts +8 -0
  16. package/dist/basic/array/isArray.d.ts +8 -0
  17. package/dist/basic/array/replaceAfter.d.cts +11 -0
  18. package/dist/basic/array/replaceAfter.d.ts +11 -0
  19. package/dist/basic/array/sortObj.d.cts +10 -0
  20. package/dist/basic/array/sortObj.d.ts +10 -0
  21. package/dist/basic/array/toggleArray.d.cts +10 -0
  22. package/dist/basic/array/toggleArray.d.ts +10 -0
  23. package/dist/basic/index.cjs +4 -4
  24. package/dist/basic/index.d.cts +38 -0
  25. package/dist/basic/index.d.ts +38 -0
  26. package/dist/basic/index.js +3 -3
  27. package/dist/basic/object/attrValueSort.d.cts +12 -0
  28. package/dist/basic/object/attrValueSort.d.ts +12 -0
  29. package/dist/basic/object/deepCopy.d.cts +8 -0
  30. package/dist/basic/object/deepCopy.d.ts +8 -0
  31. package/dist/basic/object/filterObject.d.cts +14 -0
  32. package/dist/basic/object/filterObject.d.ts +14 -0
  33. package/dist/basic/object/getSort.d.cts +10 -0
  34. package/dist/basic/object/getSort.d.ts +10 -0
  35. package/dist/basic/object/hasOwn.d.cts +9 -0
  36. package/dist/basic/object/hasOwn.d.ts +9 -0
  37. package/dist/basic/object/index.d.cts +12 -0
  38. package/dist/basic/object/index.d.ts +12 -0
  39. package/dist/basic/object/isObject.d.cts +8 -0
  40. package/dist/basic/object/isObject.d.ts +8 -0
  41. package/dist/basic/object/isObjectArray.d.cts +8 -0
  42. package/dist/basic/object/isObjectArray.d.ts +8 -0
  43. package/dist/basic/object/mergeObject.d.cts +11 -0
  44. package/dist/basic/object/mergeObject.d.ts +11 -0
  45. package/dist/basic/object/objValue.d.cts +7 -0
  46. package/dist/basic/object/objValue.d.ts +7 -0
  47. package/dist/basic/object/reverseObj.d.cts +9 -0
  48. package/dist/basic/object/reverseObj.d.ts +9 -0
  49. package/dist/basic/object/setSort.d.cts +7 -0
  50. package/dist/basic/object/setSort.d.ts +7 -0
  51. package/dist/basic/object/unmergeObject.d.cts +11 -0
  52. package/dist/basic/object/unmergeObject.d.ts +11 -0
  53. package/dist/basic/string/appearNum.d.cts +9 -0
  54. package/dist/basic/string/appearNum.d.ts +9 -0
  55. package/dist/basic/string/appearNumSeat.d.cts +10 -0
  56. package/dist/basic/string/appearNumSeat.d.ts +10 -0
  57. package/dist/basic/string/deComment.d.cts +7 -0
  58. package/dist/basic/string/deComment.d.ts +7 -0
  59. package/dist/basic/string/firstLower.d.cts +8 -0
  60. package/dist/basic/string/firstLower.d.ts +8 -0
  61. package/dist/basic/string/firstUpper.d.cts +8 -0
  62. package/dist/basic/string/firstUpper.d.ts +8 -0
  63. package/dist/basic/string/getImports.d.cts +22 -0
  64. package/dist/basic/string/getImports.d.ts +22 -0
  65. package/dist/basic/string/getStartSame.d.cts +9 -0
  66. package/dist/basic/string/getStartSame.d.ts +9 -0
  67. package/dist/basic/string/getStartSames.d.cts +9 -0
  68. package/dist/basic/string/getStartSames.d.ts +9 -0
  69. package/dist/basic/string/getStrNunPosit.d.cts +10 -0
  70. package/dist/basic/string/getStrNunPosit.d.ts +10 -0
  71. package/dist/basic/string/index.d.cts +15 -0
  72. package/dist/basic/string/index.d.ts +15 -0
  73. package/dist/basic/string/splitUpper.d.cts +8 -0
  74. package/dist/basic/string/splitUpper.d.ts +8 -0
  75. package/dist/basic/string/startsNum.d.cts +9 -0
  76. package/dist/basic/string/startsNum.d.ts +9 -0
  77. package/dist/basic/string/toFunction.d.cts +19 -0
  78. package/dist/basic/string/toFunction.d.ts +19 -0
  79. package/dist/basic/string/toJson.d.cts +4 -0
  80. package/dist/basic/string/toJson.d.ts +4 -0
  81. package/dist/basic/string/toJsons.d.cts +60 -0
  82. package/dist/basic/string/toJsons.d.ts +60 -0
  83. package/dist/basic/string/toStringParse.d.cts +6 -0
  84. package/dist/basic/string/toStringParse.d.ts +6 -0
  85. package/dist/{chunk-7UVIWZ2J.js → chunk-ATRR4ELS.js} +4 -0
  86. package/dist/{chunk-QBGA4H7C.js → chunk-AXX6AFYC.js} +1 -1
  87. package/dist/chunk-NDKOWDDX.cjs +17 -0
  88. package/dist/{chunk-F4IWIVCD.cjs → chunk-SR4YVP26.cjs} +4 -0
  89. package/dist/{chunk-4SFMC3WS.cjs → chunk-VT3YWR6G.cjs} +2 -2
  90. package/dist/chunk-WQ2PUZ2S.js +17 -0
  91. package/dist/css/fetchUnitValue.d.cts +10 -0
  92. package/dist/css/fetchUnitValue.d.ts +10 -0
  93. package/dist/css/getAttrObj.d.cts +11 -0
  94. package/dist/css/getAttrObj.d.ts +11 -0
  95. package/dist/css/getCss.d.cts +9 -0
  96. package/dist/css/getCss.d.ts +9 -0
  97. package/dist/css/getPositionRelative.d.cts +7 -0
  98. package/dist/css/getPositionRelative.d.ts +7 -0
  99. package/dist/css/getPrentClass.d.cts +7 -0
  100. package/dist/css/getPrentClass.d.ts +7 -0
  101. package/dist/css/getPrentCorres.d.cts +7 -0
  102. package/dist/css/getPrentCorres.d.ts +7 -0
  103. package/dist/css/getSVG.d.cts +14 -0
  104. package/dist/css/getSVG.d.ts +14 -0
  105. package/dist/css/getScssImports.d.cts +8 -0
  106. package/dist/css/getScssImports.d.ts +8 -0
  107. package/dist/css/index.d.cts +11 -0
  108. package/dist/css/index.d.ts +11 -0
  109. package/dist/css/setClassName.d.cts +6 -0
  110. package/dist/css/setClassName.d.ts +6 -0
  111. package/dist/css/setCss.d.cts +11 -0
  112. package/dist/css/setCss.d.ts +11 -0
  113. package/dist/css/setObjStyle.d.cts +12 -0
  114. package/dist/css/setObjStyle.d.ts +12 -0
  115. package/dist/date/format.d.cts +3 -0
  116. package/dist/date/format.d.ts +3 -0
  117. package/dist/date/index.d.cts +1 -0
  118. package/dist/date/index.d.ts +1 -0
  119. package/dist/dom/getLocus.d.cts +14 -0
  120. package/dist/dom/getLocus.d.ts +14 -0
  121. package/dist/dom/getShiftEvent.d.cts +25 -0
  122. package/dist/dom/getShiftEvent.d.ts +25 -0
  123. package/dist/dom/index.d.cts +2 -0
  124. package/dist/dom/index.d.ts +2 -0
  125. package/dist/html/analysisHtml.d.cts +13 -0
  126. package/dist/html/analysisHtml.d.ts +13 -0
  127. package/dist/html/generateHtml.d.cts +5 -0
  128. package/dist/html/generateHtml.d.ts +5 -0
  129. package/dist/html/getVueText.d.cts +16 -0
  130. package/dist/html/getVueText.d.ts +16 -0
  131. package/dist/html/htmlEscape.d.cts +8 -0
  132. package/dist/html/htmlEscape.d.ts +8 -0
  133. package/dist/html/index.d.cts +4 -0
  134. package/dist/html/index.d.ts +4 -0
  135. package/dist/index--yFTfMpc.d.cts +29 -0
  136. package/dist/index-B7gdHwF9.d.cts +40 -0
  137. package/dist/index-BU0xla6v.d.cts +31 -0
  138. package/dist/index-BYfEDFkm.d.ts +22 -0
  139. package/dist/index-BbrWO_KD.d.cts +16 -0
  140. package/dist/index-BiHaQlE9.d.cts +14 -0
  141. package/dist/index-Bo-c8HaW.d.cts +9 -0
  142. package/dist/index-BocAlCa8.d.ts +8 -0
  143. package/dist/index-Bq6WKjlK.d.ts +29 -0
  144. package/dist/index-BqhKBGyX.d.ts +14 -0
  145. package/dist/index-Bta_eezz.d.ts +12 -0
  146. package/dist/index-C0q7yBX5.d.cts +29 -0
  147. package/dist/index-C1rfQdS-.d.ts +8 -0
  148. package/dist/index-CK2c-6vv.d.cts +8 -0
  149. package/dist/index-CLnASTZ5.d.ts +29 -0
  150. package/dist/index-CPO1AFVg.d.ts +14 -0
  151. package/dist/index-CS54GrWo.d.ts +16 -0
  152. package/dist/index-CdRz4xJD.d.ts +15 -0
  153. package/dist/index-CmiMKPSL.d.ts +43 -0
  154. package/dist/index-CnrmwHvE.d.cts +15 -0
  155. package/dist/index-Cqj4dm5n.d.ts +8 -0
  156. package/dist/index-CsYVH5m1.d.cts +8 -0
  157. package/dist/index-D1xTdh0f.d.cts +8 -0
  158. package/dist/index-D8_Udh46.d.cts +22 -0
  159. package/dist/index-DAi9PP0w.d.cts +13 -0
  160. package/dist/index-DE6mtDGJ.d.ts +9 -0
  161. package/dist/index-DOq59RNr.d.ts +31 -0
  162. package/dist/index-DPrdy8Ms.d.ts +40 -0
  163. package/dist/index-DaryquSt.d.cts +43 -0
  164. package/dist/index-Dvp25i1P.d.cts +10 -0
  165. package/dist/index-cuR7l2XV.d.cts +14 -0
  166. package/dist/index-syb18q2f.d.ts +10 -0
  167. package/dist/index-v-06_rNI.d.cts +12 -0
  168. package/dist/index-vCPDFXBq.d.ts +13 -0
  169. package/dist/index.cjs +7 -7
  170. package/dist/index.d.cts +99 -0
  171. package/dist/index.d.ts +99 -0
  172. package/dist/index.js +8 -8
  173. package/dist/iss/index.d.cts +3 -0
  174. package/dist/iss/index.d.ts +3 -0
  175. package/dist/judge/index.d.cts +5 -0
  176. package/dist/judge/index.d.ts +5 -0
  177. package/dist/judge/judge.d.cts +155 -0
  178. package/dist/judge/judge.d.ts +155 -0
  179. package/dist/judge/matchs.d.cts +10 -0
  180. package/dist/judge/matchs.d.ts +10 -0
  181. package/dist/judge/matchsEnd.d.cts +9 -0
  182. package/dist/judge/matchsEnd.d.ts +9 -0
  183. package/dist/judge/matchsStart.d.cts +9 -0
  184. package/dist/judge/matchsStart.d.ts +9 -0
  185. package/dist/judge/matchsWhole.d.cts +9 -0
  186. package/dist/judge/matchsWhole.d.ts +9 -0
  187. package/dist/load/getSynch.d.cts +8 -0
  188. package/dist/load/getSynch.d.ts +8 -0
  189. package/dist/load/index.d.cts +2 -0
  190. package/dist/load/index.d.ts +2 -0
  191. package/dist/load/loadScript.d.cts +3 -0
  192. package/dist/load/loadScript.d.ts +3 -0
  193. package/dist/log/index.d.cts +1 -0
  194. package/dist/log/index.d.ts +1 -0
  195. package/dist/log/styleLog.d.cts +68 -0
  196. package/dist/log/styleLog.d.ts +68 -0
  197. package/dist/name/getComponentNames.d.cts +8 -0
  198. package/dist/name/getComponentNames.d.ts +8 -0
  199. package/dist/name/getNames.d.cts +8 -0
  200. package/dist/name/getNames.d.ts +8 -0
  201. package/dist/name/humpToLine.d.cts +8 -0
  202. package/dist/name/humpToLine.d.ts +8 -0
  203. package/dist/name/index.d.cts +5 -0
  204. package/dist/name/index.d.ts +5 -0
  205. package/dist/name/lineToLargeHump.d.cts +8 -0
  206. package/dist/name/lineToLargeHump.d.ts +8 -0
  207. package/dist/name/lineToSmallHump.d.cts +8 -0
  208. package/dist/name/lineToSmallHump.d.ts +8 -0
  209. package/dist/node/getPort.d.cts +13 -0
  210. package/dist/node/getPort.d.ts +13 -0
  211. package/dist/node/index.d.cts +1 -0
  212. package/dist/node/index.d.ts +1 -0
  213. package/dist/tree/getTreeObj.d.cts +26 -0
  214. package/dist/tree/getTreeObj.d.ts +26 -0
  215. package/dist/tree/index.d.cts +2 -0
  216. package/dist/tree/index.d.ts +2 -0
  217. package/dist/tree/splitGroup.d.cts +15 -0
  218. package/dist/tree/splitGroup.d.ts +15 -0
  219. package/dist/urls/getImportUrl.d.cts +9 -0
  220. package/dist/urls/getImportUrl.d.ts +9 -0
  221. package/dist/urls/getImportUrlSuffix.d.cts +9 -0
  222. package/dist/urls/getImportUrlSuffix.d.ts +9 -0
  223. package/dist/urls/getNewFileName.d.cts +8 -0
  224. package/dist/urls/getNewFileName.d.ts +8 -0
  225. package/dist/urls/getReplaceCompleteUrl.d.cts +9 -0
  226. package/dist/urls/getReplaceCompleteUrl.d.ts +9 -0
  227. package/dist/urls/getReplaceImportUrl.d.cts +9 -0
  228. package/dist/urls/getReplaceImportUrl.d.ts +9 -0
  229. package/dist/urls/getReplaceUrl.d.cts +9 -0
  230. package/dist/urls/getReplaceUrl.d.ts +9 -0
  231. package/dist/urls/getReplaceUrls.d.cts +9 -0
  232. package/dist/urls/getReplaceUrls.d.ts +9 -0
  233. package/dist/urls/getSuffix.d.cts +8 -0
  234. package/dist/urls/getSuffix.d.ts +8 -0
  235. package/dist/urls/getUrlCatalogue.d.cts +8 -0
  236. package/dist/urls/getUrlCatalogue.d.ts +8 -0
  237. package/dist/urls/getUrlCatalogueLast.d.cts +8 -0
  238. package/dist/urls/getUrlCatalogueLast.d.ts +8 -0
  239. package/dist/urls/getUrlCatalogueObj.d.cts +17 -0
  240. package/dist/urls/getUrlCatalogueObj.d.ts +17 -0
  241. package/dist/urls/index.d.cts +11 -0
  242. package/dist/urls/index.d.ts +11 -0
  243. package/dist/window/copy.d.cts +3 -0
  244. package/dist/window/copy.d.ts +3 -0
  245. package/dist/window/getParam.d.cts +9 -0
  246. package/dist/window/getParam.d.ts +9 -0
  247. package/dist/window/index.d.cts +2 -0
  248. package/dist/window/index.d.ts +2 -0
  249. package/package.json +1 -1
  250. package/dist/chunk-M53E7HJ2.js +0 -0
  251. package/dist/chunk-UC2AI4QC.cjs +0 -1
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 颠倒key 与 value 值
3
+ */
4
+ type ObjUnkn = {
5
+ [key: string | number | symbol]: string | number | symbol;
6
+ };
7
+ declare function reverseObj(obj: ObjUnkn): ObjUnkn;
8
+
9
+ export { reverseObj };
@@ -0,0 +1,7 @@
1
+ type ObjUnkn = {
2
+ [key: string]: unknown;
3
+ };
4
+ type SortFun = <T>(a: T, b: T) => number;
5
+ declare function setSort(obj: ObjUnkn, sort: SortFun | undefined, ...arr: Array<undefined | string | string[]>): void;
6
+
7
+ export { setSort };
@@ -0,0 +1,7 @@
1
+ type ObjUnkn = {
2
+ [key: string]: unknown;
3
+ };
4
+ type SortFun = <T>(a: T, b: T) => number;
5
+ declare function setSort(obj: ObjUnkn, sort: SortFun | undefined, ...arr: Array<undefined | string | string[]>): void;
6
+
7
+ export { setSort };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 合并两个对象不改原对象的值
3
+ * @param {T} a 合并对象
4
+ * @param {T} b 合并对象
5
+ * @param {number} j 合并级别
6
+ * @param {boolean} i 是否合并数组
7
+ * @returns {T} 合并的对象
8
+ */
9
+ declare function unmergeObject<T>(a: T, b: T, j?: number, i?: boolean): T;
10
+
11
+ export { unmergeObject };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 合并两个对象不改原对象的值
3
+ * @param {T} a 合并对象
4
+ * @param {T} b 合并对象
5
+ * @param {number} j 合并级别
6
+ * @param {boolean} i 是否合并数组
7
+ * @returns {T} 合并的对象
8
+ */
9
+ declare function unmergeObject<T>(a: T, b: T, j?: number, i?: boolean): T;
10
+
11
+ export { unmergeObject };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 查询字符串出现次数
3
+ * @param {string} str 被查询的字符串
4
+ * @param {string | RegExp} t 查询的字符串 或者 正则表达式
5
+ * @returns {number} 出现的次数
6
+ */
7
+ declare function appearNum(str: string, t: string | RegExp): number;
8
+
9
+ export { appearNum };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 查询字符串出现次数
3
+ * @param {string} str 被查询的字符串
4
+ * @param {string | RegExp} t 查询的字符串 或者 正则表达式
5
+ * @returns {number} 出现的次数
6
+ */
7
+ declare function appearNum(str: string, t: string | RegExp): number;
8
+
9
+ export { appearNum };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 查询字符串出现第n次数的位置
3
+ * @param {string} str 被查询的字符串
4
+ * @param {string | RegExp} t 查询的字符串 或者 正则表达式
5
+ * @param {number} n 第几次出现
6
+ * @returns {number} 第n次出现时在字符串的位置 -1 表示没有查询到
7
+ */
8
+ declare function appearNumSeat(str: string, t: string | RegExp, n: number): number;
9
+
10
+ export { appearNumSeat };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 查询字符串出现第n次数的位置
3
+ * @param {string} str 被查询的字符串
4
+ * @param {string | RegExp} t 查询的字符串 或者 正则表达式
5
+ * @param {number} n 第几次出现
6
+ * @returns {number} 第n次出现时在字符串的位置 -1 表示没有查询到
7
+ */
8
+ declare function appearNumSeat(str: string, t: string | RegExp, n: number): number;
9
+
10
+ export { appearNumSeat };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 去掉注释代码
3
+ * @param text
4
+ */
5
+ declare function deComment(code: string): string;
6
+
7
+ export { deComment };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 去掉注释代码
3
+ * @param text
4
+ */
5
+ declare function deComment(code: string): string;
6
+
7
+ export { deComment };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 首字母小写
3
+ * @param {string} str 处理字符串
4
+ * @returns {string}
5
+ */
6
+ declare function firstLower(str: string): string;
7
+
8
+ export { firstLower };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 首字母小写
3
+ * @param {string} str 处理字符串
4
+ * @returns {string}
5
+ */
6
+ declare function firstLower(str: string): string;
7
+
8
+ export { firstLower };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 首字母大写
3
+ * @param {string} str 处理字符串
4
+ * @returns {string}
5
+ */
6
+ declare function firstUpper(str: string): string;
7
+
8
+ export { firstUpper };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 首字母大写
3
+ * @param {string} str 处理字符串
4
+ * @returns {string}
5
+ */
6
+ declare function firstUpper(str: string): string;
7
+
8
+ export { firstUpper };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * 获取代码中的所有导入/导出路径
3
+ * 支持以下语法:
4
+ * 1. 静态导入:
5
+ * - import 'module'
6
+ * - import x from 'module'
7
+ * - import { x } from 'module'
8
+ * - import * as x from 'module'
9
+ * - import type ... from 'module'
10
+ * 2. 动态导入:
11
+ * - import('module')
12
+ * 3. 导出:
13
+ * - export 'module' (无效语法,忽略)
14
+ * - export ... from 'module'
15
+ * - export * from 'module'
16
+ * - export * as x from 'module'
17
+ * - export type ... from 'module'
18
+ */
19
+ declare function getImportss(code: string): string[];
20
+ declare function getImports(code: string, includeType?: boolean): string[];
21
+
22
+ export { getImports, getImportss };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * 获取代码中的所有导入/导出路径
3
+ * 支持以下语法:
4
+ * 1. 静态导入:
5
+ * - import 'module'
6
+ * - import x from 'module'
7
+ * - import { x } from 'module'
8
+ * - import * as x from 'module'
9
+ * - import type ... from 'module'
10
+ * 2. 动态导入:
11
+ * - import('module')
12
+ * 3. 导出:
13
+ * - export 'module' (无效语法,忽略)
14
+ * - export ... from 'module'
15
+ * - export * from 'module'
16
+ * - export * as x from 'module'
17
+ * - export type ... from 'module'
18
+ */
19
+ declare function getImportss(code: string): string[];
20
+ declare function getImports(code: string, includeType?: boolean): string[];
21
+
22
+ export { getImports, getImportss };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 比较两个字符串,获取前面一样的值
3
+ * @param {string} str 比较字符串1
4
+ * @param {string} val 比较字符串2
5
+ * @returns {string} 前面一样的值
6
+ */
7
+ declare function getStartSame(str: string, val: string): string;
8
+
9
+ export { getStartSame };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 比较两个字符串,获取前面一样的值
3
+ * @param {string} str 比较字符串1
4
+ * @param {string} val 比较字符串2
5
+ * @returns {string} 前面一样的值
6
+ */
7
+ declare function getStartSame(str: string, val: string): string;
8
+
9
+ export { getStartSame };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 比较两个字符串,获取前面一样的值
3
+ * @param {string} str 比较字符串1
4
+ * @param {string} val 比较字符串2
5
+ * @returns {Array<string>} [前面一样的值, 字符串1不一样的值, 字符串2不一样的值]
6
+ */
7
+ declare function getStartSames(str: string, val: string): Array<string>;
8
+
9
+ export { getStartSames };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 比较两个字符串,获取前面一样的值
3
+ * @param {string} str 比较字符串1
4
+ * @param {string} val 比较字符串2
5
+ * @returns {Array<string>} [前面一样的值, 字符串1不一样的值, 字符串2不一样的值]
6
+ */
7
+ declare function getStartSames(str: string, val: string): Array<string>;
8
+
9
+ export { getStartSames };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * JS获取字符串倒数第n次出现位置
3
+ * @param str
4
+ * @param subStr
5
+ * @param n
6
+ * @returns
7
+ */
8
+ declare function getStrNunPosit(str: string, subStr: string, n: number): number;
9
+
10
+ export { getStrNunPosit };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * JS获取字符串倒数第n次出现位置
3
+ * @param str
4
+ * @param subStr
5
+ * @param n
6
+ * @returns
7
+ */
8
+ declare function getStrNunPosit(str: string, subStr: string, n: number): number;
9
+
10
+ export { getStrNunPosit };
@@ -0,0 +1,15 @@
1
+ export { appearNum } from './appearNum.cjs';
2
+ export { appearNumSeat } from './appearNumSeat.cjs';
3
+ export { deComment } from './deComment.cjs';
4
+ export { firstLower } from './firstLower.cjs';
5
+ export { firstUpper } from './firstUpper.cjs';
6
+ export { getImports, getImportss } from './getImports.cjs';
7
+ export { getStartSame } from './getStartSame.cjs';
8
+ export { getStartSames } from './getStartSames.cjs';
9
+ export { getStrNunPosit } from './getStrNunPosit.cjs';
10
+ export { splitUpper } from './splitUpper.cjs';
11
+ export { startsNum } from './startsNum.cjs';
12
+ export { getFunctionFormat, toFunction } from './toFunction.cjs';
13
+ export { toJSONParse, toJSONStringify } from './toJson.cjs';
14
+ export { CodeBlock, serializeCodeBlock, serializeFunctionRef, toJSONSParse, toJSONSStringify } from './toJsons.cjs';
15
+ export { toStringParse } from './toStringParse.cjs';
@@ -0,0 +1,15 @@
1
+ export { appearNum } from './appearNum.js';
2
+ export { appearNumSeat } from './appearNumSeat.js';
3
+ export { deComment } from './deComment.js';
4
+ export { firstLower } from './firstLower.js';
5
+ export { firstUpper } from './firstUpper.js';
6
+ export { getImports, getImportss } from './getImports.js';
7
+ export { getStartSame } from './getStartSame.js';
8
+ export { getStartSames } from './getStartSames.js';
9
+ export { getStrNunPosit } from './getStrNunPosit.js';
10
+ export { splitUpper } from './splitUpper.js';
11
+ export { startsNum } from './startsNum.js';
12
+ export { getFunctionFormat, toFunction } from './toFunction.js';
13
+ export { toJSONParse, toJSONStringify } from './toJson.js';
14
+ export { CodeBlock, serializeCodeBlock, serializeFunctionRef, toJSONSParse, toJSONSStringify } from './toJsons.js';
15
+ export { toStringParse } from './toStringParse.js';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 按照大写字母分割
3
+ * @param {string} name
4
+ * @returns { Array }
5
+ */
6
+ declare function splitUpper(name: string): string[];
7
+
8
+ export { splitUpper };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 按照大写字母分割
3
+ * @param {string} name
4
+ * @returns { Array }
5
+ */
6
+ declare function splitUpper(name: string): string[];
7
+
8
+ export { splitUpper };
@@ -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,19 @@
1
+ interface FunctionFormat {
2
+ isAsync: boolean;
3
+ isGenerator: boolean;
4
+ name?: string;
5
+ param: string;
6
+ body: string;
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;
18
+
19
+ export { getFunctionFormat, toFunction };
@@ -0,0 +1,19 @@
1
+ interface FunctionFormat {
2
+ isAsync: boolean;
3
+ isGenerator: boolean;
4
+ name?: string;
5
+ param: string;
6
+ body: string;
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;
18
+
19
+ export { getFunctionFormat, toFunction };
@@ -0,0 +1,4 @@
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;
3
+
4
+ export { toJSONParse, toJSONStringify };
@@ -0,0 +1,4 @@
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;
3
+
4
+ export { toJSONParse, toJSONStringify };
@@ -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,6 @@
1
+ /**
2
+ * 安全反序列化函数(完整支持更多内置对象)
3
+ */
4
+ declare function toStringParse(str: string, type: string, split?: string | RegExp): any;
5
+
6
+ export { toStringParse };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 安全反序列化函数(完整支持更多内置对象)
3
+ */
4
+ declare function toStringParse(str: string, type: string, split?: string | RegExp): any;
5
+
6
+ export { toStringParse };
@@ -13,6 +13,9 @@ import {
13
13
  import {
14
14
  asyncMergeArray
15
15
  } from "./chunk-Q6FMBSK4.js";
16
+ import {
17
+ compareArray
18
+ } from "./chunk-WQ2PUZ2S.js";
16
19
  import {
17
20
  sortObj
18
21
  } from "./chunk-O34QAOO7.js";
@@ -27,6 +30,7 @@ import {
27
30
  var array_exports = {};
28
31
  __export(array_exports, {
29
32
  asyncMergeArray: () => asyncMergeArray,
33
+ compareArray: () => compareArray,
30
34
  deleteArray: () => deleteArray,
31
35
  duplicateRemoval: () => duplicateRemoval,
32
36
  isArray: () => isArray,
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-IY346OU3.js";
7
7
  import {
8
8
  array_exports
9
- } from "./chunk-7UVIWZ2J.js";
9
+ } from "./chunk-ATRR4ELS.js";
10
10
  import {
11
11
  __export
12
12
  } from "./chunk-MLKGABMK.js";
@@ -0,0 +1,17 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/array/compareArray.ts
2
+ function compareArray(arr1, arr2, compareFn = (a, b) => a === b) {
3
+ const front = arr1.filter(
4
+ (item1) => !arr2.some((item2) => compareFn(item1, item2))
5
+ );
6
+ const after = arr2.filter(
7
+ (item2) => !arr1.some((item1) => compareFn(item1, item2))
8
+ );
9
+ const same = arr1.filter(
10
+ (item1) => arr2.some((item2) => compareFn(item1, item2))
11
+ );
12
+ return { front, after, same, value: [...front, ...after] };
13
+ }
14
+
15
+
16
+
17
+ exports.compareArray = compareArray;
@@ -15,6 +15,9 @@ var _chunkSOAKYJIGcjs = require('./chunk-SOAKYJIG.cjs');
15
15
  var _chunkTCMJPIRMcjs = require('./chunk-TCMJPIRM.cjs');
16
16
 
17
17
 
18
+ var _chunkNDKOWDDXcjs = require('./chunk-NDKOWDDX.cjs');
19
+
20
+
18
21
  var _chunkXW3XIK3Dcjs = require('./chunk-XW3XIK3D.cjs');
19
22
 
20
23
 
@@ -27,6 +30,7 @@ var _chunk75ZPJI57cjs = require('./chunk-75ZPJI57.cjs');
27
30
  var array_exports = {};
28
31
  _chunk75ZPJI57cjs.__export.call(void 0, array_exports, {
29
32
  asyncMergeArray: () => _chunkTCMJPIRMcjs.asyncMergeArray,
33
+ compareArray: () => _chunkNDKOWDDXcjs.compareArray,
30
34
  deleteArray: () => _chunkXSQOJWXLcjs.deleteArray,
31
35
  duplicateRemoval: () => _chunkGD3OA7GUcjs.duplicateRemoval,
32
36
  isArray: () => _chunkISHLY7WMcjs.isArray,
@@ -6,7 +6,7 @@ var _chunk3SJOLMSIcjs = require('./chunk-3SJOLMSI.cjs');
6
6
  var _chunk4E4OWBN7cjs = require('./chunk-4E4OWBN7.cjs');
7
7
 
8
8
 
9
- var _chunkF4IWIVCDcjs = require('./chunk-F4IWIVCD.cjs');
9
+ var _chunkSR4YVP26cjs = require('./chunk-SR4YVP26.cjs');
10
10
 
11
11
 
12
12
  var _chunk75ZPJI57cjs = require('./chunk-75ZPJI57.cjs');
@@ -14,7 +14,7 @@ var _chunk75ZPJI57cjs = require('./chunk-75ZPJI57.cjs');
14
14
  // packages/basic/index.ts
15
15
  var basic_exports = {};
16
16
  _chunk75ZPJI57cjs.__export.call(void 0, basic_exports, {
17
- array: () => _chunkF4IWIVCDcjs.array_exports,
17
+ array: () => _chunkSR4YVP26cjs.array_exports,
18
18
  object: () => _chunk4E4OWBN7cjs.object_exports,
19
19
  string: () => _chunk3SJOLMSIcjs.string_exports
20
20
  });
@@ -0,0 +1,17 @@
1
+ // packages/basic/array/compareArray.ts
2
+ function compareArray(arr1, arr2, compareFn = (a, b) => a === b) {
3
+ const front = arr1.filter(
4
+ (item1) => !arr2.some((item2) => compareFn(item1, item2))
5
+ );
6
+ const after = arr2.filter(
7
+ (item2) => !arr1.some((item1) => compareFn(item1, item2))
8
+ );
9
+ const same = arr1.filter(
10
+ (item1) => arr2.some((item2) => compareFn(item1, item2))
11
+ );
12
+ return { front, after, same, value: [...front, ...after] };
13
+ }
14
+
15
+ export {
16
+ compareArray
17
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 提取单位值
3
+ * @param text
4
+ * @param str
5
+ * @param callback
6
+ * @returns
7
+ */
8
+ declare function fetchUnitValue(text: string, str: string, callback?: (n: number, dw: string, yss: string, i: number) => string): string;
9
+
10
+ export { fetchUnitValue };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 提取单位值
3
+ * @param text
4
+ * @param str
5
+ * @param callback
6
+ * @returns
7
+ */
8
+ declare function fetchUnitValue(text: string, str: string, callback?: (n: number, dw: string, yss: string, i: number) => string): string;
9
+
10
+ export { fetchUnitValue };