@fangzhongya/utils 0.0.6 → 0.0.7-10

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 (177) hide show
  1. package/dist/basic/array/asyncMergeArray.cjs +7 -0
  2. package/dist/basic/array/asyncMergeArray.d.ts +9 -0
  3. package/dist/basic/array/asyncMergeArray.js +7 -0
  4. package/dist/basic/array/duplicateRemoval.cjs +7 -0
  5. package/dist/basic/array/duplicateRemoval.d.ts +9 -0
  6. package/dist/basic/array/duplicateRemoval.js +7 -0
  7. package/dist/basic/array/index.cjs +10 -4
  8. package/dist/basic/array/index.d.ts +3 -1
  9. package/dist/basic/array/index.js +12 -6
  10. package/dist/basic/array/isArray.d.ts +2 -1
  11. package/dist/basic/array/toggleArray.cjs +2 -4
  12. package/dist/basic/array/toggleArray.d.ts +7 -14
  13. package/dist/basic/array/toggleArray.js +1 -3
  14. package/dist/basic/index.cjs +17 -10
  15. package/dist/basic/index.d.ts +13 -6
  16. package/dist/basic/index.js +16 -9
  17. package/dist/basic/object/index.d.ts +1 -1
  18. package/dist/basic/object/isObject.d.ts +2 -1
  19. package/dist/basic/object/mergeObject.d.ts +5 -5
  20. package/dist/basic/object/unmergeObject.d.ts +6 -6
  21. package/dist/basic/string/appearNum.cjs +7 -0
  22. package/dist/basic/string/appearNum.d.ts +9 -0
  23. package/dist/basic/string/appearNum.js +7 -0
  24. package/dist/basic/string/appearNumSeat.cjs +7 -0
  25. package/dist/basic/string/appearNumSeat.d.ts +10 -0
  26. package/dist/basic/string/appearNumSeat.js +7 -0
  27. package/dist/basic/string/firstLower.cjs +7 -0
  28. package/dist/basic/string/firstLower.d.ts +8 -0
  29. package/dist/basic/string/firstLower.js +7 -0
  30. package/dist/basic/string/firstUpper.cjs +7 -0
  31. package/dist/basic/string/firstUpper.d.ts +8 -0
  32. package/dist/basic/string/firstUpper.js +7 -0
  33. package/dist/basic/string/getStartSame.cjs +7 -0
  34. package/dist/basic/string/getStartSame.d.ts +9 -0
  35. package/dist/basic/string/getStartSame.js +7 -0
  36. package/dist/basic/string/getStartSames.cjs +7 -0
  37. package/dist/basic/string/getStartSames.d.ts +9 -0
  38. package/dist/basic/string/getStartSames.js +7 -0
  39. package/dist/basic/string/index.cjs +19 -3
  40. package/dist/basic/string/index.d.ts +6 -1
  41. package/dist/basic/string/index.js +22 -6
  42. package/dist/chunk-27WA7EI2.cjs +15 -0
  43. package/dist/chunk-2BY5RQHU.cjs +23 -0
  44. package/dist/chunk-2W7EPKCY.js +32 -0
  45. package/dist/chunk-3ERQHPTD.cjs +13 -0
  46. package/dist/chunk-3HXQ7TGV.cjs +14 -0
  47. package/dist/{chunk-YBUHXX5U.cjs → chunk-4ALAS6RC.cjs} +5 -5
  48. package/dist/chunk-4OBNLDTJ.js +8 -0
  49. package/dist/chunk-5UV36ZIW.cjs +21 -0
  50. package/dist/chunk-6GMDGF3F.js +36 -0
  51. package/dist/chunk-6RIGEV6G.cjs +25 -0
  52. package/dist/chunk-7DTHADVK.js +18 -0
  53. package/dist/{chunk-ED5PJTG5.js → chunk-7ZORBK43.js} +11 -5
  54. package/dist/chunk-A276ZDLP.js +19 -0
  55. package/dist/chunk-AM67P3W7.js +15 -0
  56. package/dist/chunk-AS3WKQP7.js +21 -0
  57. package/dist/chunk-ASN2EUM7.cjs +36 -0
  58. package/dist/chunk-AWC672JW.js +34 -0
  59. package/dist/chunk-AXMOZZCM.cjs +22 -0
  60. package/dist/chunk-BDJORZRC.js +13 -0
  61. package/dist/chunk-BWNLZJJG.js +21 -0
  62. package/dist/chunk-CBQE3I5S.cjs +36 -0
  63. package/dist/chunk-DILKJQYV.cjs +9 -0
  64. package/dist/chunk-DMZP4RPN.js +23 -0
  65. package/dist/chunk-EWJJKQIO.js +8 -0
  66. package/dist/chunk-GD3OA7GU.cjs +18 -0
  67. package/dist/{chunk-75TBDXR6.js → chunk-GHEA6X2Q.js} +5 -5
  68. package/dist/chunk-GOJN3OQ4.js +22 -0
  69. package/dist/chunk-H2LFD53G.js +36 -0
  70. package/dist/{chunk-JNC5JEFB.cjs → chunk-IGL4Y66V.cjs} +10 -4
  71. package/dist/chunk-IRGCP7KH.js +23 -0
  72. package/dist/chunk-IRKWYW5B.cjs +34 -0
  73. package/dist/{chunk-DEENZC5X.js → chunk-J7CICTHH.js} +3 -11
  74. package/dist/chunk-J7S3KBHL.cjs +18 -0
  75. package/dist/chunk-JLEIVV37.cjs +32 -0
  76. package/dist/chunk-JR6ZN6QD.cjs +23 -0
  77. package/dist/{chunk-BEQYORII.cjs → chunk-LTVXRDTD.cjs} +3 -11
  78. package/dist/chunk-MXLYIZIX.js +38 -0
  79. package/dist/chunk-OQL4GIEJ.cjs +8 -0
  80. package/dist/chunk-P3YVE7JK.cjs +21 -0
  81. package/dist/chunk-PAJDTMC5.cjs +38 -0
  82. package/dist/chunk-PW7RP73J.cjs +19 -0
  83. package/dist/chunk-S6JRKYPY.js +23 -0
  84. package/dist/chunk-SNABGVNO.js +14 -0
  85. package/dist/chunk-SYXWQKOO.cjs +28 -0
  86. package/dist/chunk-T22I7TJQ.cjs +25 -0
  87. package/dist/chunk-T2QKEABG.js +25 -0
  88. package/dist/chunk-UEVMS6QD.cjs +8 -0
  89. package/dist/chunk-VNVG4BJ4.cjs +23 -0
  90. package/dist/chunk-WI55O3IV.cjs +16 -0
  91. package/dist/chunk-XBZX5YZW.js +15 -0
  92. package/dist/chunk-XCDKXZFR.js +16 -0
  93. package/dist/chunk-XHR36FJK.cjs +15 -0
  94. package/dist/chunk-XQB2HUHZ.js +23 -0
  95. package/dist/chunk-YGJOBIEO.cjs +23 -0
  96. package/dist/chunk-YNOFNHEK.js +23 -0
  97. package/dist/chunk-ZEXHP7HI.js +9 -0
  98. package/dist/chunk-ZQX2TYQB.js +28 -0
  99. package/dist/chunk-ZRZ5HATA.js +25 -0
  100. package/dist/chunk-ZVBCHJA5.js +18 -0
  101. package/dist/chunk-ZZEFL2TE.cjs +23 -0
  102. package/dist/index-2eb19d38.d.ts +27 -0
  103. package/dist/{index-8473d4b5.d.ts → index-3062a21e.d.ts} +1 -1
  104. package/dist/index-445fe401.d.ts +19 -0
  105. package/dist/index-7563997b.d.ts +25 -0
  106. package/dist/index-ab13c58f.d.ts +19 -0
  107. package/dist/index-bbc4ee5e.d.ts +13 -0
  108. package/dist/index-f9cc2ca2.d.ts +22 -0
  109. package/dist/index.cjs +43 -9
  110. package/dist/index.d.ts +32 -7
  111. package/dist/index.js +44 -10
  112. package/dist/judge/index.cjs +20 -0
  113. package/dist/judge/index.d.ts +4 -0
  114. package/dist/judge/index.js +20 -0
  115. package/dist/judge/matchs.cjs +10 -0
  116. package/dist/judge/matchs.d.ts +10 -0
  117. package/dist/judge/matchs.js +10 -0
  118. package/dist/judge/matchsEnd.cjs +7 -0
  119. package/dist/judge/matchsEnd.d.ts +9 -0
  120. package/dist/judge/matchsEnd.js +7 -0
  121. package/dist/judge/matchsStart.cjs +7 -0
  122. package/dist/judge/matchsStart.d.ts +9 -0
  123. package/dist/judge/matchsStart.js +7 -0
  124. package/dist/judge/matchsWhole.cjs +7 -0
  125. package/dist/judge/matchsWhole.d.ts +9 -0
  126. package/dist/judge/matchsWhole.js +7 -0
  127. package/dist/log/styleLog.d.ts +22 -0
  128. package/dist/name/getComponentNames.cjs +12 -0
  129. package/dist/name/getComponentNames.d.ts +8 -0
  130. package/dist/name/getComponentNames.js +12 -0
  131. package/dist/name/getNames.cjs +12 -0
  132. package/dist/name/getNames.d.ts +8 -0
  133. package/dist/name/getNames.js +12 -0
  134. package/dist/name/humpToLine.cjs +7 -0
  135. package/dist/name/humpToLine.d.ts +8 -0
  136. package/dist/name/humpToLine.js +7 -0
  137. package/dist/name/index.cjs +26 -0
  138. package/dist/name/index.d.ts +5 -0
  139. package/dist/name/index.js +26 -0
  140. package/dist/name/lineToLargeHump.cjs +8 -0
  141. package/dist/name/lineToLargeHump.d.ts +8 -0
  142. package/dist/name/lineToLargeHump.js +8 -0
  143. package/dist/name/lineToSmallHump.cjs +10 -0
  144. package/dist/name/lineToSmallHump.d.ts +8 -0
  145. package/dist/name/lineToSmallHump.js +10 -0
  146. package/dist/urls/getImportUrl.cjs +8 -0
  147. package/dist/urls/getImportUrl.d.ts +9 -0
  148. package/dist/urls/getImportUrl.js +8 -0
  149. package/dist/urls/getImportUrlSuffix.cjs +9 -0
  150. package/dist/urls/getImportUrlSuffix.d.ts +9 -0
  151. package/dist/urls/getImportUrlSuffix.js +9 -0
  152. package/dist/urls/getReplaceUrl.cjs +10 -0
  153. package/dist/urls/getReplaceUrl.d.ts +9 -0
  154. package/dist/urls/getReplaceUrl.js +10 -0
  155. package/dist/urls/getUrlCatalogue.cjs +7 -0
  156. package/dist/urls/getUrlCatalogue.d.ts +8 -0
  157. package/dist/urls/getUrlCatalogue.js +7 -0
  158. package/dist/urls/getUrlCatalogueLast.cjs +7 -0
  159. package/dist/urls/getUrlCatalogueLast.d.ts +8 -0
  160. package/dist/urls/getUrlCatalogueLast.js +7 -0
  161. package/dist/urls/getUrlCatalogueObj.cjs +7 -0
  162. package/dist/urls/getUrlCatalogueObj.d.ts +16 -0
  163. package/dist/urls/getUrlCatalogueObj.js +7 -0
  164. package/dist/urls/index.cjs +31 -0
  165. package/dist/urls/index.d.ts +6 -0
  166. package/dist/urls/index.js +31 -0
  167. package/package.json +158 -25
  168. package/dist/basic/string/index2.cjs +0 -11
  169. package/dist/basic/string/index2.d.ts +0 -20
  170. package/dist/basic/string/index2.js +0 -11
  171. package/dist/chunk-4PBAZ73I.cjs +0 -20
  172. package/dist/chunk-BL4KF5G4.cjs +0 -25
  173. package/dist/chunk-OX5EXWS2.js +0 -25
  174. package/dist/chunk-YYNHNLVW.js +0 -20
  175. package/dist/index-5691335a.d.ts +0 -14
  176. package/dist/index-56b2efa3.d.ts +0 -13
  177. package/dist/index-6be6487f.d.ts +0 -15
@@ -0,0 +1,34 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkPW7RP73Jcjs = require('./chunk-PW7RP73J.cjs');
4
+
5
+ // packages/urls/getImportUrl.ts
6
+ function getImportUrl(url, imp) {
7
+ const arr = _chunkPW7RP73Jcjs.getStartSames.call(void 0, url, imp);
8
+ const ts = arr[0];
9
+ if (!/[\\|\/]$/.test(ts)) {
10
+ const regs = ts.match(/[\\|\/]([^\\|\/]*)$/);
11
+ if (regs && regs.length > 0) {
12
+ const a = regs[1];
13
+ arr[0] = ts.substring(
14
+ 0,
15
+ regs.index + 1
16
+ );
17
+ arr[1] = a + arr[1];
18
+ arr[2] = a + arr[2];
19
+ }
20
+ }
21
+ const l = arr[1].split(/\\|\//).length - 1;
22
+ let ds = ["./"];
23
+ if (l > 0) {
24
+ ds = [];
25
+ for (let index = 0; index < l; index++) {
26
+ ds.push("../");
27
+ }
28
+ }
29
+ return ds.join("") + arr[2].replace(/\\/g, "/");
30
+ }
31
+
32
+
33
+
34
+ exports.getImportUrl = getImportUrl;
@@ -1,11 +1,5 @@
1
- // packages/basic/string/index2.ts
2
- function firstUpper(vs) {
3
- return vs.slice(0, 1).toUpperCase() + vs.slice(1);
4
- }
5
- function firstLower(vs) {
6
- return vs.slice(0, 1).toLowerCase() + vs.slice(1);
7
- }
8
- function getNmaeBar(name) {
1
+ // packages/name/humpToLine.ts
2
+ function humpToLine(name) {
9
3
  const reg = /(([A-Z])([^A-Z]*))/g;
10
4
  let result;
11
5
  const arr = [];
@@ -27,7 +21,5 @@ function getNmaeBar(name) {
27
21
  }
28
22
 
29
23
  export {
30
- firstUpper,
31
- firstLower,
32
- getNmaeBar
24
+ humpToLine
33
25
  };
@@ -0,0 +1,18 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/string/getStartSame.ts
2
+ function getStartSame(str, val) {
3
+ let s = "";
4
+ let vs = [...val];
5
+ for (let index = 0; index < vs.length; index++) {
6
+ const element = vs[index];
7
+ if (element === str.charAt(index)) {
8
+ s += element;
9
+ } else {
10
+ break;
11
+ }
12
+ }
13
+ return s;
14
+ }
15
+
16
+
17
+
18
+ exports.getStartSame = getStartSame;
@@ -0,0 +1,32 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkPAJDTMC5cjs = require('./chunk-PAJDTMC5.cjs');
4
+
5
+
6
+ var _chunk5UV36ZIWcjs = require('./chunk-5UV36ZIW.cjs');
7
+
8
+
9
+ var _chunkLTVXRDTDcjs = require('./chunk-LTVXRDTD.cjs');
10
+
11
+
12
+ var _chunkXHR36FJKcjs = require('./chunk-XHR36FJK.cjs');
13
+
14
+
15
+ var _chunkWI55O3IVcjs = require('./chunk-WI55O3IV.cjs');
16
+
17
+
18
+ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
19
+
20
+ // packages/name/index.ts
21
+ var name_exports = {};
22
+ _chunk5AZGAKWRcjs.__export.call(void 0, name_exports, {
23
+ getComponentNames: () => _chunkPAJDTMC5cjs.getComponentNames,
24
+ getNames: () => _chunk5UV36ZIWcjs.getNames,
25
+ humpToLine: () => _chunkLTVXRDTDcjs.humpToLine,
26
+ lineToLargeHump: () => _chunkWI55O3IVcjs.lineToLargeHump,
27
+ lineToSmallHump: () => _chunkXHR36FJKcjs.lineToSmallHump
28
+ });
29
+
30
+
31
+
32
+ exports.name_exports = name_exports;
@@ -0,0 +1,23 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/string/appearNumSeat.ts
2
+ function appearNumSeat(str, t, n) {
3
+ let reg;
4
+ if (typeof t == "string") {
5
+ reg = new RegExp(t, "g");
6
+ } else {
7
+ reg = t;
8
+ }
9
+ let i = 0;
10
+ let s = -1;
11
+ let arr;
12
+ while ((arr = reg.exec(str)) !== null) {
13
+ i++;
14
+ if (i >= n) {
15
+ return arr.index;
16
+ }
17
+ }
18
+ return s;
19
+ }
20
+
21
+
22
+
23
+ exports.appearNumSeat = appearNumSeat;
@@ -1,11 +1,5 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/string/index2.ts
2
- function firstUpper(vs) {
3
- return vs.slice(0, 1).toUpperCase() + vs.slice(1);
4
- }
5
- function firstLower(vs) {
6
- return vs.slice(0, 1).toLowerCase() + vs.slice(1);
7
- }
8
- function getNmaeBar(name) {
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/name/humpToLine.ts
2
+ function humpToLine(name) {
9
3
  const reg = /(([A-Z])([^A-Z]*))/g;
10
4
  let result;
11
5
  const arr = [];
@@ -28,6 +22,4 @@ function getNmaeBar(name) {
28
22
 
29
23
 
30
24
 
31
-
32
-
33
- exports.firstUpper = firstUpper; exports.firstLower = firstLower; exports.getNmaeBar = getNmaeBar;
25
+ exports.humpToLine = humpToLine;
@@ -0,0 +1,38 @@
1
+ import {
2
+ humpToLine
3
+ } from "./chunk-J7CICTHH.js";
4
+ import {
5
+ lineToSmallHump
6
+ } from "./chunk-AM67P3W7.js";
7
+ import {
8
+ lineToLargeHump
9
+ } from "./chunk-XCDKXZFR.js";
10
+
11
+ // packages/name/getComponentNames.ts
12
+ function getComponentNames(name) {
13
+ if (name.includes("-")) {
14
+ const line = humpToLine(name);
15
+ const upper = lineToLargeHump(line);
16
+ const lower = lineToSmallHump(upper);
17
+ return [line, upper, lower];
18
+ } else if (/[A-Z]/.test(name)) {
19
+ const line = humpToLine(name);
20
+ if (/^[A-Z]/.test(name)) {
21
+ const upper = lineToLargeHump(line);
22
+ const lower = lineToSmallHump(upper);
23
+ if (line.includes("-")) {
24
+ return [line, upper, lower];
25
+ } else {
26
+ return [name, lower];
27
+ }
28
+ } else {
29
+ return [line, name];
30
+ }
31
+ } else {
32
+ return [name];
33
+ }
34
+ }
35
+
36
+ export {
37
+ getComponentNames
38
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/string/firstUpper.ts
2
+ function firstUpper(str) {
3
+ return str.slice(0, 1).toUpperCase() + str.slice(1);
4
+ }
5
+
6
+
7
+
8
+ exports.firstUpper = firstUpper;
@@ -0,0 +1,21 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/urls/getUrlCatalogueObj.ts
2
+ function getUrlCatalogueObj(str) {
3
+ const reg = /(\\|\/)([^\\|\/]+)(\.[a-z|A-Z]+)$/g;
4
+ const ml = str.replace(reg, "");
5
+ let name = "";
6
+ let suffix = "";
7
+ const arr = reg.exec(str);
8
+ if (arr) {
9
+ name = arr[2];
10
+ suffix = arr[3];
11
+ }
12
+ return {
13
+ catalogue: ml,
14
+ name,
15
+ suffix
16
+ };
17
+ }
18
+
19
+
20
+
21
+ exports.getUrlCatalogueObj = getUrlCatalogueObj;
@@ -0,0 +1,38 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkLTVXRDTDcjs = require('./chunk-LTVXRDTD.cjs');
4
+
5
+
6
+ var _chunkXHR36FJKcjs = require('./chunk-XHR36FJK.cjs');
7
+
8
+
9
+ var _chunkWI55O3IVcjs = require('./chunk-WI55O3IV.cjs');
10
+
11
+ // packages/name/getComponentNames.ts
12
+ function getComponentNames(name) {
13
+ if (name.includes("-")) {
14
+ const line = _chunkLTVXRDTDcjs.humpToLine.call(void 0, name);
15
+ const upper = _chunkWI55O3IVcjs.lineToLargeHump.call(void 0, line);
16
+ const lower = _chunkXHR36FJKcjs.lineToSmallHump.call(void 0, upper);
17
+ return [line, upper, lower];
18
+ } else if (/[A-Z]/.test(name)) {
19
+ const line = _chunkLTVXRDTDcjs.humpToLine.call(void 0, name);
20
+ if (/^[A-Z]/.test(name)) {
21
+ const upper = _chunkWI55O3IVcjs.lineToLargeHump.call(void 0, line);
22
+ const lower = _chunkXHR36FJKcjs.lineToSmallHump.call(void 0, upper);
23
+ if (line.includes("-")) {
24
+ return [line, upper, lower];
25
+ } else {
26
+ return [name, lower];
27
+ }
28
+ } else {
29
+ return [line, name];
30
+ }
31
+ } else {
32
+ return [name];
33
+ }
34
+ }
35
+
36
+
37
+
38
+ exports.getComponentNames = getComponentNames;
@@ -0,0 +1,19 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/string/getStartSames.ts
2
+ function getStartSames(str, val) {
3
+ let s = "";
4
+ const vs = [...val];
5
+ let index = 0;
6
+ for (; index < vs.length; index++) {
7
+ const element = vs[index];
8
+ if (element === str.charAt(index)) {
9
+ s += element;
10
+ } else {
11
+ break;
12
+ }
13
+ }
14
+ return [s, str.substring(index), val.substring(index)];
15
+ }
16
+
17
+
18
+
19
+ exports.getStartSames = getStartSames;
@@ -0,0 +1,23 @@
1
+ // packages/judge/matchsStart.ts
2
+ function matchsStart(key, matchs) {
3
+ if (matchs && matchs.length > 0) {
4
+ for (const value of matchs) {
5
+ if (typeof value == "string") {
6
+ if (key.startsWith(value)) {
7
+ return true;
8
+ }
9
+ } else {
10
+ if (value.test(key)) {
11
+ return true;
12
+ }
13
+ }
14
+ }
15
+ return false;
16
+ } else {
17
+ return true;
18
+ }
19
+ }
20
+
21
+ export {
22
+ matchsStart
23
+ };
@@ -0,0 +1,14 @@
1
+ // packages/basic/string/appearNum.ts
2
+ function appearNum(str, t) {
3
+ let reg = t;
4
+ if (typeof t == "string") {
5
+ reg = new RegExp(t, "g");
6
+ }
7
+ let arr = str.match(reg);
8
+ let c = arr ? arr.length : 0;
9
+ return c;
10
+ }
11
+
12
+ export {
13
+ appearNum
14
+ };
@@ -0,0 +1,28 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkT22I7TJQcjs = require('./chunk-T22I7TJQ.cjs');
4
+
5
+
6
+ var _chunkYGJOBIEOcjs = require('./chunk-YGJOBIEO.cjs');
7
+
8
+
9
+ var _chunkZZEFL2TEcjs = require('./chunk-ZZEFL2TE.cjs');
10
+
11
+
12
+ var _chunk2BY5RQHUcjs = require('./chunk-2BY5RQHU.cjs');
13
+
14
+
15
+ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
16
+
17
+ // packages/judge/index.ts
18
+ var judge_exports = {};
19
+ _chunk5AZGAKWRcjs.__export.call(void 0, judge_exports, {
20
+ matchs: () => _chunkT22I7TJQcjs.matchs,
21
+ matchsEnd: () => _chunkYGJOBIEOcjs.matchsEnd,
22
+ matchsStart: () => _chunkZZEFL2TEcjs.matchsStart,
23
+ matchsWhole: () => _chunk2BY5RQHUcjs.matchsWhole
24
+ });
25
+
26
+
27
+
28
+ exports.judge_exports = judge_exports;
@@ -0,0 +1,25 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkYGJOBIEOcjs = require('./chunk-YGJOBIEO.cjs');
4
+
5
+
6
+ var _chunkZZEFL2TEcjs = require('./chunk-ZZEFL2TE.cjs');
7
+
8
+
9
+ var _chunk2BY5RQHUcjs = require('./chunk-2BY5RQHU.cjs');
10
+
11
+ // packages/judge/matchs.ts
12
+ function matchs(key, matchs2, type) {
13
+ switch (type) {
14
+ case "end":
15
+ return _chunkYGJOBIEOcjs.matchsEnd.call(void 0, key, matchs2);
16
+ case "start":
17
+ return _chunkZZEFL2TEcjs.matchsStart.call(void 0, key, matchs2);
18
+ default:
19
+ return _chunk2BY5RQHUcjs.matchsWhole.call(void 0, key, matchs2);
20
+ }
21
+ }
22
+
23
+
24
+
25
+ exports.matchs = matchs;
@@ -0,0 +1,25 @@
1
+ import {
2
+ matchsEnd
3
+ } from "./chunk-YNOFNHEK.js";
4
+ import {
5
+ matchsStart
6
+ } from "./chunk-S6JRKYPY.js";
7
+ import {
8
+ matchsWhole
9
+ } from "./chunk-IRGCP7KH.js";
10
+
11
+ // packages/judge/matchs.ts
12
+ function matchs(key, matchs2, type) {
13
+ switch (type) {
14
+ case "end":
15
+ return matchsEnd(key, matchs2);
16
+ case "start":
17
+ return matchsStart(key, matchs2);
18
+ default:
19
+ return matchsWhole(key, matchs2);
20
+ }
21
+ }
22
+
23
+ export {
24
+ matchs
25
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/string/firstLower.ts
2
+ function firstLower(str) {
3
+ return str.slice(0, 1).toLowerCase() + str.slice(1);
4
+ }
5
+
6
+
7
+
8
+ exports.firstLower = firstLower;
@@ -0,0 +1,23 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/array/asyncMergeArray.ts
2
+ function asyncMergeArray(arr, callback) {
3
+ return new Promise((resolve, reject) => {
4
+ let index = 0;
5
+ const k = arr.length;
6
+ arr.forEach((...a) => {
7
+ callback(
8
+ (...arr2) => {
9
+ index++;
10
+ if (k == index) {
11
+ resolve(arr2);
12
+ }
13
+ },
14
+ reject,
15
+ ...a
16
+ );
17
+ });
18
+ });
19
+ }
20
+
21
+
22
+
23
+ exports.asyncMergeArray = asyncMergeArray;
@@ -0,0 +1,16 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkOQL4GIEJcjs = require('./chunk-OQL4GIEJ.cjs');
4
+
5
+ // packages/name/lineToLargeHump.ts
6
+ function lineToLargeHump(name) {
7
+ let arr = name.split("-");
8
+ arr = arr.map((vs) => {
9
+ return _chunkOQL4GIEJcjs.firstUpper.call(void 0, vs);
10
+ });
11
+ return arr.join("");
12
+ }
13
+
14
+
15
+
16
+ exports.lineToLargeHump = lineToLargeHump;
@@ -0,0 +1,15 @@
1
+ import {
2
+ getImportUrl
3
+ } from "./chunk-AWC672JW.js";
4
+
5
+ // packages/urls/getImportUrlSuffix.ts
6
+ function getImportUrlSuffix(url, imp) {
7
+ return getImportUrl(url, imp).replace(
8
+ /\.([a-z|A-Z]+)$/,
9
+ ""
10
+ );
11
+ }
12
+
13
+ export {
14
+ getImportUrlSuffix
15
+ };
@@ -0,0 +1,16 @@
1
+ import {
2
+ firstUpper
3
+ } from "./chunk-EWJJKQIO.js";
4
+
5
+ // packages/name/lineToLargeHump.ts
6
+ function lineToLargeHump(name) {
7
+ let arr = name.split("-");
8
+ arr = arr.map((vs) => {
9
+ return firstUpper(vs);
10
+ });
11
+ return arr.join("");
12
+ }
13
+
14
+ export {
15
+ lineToLargeHump
16
+ };
@@ -0,0 +1,15 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkWI55O3IVcjs = require('./chunk-WI55O3IV.cjs');
4
+
5
+
6
+ var _chunkUEVMS6QDcjs = require('./chunk-UEVMS6QD.cjs');
7
+
8
+ // packages/name/lineToSmallHump.ts
9
+ function lineToSmallHump(name) {
10
+ return _chunkUEVMS6QDcjs.firstLower.call(void 0, _chunkWI55O3IVcjs.lineToLargeHump.call(void 0, name));
11
+ }
12
+
13
+
14
+
15
+ exports.lineToSmallHump = lineToSmallHump;
@@ -0,0 +1,23 @@
1
+ // packages/basic/array/asyncMergeArray.ts
2
+ function asyncMergeArray(arr, callback) {
3
+ return new Promise((resolve, reject) => {
4
+ let index = 0;
5
+ const k = arr.length;
6
+ arr.forEach((...a) => {
7
+ callback(
8
+ (...arr2) => {
9
+ index++;
10
+ if (k == index) {
11
+ resolve(arr2);
12
+ }
13
+ },
14
+ reject,
15
+ ...a
16
+ );
17
+ });
18
+ });
19
+ }
20
+
21
+ export {
22
+ asyncMergeArray
23
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/judge/matchsEnd.ts
2
+ function matchsEnd(key, matchs) {
3
+ if (matchs && matchs.length > 0) {
4
+ for (const value of matchs) {
5
+ if (typeof value == "string") {
6
+ if (key.endsWith(value)) {
7
+ return true;
8
+ }
9
+ } else {
10
+ if (value.test(key)) {
11
+ return true;
12
+ }
13
+ }
14
+ }
15
+ return false;
16
+ } else {
17
+ return true;
18
+ }
19
+ }
20
+
21
+
22
+
23
+ exports.matchsEnd = matchsEnd;
@@ -0,0 +1,23 @@
1
+ // packages/judge/matchsEnd.ts
2
+ function matchsEnd(key, matchs) {
3
+ if (matchs && matchs.length > 0) {
4
+ for (const value of matchs) {
5
+ if (typeof value == "string") {
6
+ if (key.endsWith(value)) {
7
+ return true;
8
+ }
9
+ } else {
10
+ if (value.test(key)) {
11
+ return true;
12
+ }
13
+ }
14
+ }
15
+ return false;
16
+ } else {
17
+ return true;
18
+ }
19
+ }
20
+
21
+ export {
22
+ matchsEnd
23
+ };
@@ -0,0 +1,9 @@
1
+ // packages/urls/getUrlCatalogue.ts
2
+ function getUrlCatalogue(str) {
3
+ const reg = /((\\|\/)([^\\|\/]+)(\.[a-z|A-Z]+))$/g;
4
+ return str.replace(reg, "");
5
+ }
6
+
7
+ export {
8
+ getUrlCatalogue
9
+ };
@@ -0,0 +1,28 @@
1
+ import {
2
+ matchs
3
+ } from "./chunk-T2QKEABG.js";
4
+ import {
5
+ matchsEnd
6
+ } from "./chunk-YNOFNHEK.js";
7
+ import {
8
+ matchsStart
9
+ } from "./chunk-S6JRKYPY.js";
10
+ import {
11
+ matchsWhole
12
+ } from "./chunk-IRGCP7KH.js";
13
+ import {
14
+ __export
15
+ } from "./chunk-UICA3PK6.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
+ };
@@ -0,0 +1,25 @@
1
+ import {
2
+ appearNum
3
+ } from "./chunk-SNABGVNO.js";
4
+ import {
5
+ appearNumSeat
6
+ } from "./chunk-DMZP4RPN.js";
7
+ import {
8
+ getStartSames
9
+ } from "./chunk-A276ZDLP.js";
10
+
11
+ // packages/urls/getReplaceUrl.ts
12
+ function getReplaceUrl(url, add) {
13
+ const reg = /[\\|\/]/g;
14
+ const arr = getStartSames(url, add);
15
+ const uz = appearNumSeat(
16
+ arr[1],
17
+ reg,
18
+ appearNum(arr[2], reg) + 1
19
+ );
20
+ return add + arr[1].substring(uz);
21
+ }
22
+
23
+ export {
24
+ getReplaceUrl
25
+ };
@@ -0,0 +1,18 @@
1
+ // packages/basic/array/duplicateRemoval.ts
2
+ function duplicateRemoval(arr, key) {
3
+ const ks = [];
4
+ const arrs = [];
5
+ for (let index = 0; index < arr.length; index++) {
6
+ const element = arr[index];
7
+ const v = element[key];
8
+ if (!ks.includes(v)) {
9
+ ks.push(v);
10
+ arrs.push(arr[index]);
11
+ }
12
+ }
13
+ return arrs;
14
+ }
15
+
16
+ export {
17
+ duplicateRemoval
18
+ };