@fangzhongya/utils 0.0.5 → 0.0.6-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 (166) hide show
  1. package/dist/basic/array/index.cjs +3 -3
  2. package/dist/basic/array/index.d.ts +1 -1
  3. package/dist/basic/array/index.js +4 -4
  4. package/dist/basic/index.cjs +15 -9
  5. package/dist/basic/index.d.ts +11 -5
  6. package/dist/basic/index.js +16 -10
  7. package/dist/basic/object/index.cjs +4 -4
  8. package/dist/basic/object/index.d.ts +2 -1
  9. package/dist/basic/object/index.js +5 -5
  10. package/dist/basic/object/mergeObject.cjs +2 -6
  11. package/dist/basic/object/mergeObject.d.ts +1 -19
  12. package/dist/basic/object/mergeObject.js +3 -7
  13. package/dist/basic/object/unmergeObject.cjs +7 -0
  14. package/dist/basic/object/unmergeObject.d.ts +11 -0
  15. package/dist/basic/object/unmergeObject.js +7 -0
  16. package/dist/basic/string/appearNum.cjs +7 -0
  17. package/dist/basic/string/appearNum.d.ts +9 -0
  18. package/dist/basic/string/appearNum.js +7 -0
  19. package/dist/basic/string/appearNumSeat.cjs +7 -0
  20. package/dist/basic/string/appearNumSeat.d.ts +9 -0
  21. package/dist/basic/string/appearNumSeat.js +7 -0
  22. package/dist/basic/string/firstLower.cjs +7 -0
  23. package/dist/basic/string/firstLower.d.ts +8 -0
  24. package/dist/basic/string/firstLower.js +7 -0
  25. package/dist/basic/string/firstUpper.cjs +7 -0
  26. package/dist/basic/string/firstUpper.d.ts +8 -0
  27. package/dist/basic/string/firstUpper.js +7 -0
  28. package/dist/basic/string/getStartSame.cjs +7 -0
  29. package/dist/basic/string/getStartSame.d.ts +6 -0
  30. package/dist/basic/string/getStartSame.js +7 -0
  31. package/dist/basic/string/getStartSames.cjs +7 -0
  32. package/dist/basic/string/getStartSames.d.ts +6 -0
  33. package/dist/basic/string/getStartSames.js +7 -0
  34. package/dist/basic/string/index.cjs +19 -3
  35. package/dist/basic/string/index.d.ts +6 -1
  36. package/dist/basic/string/index.js +22 -6
  37. package/dist/chunk-2B742V22.cjs +19 -0
  38. package/dist/chunk-2BY5RQHU.cjs +23 -0
  39. package/dist/chunk-2PY55D6T.js +16 -0
  40. package/dist/chunk-3HXQ7TGV.cjs +14 -0
  41. package/dist/chunk-3OME5O5G.cjs +16 -0
  42. package/dist/chunk-3VYRYSWK.cjs +49 -0
  43. package/dist/chunk-4OBNLDTJ.js +8 -0
  44. package/dist/chunk-6ADW34CB.cjs +32 -0
  45. package/dist/chunk-6RIGEV6G.cjs +25 -0
  46. package/dist/chunk-7DTHADVK.js +18 -0
  47. package/dist/chunk-A276ZDLP.js +19 -0
  48. package/dist/chunk-A6J46LQK.js +49 -0
  49. package/dist/{chunk-ED5PJTG5.js → chunk-AP2GHAT5.js} +3 -3
  50. package/dist/chunk-AS3WKQP7.js +21 -0
  51. package/dist/chunk-DILKJQYV.cjs +9 -0
  52. package/dist/chunk-DMZP4RPN.js +23 -0
  53. package/dist/chunk-EWJJKQIO.js +8 -0
  54. package/dist/chunk-FESWCW7T.js +38 -0
  55. package/dist/chunk-FRGDQOX4.js +25 -0
  56. package/dist/{chunk-JNC5JEFB.cjs → chunk-FXMA7ZCM.cjs} +2 -2
  57. package/dist/chunk-G3AKL6ST.js +32 -0
  58. package/dist/chunk-G3VPA4AU.cjs +36 -0
  59. package/dist/chunk-G6FL4SSB.js +15 -0
  60. package/dist/chunk-IMCJXCTH.cjs +21 -0
  61. package/dist/chunk-IRGCP7KH.js +23 -0
  62. package/dist/{chunk-DEENZC5X.js → chunk-J7CICTHH.js} +3 -11
  63. package/dist/chunk-J7S3KBHL.cjs +18 -0
  64. package/dist/chunk-JR6ZN6QD.cjs +23 -0
  65. package/dist/chunk-JSU6KHXP.cjs +38 -0
  66. package/dist/chunk-K6C3XTTI.cjs +24 -0
  67. package/dist/chunk-L45SIOB3.js +32 -0
  68. package/dist/chunk-LCS7IWP7.js +36 -0
  69. package/dist/chunk-LFC6RYSS.js +21 -0
  70. package/dist/{chunk-BEQYORII.cjs → chunk-LTVXRDTD.cjs} +3 -11
  71. package/dist/{chunk-AZNBYC7K.js → chunk-MAIGGOA4.js} +4 -4
  72. package/dist/chunk-NGQKVTCR.cjs +25 -0
  73. package/dist/chunk-NRJPCN4J.cjs +46 -0
  74. package/dist/chunk-O3RJ5M35.js +19 -0
  75. package/dist/chunk-O6GUK5PL.cjs +15 -0
  76. package/dist/chunk-OQL4GIEJ.cjs +8 -0
  77. package/dist/chunk-P3YVE7JK.cjs +21 -0
  78. package/dist/chunk-PW7RP73J.cjs +19 -0
  79. package/dist/{chunk-YZULJRHH.cjs → chunk-R7G5MSGO.cjs} +4 -4
  80. package/dist/chunk-RD4EP3M5.js +46 -0
  81. package/dist/chunk-S6JRKYPY.js +23 -0
  82. package/dist/chunk-SNABGVNO.js +14 -0
  83. package/dist/chunk-UEVMS6QD.cjs +8 -0
  84. package/dist/chunk-UL24YTNH.cjs +32 -0
  85. package/dist/chunk-V3AYCU2W.js +28 -0
  86. package/dist/chunk-VHMUSGCJ.js +21 -0
  87. package/dist/{chunk-P33DGEQL.js → chunk-XR6JKJYY.js} +5 -5
  88. package/dist/chunk-YGJOBIEO.cjs +23 -0
  89. package/dist/chunk-YK7WI6H7.cjs +21 -0
  90. package/dist/chunk-YNOFNHEK.js +23 -0
  91. package/dist/chunk-ZEXHP7HI.js +9 -0
  92. package/dist/chunk-ZLCUSADU.cjs +28 -0
  93. package/dist/chunk-ZRZ5HATA.js +25 -0
  94. package/dist/chunk-ZZEFL2TE.cjs +23 -0
  95. package/dist/index-0803eaeb.d.ts +13 -0
  96. package/dist/index-2f319b8a.d.ts +22 -0
  97. package/dist/{index-5c5bf158.d.ts → index-3062a21e.d.ts} +2 -3
  98. package/dist/index-445fe401.d.ts +19 -0
  99. package/dist/index-48710eab.d.ts +22 -0
  100. package/dist/{index-6be6487f.d.ts → index-f6dfebab.d.ts} +1 -1
  101. package/dist/index-f8e894a2.d.ts +25 -0
  102. package/dist/index.cjs +41 -9
  103. package/dist/index.d.ts +29 -6
  104. package/dist/index.js +41 -9
  105. package/dist/judge/index.cjs +20 -0
  106. package/dist/judge/index.d.ts +4 -0
  107. package/dist/judge/index.js +20 -0
  108. package/dist/judge/matchs.cjs +10 -0
  109. package/dist/judge/matchs.d.ts +3 -0
  110. package/dist/judge/matchs.js +10 -0
  111. package/dist/judge/matchsEnd.cjs +7 -0
  112. package/dist/judge/matchsEnd.d.ts +3 -0
  113. package/dist/judge/matchsEnd.js +7 -0
  114. package/dist/judge/matchsStart.cjs +7 -0
  115. package/dist/judge/matchsStart.d.ts +3 -0
  116. package/dist/judge/matchsStart.js +7 -0
  117. package/dist/judge/matchsWhole.cjs +7 -0
  118. package/dist/judge/matchsWhole.d.ts +3 -0
  119. package/dist/judge/matchsWhole.js +7 -0
  120. package/dist/name/getComponentNames.cjs +12 -0
  121. package/dist/name/getComponentNames.d.ts +8 -0
  122. package/dist/name/getComponentNames.js +12 -0
  123. package/dist/name/getNames.cjs +12 -0
  124. package/dist/name/getNames.d.ts +8 -0
  125. package/dist/name/getNames.js +12 -0
  126. package/dist/name/humpToLine.cjs +7 -0
  127. package/dist/name/humpToLine.d.ts +8 -0
  128. package/dist/name/humpToLine.js +7 -0
  129. package/dist/name/index.cjs +26 -0
  130. package/dist/name/index.d.ts +5 -0
  131. package/dist/name/index.js +26 -0
  132. package/dist/name/lineToLargeHump.cjs +8 -0
  133. package/dist/name/lineToLargeHump.d.ts +8 -0
  134. package/dist/name/lineToLargeHump.js +8 -0
  135. package/dist/name/lineToSmallHump.cjs +9 -0
  136. package/dist/name/lineToSmallHump.d.ts +8 -0
  137. package/dist/name/lineToSmallHump.js +9 -0
  138. package/dist/urls/getImportUrl.cjs +8 -0
  139. package/dist/urls/getImportUrl.d.ts +9 -0
  140. package/dist/urls/getImportUrl.js +8 -0
  141. package/dist/urls/getImportUrlSuffix.cjs +9 -0
  142. package/dist/urls/getImportUrlSuffix.d.ts +9 -0
  143. package/dist/urls/getImportUrlSuffix.js +9 -0
  144. package/dist/urls/getReplaceUrl.cjs +10 -0
  145. package/dist/urls/getReplaceUrl.d.ts +8 -0
  146. package/dist/urls/getReplaceUrl.js +10 -0
  147. package/dist/urls/getUrlCatalogue.cjs +7 -0
  148. package/dist/urls/getUrlCatalogue.d.ts +8 -0
  149. package/dist/urls/getUrlCatalogue.js +7 -0
  150. package/dist/urls/getUrlCatalogueObj.cjs +7 -0
  151. package/dist/urls/getUrlCatalogueObj.d.ts +13 -0
  152. package/dist/urls/getUrlCatalogueObj.js +7 -0
  153. package/dist/urls/index.cjs +27 -0
  154. package/dist/urls/index.d.ts +5 -0
  155. package/dist/urls/index.js +27 -0
  156. package/package.json +157 -34
  157. package/dist/basic/string/index2.cjs +0 -11
  158. package/dist/basic/string/index2.d.ts +0 -20
  159. package/dist/basic/string/index2.js +0 -11
  160. package/dist/chunk-4PBAZ73I.cjs +0 -20
  161. package/dist/chunk-J53DPBUN.cjs +0 -24
  162. package/dist/chunk-LYFX6BGT.js +0 -129
  163. package/dist/chunk-VAYHA5HS.cjs +0 -129
  164. package/dist/chunk-YYNHNLVW.js +0 -20
  165. package/dist/index-5691335a.d.ts +0 -14
  166. package/dist/index-8abebe13.d.ts +0 -13
@@ -0,0 +1,8 @@
1
+ // packages/basic/string/firstLower.ts
2
+ function firstLower(str) {
3
+ return str.slice(0, 1).toLowerCase() + str.slice(1);
4
+ }
5
+
6
+ export {
7
+ firstLower
8
+ };
@@ -0,0 +1,32 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkO6GUK5PLcjs = require('./chunk-O6GUK5PL.cjs');
4
+
5
+
6
+ var _chunkYK7WI6H7cjs = require('./chunk-YK7WI6H7.cjs');
7
+
8
+
9
+ var _chunk6RIGEV6Gcjs = require('./chunk-6RIGEV6G.cjs');
10
+
11
+
12
+ var _chunkDILKJQYVcjs = require('./chunk-DILKJQYV.cjs');
13
+
14
+
15
+ var _chunkP3YVE7JKcjs = require('./chunk-P3YVE7JK.cjs');
16
+
17
+
18
+ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
19
+
20
+ // packages/urls/index.ts
21
+ var urls_exports = {};
22
+ _chunk5AZGAKWRcjs.__export.call(void 0, urls_exports, {
23
+ getImportUrl: () => _chunkYK7WI6H7cjs.getImportUrl,
24
+ getImportUrlSuffix: () => _chunkO6GUK5PLcjs.getImportUrlSuffix,
25
+ getReplaceUrl: () => _chunk6RIGEV6Gcjs.getReplaceUrl,
26
+ getUrlCatalogue: () => _chunkDILKJQYVcjs.getUrlCatalogue,
27
+ getUrlCatalogueObj: () => _chunkP3YVE7JKcjs.getUrlCatalogueObj
28
+ });
29
+
30
+
31
+
32
+ exports.urls_exports = urls_exports;
@@ -0,0 +1,25 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunk3HXQ7TGVcjs = require('./chunk-3HXQ7TGV.cjs');
4
+
5
+
6
+ var _chunkJR6ZN6QDcjs = require('./chunk-JR6ZN6QD.cjs');
7
+
8
+
9
+ var _chunkPW7RP73Jcjs = require('./chunk-PW7RP73J.cjs');
10
+
11
+ // packages/urls/getReplaceUrl.ts
12
+ function getReplaceUrl(url, add) {
13
+ const reg = /[\\|\/]/g;
14
+ const arr = _chunkPW7RP73Jcjs.getStartSames.call(void 0, url, add);
15
+ const uz = _chunkJR6ZN6QDcjs.appearNumSeat.call(void 0,
16
+ arr[1],
17
+ reg,
18
+ _chunk3HXQ7TGVcjs.appearNum.call(void 0, arr[2], reg) + 1
19
+ );
20
+ return add + arr[1].substring(uz);
21
+ }
22
+
23
+
24
+
25
+ exports.getReplaceUrl = getReplaceUrl;
@@ -0,0 +1,18 @@
1
+ // 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
+ export {
17
+ getStartSame
18
+ };
@@ -0,0 +1,19 @@
1
+ // 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
+ export {
18
+ getStartSames
19
+ };
@@ -0,0 +1,49 @@
1
+ // packages/basic/object/unmergeObject.ts
2
+ function unmergeObject(a, b, j = 0, i) {
3
+ let c;
4
+ if (a instanceof Array) {
5
+ if (j > 0 && i) {
6
+ c = Object.assign([], a);
7
+ if (b instanceof Array) {
8
+ for (const v of b) {
9
+ if (!a.includes(v)) {
10
+ c.push(v);
11
+ }
12
+ }
13
+ } else {
14
+ if (!a.includes(b)) {
15
+ c.push(b);
16
+ }
17
+ }
18
+ } else {
19
+ c = b;
20
+ }
21
+ } else if (typeof a == "object") {
22
+ const cv = Object.prototype.toString.call(a);
23
+ const ct = Object.prototype.toString.call(b);
24
+ if (a && typeof b == "object" && cv == ct && j > 0) {
25
+ c = { ...a };
26
+ const n = j - 1;
27
+ if (n > 0) {
28
+ for (const key in b) {
29
+ const v = a[key];
30
+ const t = b[key];
31
+ c[key] = unmergeObject(v, t, n, i);
32
+ }
33
+ } else {
34
+ for (const key in b) {
35
+ c[key] = b[key];
36
+ }
37
+ }
38
+ } else {
39
+ c = b;
40
+ }
41
+ } else {
42
+ c = b;
43
+ }
44
+ return c;
45
+ }
46
+
47
+ export {
48
+ unmergeObject
49
+ };
@@ -1,10 +1,10 @@
1
- import {
2
- isArray
3
- } from "./chunk-5PX3AFSC.js";
4
1
  import {
5
2
  firstLower,
6
3
  toggleArray
7
4
  } from "./chunk-OX5EXWS2.js";
5
+ import {
6
+ isArray
7
+ } from "./chunk-5PX3AFSC.js";
8
8
  import {
9
9
  __export
10
10
  } from "./chunk-UICA3PK6.js";
@@ -0,0 +1,21 @@
1
+ // 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
+ export {
20
+ getUrlCatalogueObj
21
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/urls/getUrlCatalogue.ts
2
+ function getUrlCatalogue(str) {
3
+ const reg = /((\\|\/)([^\\|\/]+)(\.[a-z|A-Z]+))$/g;
4
+ return str.replace(reg, "");
5
+ }
6
+
7
+
8
+
9
+ exports.getUrlCatalogue = getUrlCatalogue;
@@ -0,0 +1,23 @@
1
+ // 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
+ export {
22
+ appearNumSeat
23
+ };
@@ -0,0 +1,8 @@
1
+ // packages/basic/string/firstUpper.ts
2
+ function firstUpper(str) {
3
+ return str.slice(0, 1).toUpperCase() + str.slice(1);
4
+ }
5
+
6
+ export {
7
+ firstUpper
8
+ };
@@ -0,0 +1,38 @@
1
+ import {
2
+ humpToLine
3
+ } from "./chunk-J7CICTHH.js";
4
+ import {
5
+ lineToLargeHump
6
+ } from "./chunk-2PY55D6T.js";
7
+ import {
8
+ lineToSmallHump
9
+ } from "./chunk-O3RJ5M35.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,25 @@
1
+ import {
2
+ matchsStart
3
+ } from "./chunk-S6JRKYPY.js";
4
+ import {
5
+ matchsWhole
6
+ } from "./chunk-IRGCP7KH.js";
7
+ import {
8
+ matchsEnd
9
+ } from "./chunk-YNOFNHEK.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
+ };
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkISHLY7WMcjs = require('./chunk-ISHLY7WM.cjs');
4
3
 
4
+ var _chunkBL4KF5G4cjs = require('./chunk-BL4KF5G4.cjs');
5
5
 
6
6
 
7
- var _chunkBL4KF5G4cjs = require('./chunk-BL4KF5G4.cjs');
7
+ var _chunkISHLY7WMcjs = require('./chunk-ISHLY7WM.cjs');
8
8
 
9
9
 
10
10
  var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
@@ -0,0 +1,32 @@
1
+ import {
2
+ getComponentNames
3
+ } from "./chunk-FESWCW7T.js";
4
+ import {
5
+ getNames
6
+ } from "./chunk-VHMUSGCJ.js";
7
+ import {
8
+ humpToLine
9
+ } from "./chunk-J7CICTHH.js";
10
+ import {
11
+ lineToLargeHump
12
+ } from "./chunk-2PY55D6T.js";
13
+ import {
14
+ lineToSmallHump
15
+ } from "./chunk-O3RJ5M35.js";
16
+ import {
17
+ __export
18
+ } from "./chunk-UICA3PK6.js";
19
+
20
+ // packages/name/index.ts
21
+ var name_exports = {};
22
+ __export(name_exports, {
23
+ getComponentNames: () => getComponentNames,
24
+ getNames: () => getNames,
25
+ humpToLine: () => humpToLine,
26
+ lineToLargeHump: () => lineToLargeHump,
27
+ lineToSmallHump: () => lineToSmallHump
28
+ });
29
+
30
+ export {
31
+ name_exports
32
+ };
@@ -0,0 +1,36 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkJ7S3KBHLcjs = require('./chunk-J7S3KBHL.cjs');
4
+
5
+
6
+ var _chunkOQL4GIEJcjs = require('./chunk-OQL4GIEJ.cjs');
7
+
8
+
9
+ var _chunkUEVMS6QDcjs = require('./chunk-UEVMS6QD.cjs');
10
+
11
+
12
+ var _chunk3HXQ7TGVcjs = require('./chunk-3HXQ7TGV.cjs');
13
+
14
+
15
+ var _chunkJR6ZN6QDcjs = require('./chunk-JR6ZN6QD.cjs');
16
+
17
+
18
+ var _chunkPW7RP73Jcjs = require('./chunk-PW7RP73J.cjs');
19
+
20
+
21
+ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
22
+
23
+ // packages/basic/string/index.ts
24
+ var string_exports = {};
25
+ _chunk5AZGAKWRcjs.__export.call(void 0, string_exports, {
26
+ appearNum: () => _chunk3HXQ7TGVcjs.appearNum,
27
+ appearNumSeat: () => _chunkJR6ZN6QDcjs.appearNumSeat,
28
+ firstLower: () => _chunkUEVMS6QDcjs.firstLower,
29
+ firstUpper: () => _chunkOQL4GIEJcjs.firstUpper,
30
+ getStartSame: () => _chunkJ7S3KBHLcjs.getStartSame,
31
+ getStartSames: () => _chunkPW7RP73Jcjs.getStartSames
32
+ });
33
+
34
+
35
+
36
+ exports.string_exports = string_exports;
@@ -0,0 +1,15 @@
1
+ import {
2
+ getImportUrl
3
+ } from "./chunk-LFC6RYSS.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,21 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkLTVXRDTDcjs = require('./chunk-LTVXRDTD.cjs');
4
+
5
+
6
+ var _chunk3OME5O5Gcjs = require('./chunk-3OME5O5G.cjs');
7
+
8
+
9
+ var _chunk2B742V22cjs = require('./chunk-2B742V22.cjs');
10
+
11
+ // packages/name/getNames.ts
12
+ function getNames(name) {
13
+ const line = _chunkLTVXRDTDcjs.humpToLine.call(void 0, name);
14
+ const upper = _chunk3OME5O5Gcjs.lineToLargeHump.call(void 0, line);
15
+ const lower = _chunk2B742V22cjs.lineToSmallHump.call(void 0, upper);
16
+ return [line, upper, lower];
17
+ }
18
+
19
+
20
+
21
+ exports.getNames = getNames;
@@ -0,0 +1,23 @@
1
+ // packages/judge/matchsWhole.ts
2
+ function matchsWhole(key, matchs) {
3
+ if (matchs && matchs.length > 0) {
4
+ for (const value of matchs) {
5
+ if (typeof value == "string") {
6
+ if (key == 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
+ matchsWhole
23
+ };
@@ -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,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;
@@ -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 _chunk3OME5O5Gcjs = require('./chunk-3OME5O5G.cjs');
7
+
8
+
9
+ var _chunk2B742V22cjs = require('./chunk-2B742V22.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 = _chunk3OME5O5Gcjs.lineToLargeHump.call(void 0, line);
16
+ const lower = _chunk2B742V22cjs.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 = _chunk3OME5O5Gcjs.lineToLargeHump.call(void 0, line);
22
+ const lower = _chunk2B742V22cjs.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,24 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkG3VPA4AUcjs = require('./chunk-G3VPA4AU.cjs');
4
+
5
+
6
+ var _chunkR7G5MSGOcjs = require('./chunk-R7G5MSGO.cjs');
7
+
8
+
9
+ var _chunkFXMA7ZCMcjs = require('./chunk-FXMA7ZCM.cjs');
10
+
11
+
12
+ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
13
+
14
+ // packages/basic/index.ts
15
+ var basic_exports = {};
16
+ _chunk5AZGAKWRcjs.__export.call(void 0, basic_exports, {
17
+ array: () => _chunkFXMA7ZCMcjs.array_exports,
18
+ object: () => _chunkR7G5MSGOcjs.object_exports,
19
+ string: () => _chunkG3VPA4AUcjs.string_exports
20
+ });
21
+
22
+
23
+
24
+ exports.basic_exports = basic_exports;
@@ -0,0 +1,32 @@
1
+ import {
2
+ getImportUrlSuffix
3
+ } from "./chunk-G6FL4SSB.js";
4
+ import {
5
+ getImportUrl
6
+ } from "./chunk-LFC6RYSS.js";
7
+ import {
8
+ getReplaceUrl
9
+ } from "./chunk-ZRZ5HATA.js";
10
+ import {
11
+ getUrlCatalogue
12
+ } from "./chunk-ZEXHP7HI.js";
13
+ import {
14
+ getUrlCatalogueObj
15
+ } from "./chunk-AS3WKQP7.js";
16
+ import {
17
+ __export
18
+ } from "./chunk-UICA3PK6.js";
19
+
20
+ // packages/urls/index.ts
21
+ var urls_exports = {};
22
+ __export(urls_exports, {
23
+ getImportUrl: () => getImportUrl,
24
+ getImportUrlSuffix: () => getImportUrlSuffix,
25
+ getReplaceUrl: () => getReplaceUrl,
26
+ getUrlCatalogue: () => getUrlCatalogue,
27
+ getUrlCatalogueObj: () => getUrlCatalogueObj
28
+ });
29
+
30
+ export {
31
+ urls_exports
32
+ };
@@ -0,0 +1,36 @@
1
+ import {
2
+ getStartSame
3
+ } from "./chunk-7DTHADVK.js";
4
+ import {
5
+ firstUpper
6
+ } from "./chunk-EWJJKQIO.js";
7
+ import {
8
+ firstLower
9
+ } from "./chunk-4OBNLDTJ.js";
10
+ import {
11
+ appearNum
12
+ } from "./chunk-SNABGVNO.js";
13
+ import {
14
+ appearNumSeat
15
+ } from "./chunk-DMZP4RPN.js";
16
+ import {
17
+ getStartSames
18
+ } from "./chunk-A276ZDLP.js";
19
+ import {
20
+ __export
21
+ } from "./chunk-UICA3PK6.js";
22
+
23
+ // packages/basic/string/index.ts
24
+ var string_exports = {};
25
+ __export(string_exports, {
26
+ appearNum: () => appearNum,
27
+ appearNumSeat: () => appearNumSeat,
28
+ firstLower: () => firstLower,
29
+ firstUpper: () => firstUpper,
30
+ getStartSame: () => getStartSame,
31
+ getStartSames: () => getStartSames
32
+ });
33
+
34
+ export {
35
+ string_exports
36
+ };
@@ -0,0 +1,21 @@
1
+ import {
2
+ getStartSames
3
+ } from "./chunk-A276ZDLP.js";
4
+
5
+ // packages/urls/getImportUrl.ts
6
+ function getImportUrl(url, imp) {
7
+ const arr = getStartSames(url, imp);
8
+ const l = arr[1].split(/\\|\//).length - 1;
9
+ let ds = ["./"];
10
+ if (l > 0) {
11
+ ds = [];
12
+ for (let index = 0; index < l; index++) {
13
+ ds.push("../");
14
+ }
15
+ }
16
+ return ds.join("") + arr[2].replace(/\\/g, "/");
17
+ }
18
+
19
+ export {
20
+ getImportUrl
21
+ };