@fangzhongya/utils 0.0.4 → 0.0.6-1

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 (120) hide show
  1. package/dist/basic/array/index.cjs +7 -4
  2. package/dist/basic/array/index.d.ts +1 -1
  3. package/dist/basic/array/index.js +7 -4
  4. package/dist/basic/array/isArray.cjs +1 -0
  5. package/dist/basic/array/isArray.js +1 -0
  6. package/dist/basic/array/toggleArray.cjs +5 -2
  7. package/dist/basic/array/toggleArray.d.ts +8 -2
  8. package/dist/basic/array/toggleArray.js +4 -1
  9. package/dist/basic/index.cjs +13 -20
  10. package/dist/basic/index.d.ts +10 -5
  11. package/dist/basic/index.js +18 -25
  12. package/dist/basic/object/index.cjs +8 -3
  13. package/dist/basic/object/index.d.ts +1 -0
  14. package/dist/basic/object/index.js +8 -3
  15. package/dist/basic/object/isObject.cjs +1 -0
  16. package/dist/basic/object/isObject.js +1 -0
  17. package/dist/basic/object/mergeObject.cjs +3 -2
  18. package/dist/basic/object/mergeObject.js +2 -1
  19. package/dist/basic/object/unmergeObject.cjs +7 -0
  20. package/dist/basic/object/unmergeObject.d.ts +11 -0
  21. package/dist/basic/object/unmergeObject.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/index.cjs +5 -4
  29. package/dist/basic/string/index.d.ts +2 -1
  30. package/dist/basic/string/index.js +8 -7
  31. package/dist/chunk-2B742V22.cjs +19 -0
  32. package/dist/chunk-2PY55D6T.js +16 -0
  33. package/dist/chunk-34IFL7OR.js +24 -0
  34. package/dist/chunk-3OME5O5G.cjs +16 -0
  35. package/dist/chunk-3VYRYSWK.cjs +49 -0
  36. package/dist/chunk-3YPXLIH5.js +21 -0
  37. package/dist/chunk-4OBNLDTJ.js +8 -0
  38. package/dist/chunk-5AZGAKWR.cjs +9 -0
  39. package/dist/chunk-5VQ4EAJZ.cjs +33 -0
  40. package/dist/chunk-A6J46LQK.js +49 -0
  41. package/dist/chunk-AH7GPXDD.cjs +20 -0
  42. package/dist/chunk-AP2GHAT5.js +22 -0
  43. package/dist/{chunk-KRIX2OSK.cjs → chunk-BL4KF5G4.cjs} +5 -1
  44. package/dist/chunk-BRNROSJJ.cjs +24 -0
  45. package/dist/chunk-EWJJKQIO.js +8 -0
  46. package/dist/chunk-FXMA7ZCM.cjs +22 -0
  47. package/dist/chunk-HRECTLZO.js +20 -0
  48. package/dist/chunk-HVQG2IGJ.js +33 -0
  49. package/dist/{chunk-DEENZC5X.js → chunk-J7CICTHH.js} +3 -11
  50. package/dist/chunk-J7SPTSZM.cjs +16 -0
  51. package/dist/{chunk-BEQYORII.cjs → chunk-LTVXRDTD.cjs} +3 -11
  52. package/dist/chunk-MAIGGOA4.js +24 -0
  53. package/dist/chunk-MPKGL6EV.js +16 -0
  54. package/dist/chunk-N6OX2U6W.cjs +20 -0
  55. package/dist/chunk-NRJPCN4J.cjs +46 -0
  56. package/dist/chunk-O3RJ5M35.js +19 -0
  57. package/dist/chunk-OC2MRJDZ.cjs +21 -0
  58. package/dist/chunk-OQL4GIEJ.cjs +8 -0
  59. package/dist/{chunk-Z3GMPMGF.js → chunk-OX5EXWS2.js} +5 -1
  60. package/dist/chunk-PPEJX3ZH.js +20 -0
  61. package/dist/chunk-R7G5MSGO.cjs +24 -0
  62. package/dist/chunk-RD4EP3M5.js +46 -0
  63. package/dist/chunk-S7VMX72B.cjs +32 -0
  64. package/dist/chunk-TRLNJ6BO.cjs +38 -0
  65. package/dist/chunk-UEVMS6QD.cjs +8 -0
  66. package/dist/chunk-UICA3PK6.js +9 -0
  67. package/dist/chunk-W7OSG6B2.js +32 -0
  68. package/dist/chunk-YHBKZTYZ.js +38 -0
  69. package/dist/index-0cc6b278.d.ts +13 -0
  70. package/dist/index-24872dab.d.ts +13 -0
  71. package/dist/index-3062a21e.d.ts +16 -0
  72. package/dist/index-6be6487f.d.ts +15 -0
  73. package/dist/index-8925a102.d.ts +13 -0
  74. package/dist/index-ef15848a.d.ts +10 -0
  75. package/dist/index-f9cc2ca2.d.ts +22 -0
  76. package/dist/index.cjs +23 -19
  77. package/dist/index.d.ts +20 -5
  78. package/dist/index.js +29 -25
  79. package/dist/iss/index.cjs +2 -1
  80. package/dist/iss/index.js +2 -1
  81. package/dist/log/index.cjs +8 -0
  82. package/dist/log/index.d.ts +1 -0
  83. package/dist/log/index.js +8 -0
  84. package/dist/log/styleLog.cjs +7 -0
  85. package/dist/log/styleLog.d.ts +46 -0
  86. package/dist/log/styleLog.js +7 -0
  87. package/dist/name/getComponentNames.cjs +12 -0
  88. package/dist/name/getComponentNames.d.ts +8 -0
  89. package/dist/name/getComponentNames.js +12 -0
  90. package/dist/name/getNames.cjs +12 -0
  91. package/dist/name/getNames.d.ts +8 -0
  92. package/dist/name/getNames.js +12 -0
  93. package/dist/name/humpToLine.cjs +7 -0
  94. package/dist/name/humpToLine.d.ts +8 -0
  95. package/dist/name/humpToLine.js +7 -0
  96. package/dist/name/index.cjs +26 -0
  97. package/dist/name/index.d.ts +5 -0
  98. package/dist/name/index.js +26 -0
  99. package/dist/name/lineToLargeHump.cjs +8 -0
  100. package/dist/name/lineToLargeHump.d.ts +8 -0
  101. package/dist/name/lineToLargeHump.js +8 -0
  102. package/dist/name/lineToSmallHump.cjs +9 -0
  103. package/dist/name/lineToSmallHump.d.ts +8 -0
  104. package/dist/name/lineToSmallHump.js +9 -0
  105. package/package.json +100 -34
  106. package/dist/basic/string/index2.cjs +0 -10
  107. package/dist/basic/string/index2.d.ts +0 -20
  108. package/dist/basic/string/index2.js +0 -10
  109. package/dist/chunk-26S4B3P7.cjs +0 -42
  110. package/dist/chunk-4PCC2CMD.cjs +0 -1
  111. package/dist/chunk-5XHHUZZE.cjs +0 -1
  112. package/dist/chunk-EMPPRI5E.cjs +0 -1
  113. package/dist/chunk-F3UDXNR6.cjs +0 -1
  114. package/dist/chunk-J3FKWWZW.js +0 -0
  115. package/dist/chunk-LWHAS5EP.js +0 -42
  116. package/dist/chunk-OGMUZJ3Q.js +0 -0
  117. package/dist/chunk-PIZLEQ2W.js +0 -0
  118. package/dist/chunk-UDLHQNVY.js +0 -0
  119. package/dist/chunk-W25BSSSM.js +0 -0
  120. package/dist/chunk-WA2BUAMB.cjs +0 -1
@@ -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
+ };
@@ -0,0 +1,20 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkOQL4GIEJcjs = require('./chunk-OQL4GIEJ.cjs');
4
+
5
+
6
+ var _chunkUEVMS6QDcjs = require('./chunk-UEVMS6QD.cjs');
7
+
8
+
9
+ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
10
+
11
+ // packages/basic/string/index.ts
12
+ var string_exports = {};
13
+ _chunk5AZGAKWRcjs.__export.call(void 0, string_exports, {
14
+ firstLower: () => _chunkUEVMS6QDcjs.firstLower,
15
+ firstUpper: () => _chunkOQL4GIEJcjs.firstUpper
16
+ });
17
+
18
+
19
+
20
+ exports.string_exports = string_exports;
@@ -0,0 +1,22 @@
1
+ import {
2
+ firstLower,
3
+ toggleArray
4
+ } from "./chunk-OX5EXWS2.js";
5
+ import {
6
+ isArray
7
+ } from "./chunk-5PX3AFSC.js";
8
+ import {
9
+ __export
10
+ } from "./chunk-UICA3PK6.js";
11
+
12
+ // packages/basic/array/index.ts
13
+ var array_exports = {};
14
+ __export(array_exports, {
15
+ firstLower: () => firstLower,
16
+ isArray: () => isArray,
17
+ toggleArray: () => toggleArray
18
+ });
19
+
20
+ export {
21
+ array_exports
22
+ };
@@ -15,7 +15,11 @@ function toggleArray(objs, arr, id) {
15
15
  }
16
16
  return varr;
17
17
  }
18
+ function firstLower(vs) {
19
+ return vs.slice(0, 1).toLowerCase() + vs.slice(1);
20
+ }
21
+
18
22
 
19
23
 
20
24
 
21
- exports.toggleArray = toggleArray;
25
+ exports.toggleArray = toggleArray; exports.firstLower = firstLower;
@@ -0,0 +1,24 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkAH7GPXDDcjs = require('./chunk-AH7GPXDD.cjs');
4
+
5
+
6
+ var _chunkFXMA7ZCMcjs = require('./chunk-FXMA7ZCM.cjs');
7
+
8
+
9
+ var _chunkR7G5MSGOcjs = require('./chunk-R7G5MSGO.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: () => _chunkAH7GPXDDcjs.string_exports
20
+ });
21
+
22
+
23
+
24
+ exports.basic_exports = basic_exports;
@@ -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,22 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunkBL4KF5G4cjs = require('./chunk-BL4KF5G4.cjs');
5
+
6
+
7
+ var _chunkISHLY7WMcjs = require('./chunk-ISHLY7WM.cjs');
8
+
9
+
10
+ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
11
+
12
+ // packages/basic/array/index.ts
13
+ var array_exports = {};
14
+ _chunk5AZGAKWRcjs.__export.call(void 0, array_exports, {
15
+ firstLower: () => _chunkBL4KF5G4cjs.firstLower,
16
+ isArray: () => _chunkISHLY7WMcjs.isArray,
17
+ toggleArray: () => _chunkBL4KF5G4cjs.toggleArray
18
+ });
19
+
20
+
21
+
22
+ exports.array_exports = array_exports;
@@ -0,0 +1,20 @@
1
+ import {
2
+ isObject
3
+ } from "./chunk-WO6JQRTD.js";
4
+ import {
5
+ isArray
6
+ } from "./chunk-5PX3AFSC.js";
7
+ import {
8
+ __export
9
+ } from "./chunk-UICA3PK6.js";
10
+
11
+ // packages/iss/index.ts
12
+ var iss_exports = {};
13
+ __export(iss_exports, {
14
+ isArray: () => isArray,
15
+ isObject: () => isObject
16
+ });
17
+
18
+ export {
19
+ iss_exports
20
+ };
@@ -0,0 +1,33 @@
1
+ // packages/log/styleLog.ts
2
+ function styleLog(msg = "", obj) {
3
+ const arr = ["\x1B[0m"];
4
+ if (obj?.revert) {
5
+ arr.push("\x1B[4m");
6
+ }
7
+ if (obj?.lineThrough) {
8
+ arr.push("\x1B[9m");
9
+ }
10
+ if (obj?.italic) {
11
+ arr.push("\x1B[3m");
12
+ }
13
+ if (obj?.bold) {
14
+ arr.push("\x1B[1m");
15
+ }
16
+ if (obj?.bag) {
17
+ arr.push(`\x1B[4${obj?.bag}m`);
18
+ } else {
19
+ arr.push("\x1B[40m");
20
+ }
21
+ if (obj?.text) {
22
+ arr.push(`\x1B[3${obj?.text}m`);
23
+ } else {
24
+ arr.push("\x1B[30m");
25
+ }
26
+ arr.push(msg);
27
+ arr.push("\x1B[0m");
28
+ return arr.join("");
29
+ }
30
+
31
+ export {
32
+ styleLog
33
+ };
@@ -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,16 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunk5VQ4EAJZcjs = require('./chunk-5VQ4EAJZ.cjs');
4
+
5
+
6
+ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
7
+
8
+ // packages/log/index.ts
9
+ var log_exports = {};
10
+ _chunk5AZGAKWRcjs.__export.call(void 0, log_exports, {
11
+ styleLog: () => _chunk5VQ4EAJZcjs.styleLog
12
+ });
13
+
14
+
15
+
16
+ exports.log_exports = log_exports;
@@ -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,24 @@
1
+ import {
2
+ mergeObject
3
+ } from "./chunk-RD4EP3M5.js";
4
+ import {
5
+ unmergeObject
6
+ } from "./chunk-A6J46LQK.js";
7
+ import {
8
+ isObject
9
+ } from "./chunk-WO6JQRTD.js";
10
+ import {
11
+ __export
12
+ } from "./chunk-UICA3PK6.js";
13
+
14
+ // packages/basic/object/index.ts
15
+ var object_exports = {};
16
+ __export(object_exports, {
17
+ isObject: () => isObject,
18
+ mergeObject: () => mergeObject,
19
+ unmergeObject: () => unmergeObject
20
+ });
21
+
22
+ export {
23
+ object_exports
24
+ };
@@ -0,0 +1,16 @@
1
+ import {
2
+ styleLog
3
+ } from "./chunk-HVQG2IGJ.js";
4
+ import {
5
+ __export
6
+ } from "./chunk-UICA3PK6.js";
7
+
8
+ // packages/log/index.ts
9
+ var log_exports = {};
10
+ __export(log_exports, {
11
+ styleLog: () => styleLog
12
+ });
13
+
14
+ export {
15
+ log_exports
16
+ };
@@ -0,0 +1,20 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkXRGLFTH2cjs = require('./chunk-XRGLFTH2.cjs');
4
+
5
+
6
+ var _chunkISHLY7WMcjs = require('./chunk-ISHLY7WM.cjs');
7
+
8
+
9
+ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
10
+
11
+ // packages/iss/index.ts
12
+ var iss_exports = {};
13
+ _chunk5AZGAKWRcjs.__export.call(void 0, iss_exports, {
14
+ isArray: () => _chunkISHLY7WMcjs.isArray,
15
+ isObject: () => _chunkXRGLFTH2cjs.isObject
16
+ });
17
+
18
+
19
+
20
+ exports.iss_exports = iss_exports;
@@ -0,0 +1,46 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/object/mergeObject.ts
2
+ function mergeObject(a, b, j = 0, i) {
3
+ if (a instanceof Array) {
4
+ if (j > 0 && i) {
5
+ if (b instanceof Array) {
6
+ for (const v of b) {
7
+ if (!a.includes(v)) {
8
+ a.push(v);
9
+ }
10
+ }
11
+ } else {
12
+ if (!a.includes(b)) {
13
+ a.push(b);
14
+ }
15
+ }
16
+ } else {
17
+ a = b;
18
+ }
19
+ } else if (typeof a == "object") {
20
+ const cv = Object.prototype.toString.call(a);
21
+ const ct = Object.prototype.toString.call(b);
22
+ if (a && typeof b == "object" && cv == ct && j > 0) {
23
+ const n = j - 1;
24
+ if (n > 0) {
25
+ for (const key in b) {
26
+ const v = a[key];
27
+ const t = b[key];
28
+ a[key] = mergeObject(v, t, n, i);
29
+ }
30
+ } else {
31
+ for (const key in b) {
32
+ a[key] = b[key];
33
+ }
34
+ }
35
+ } else {
36
+ a = b;
37
+ }
38
+ } else {
39
+ a = b;
40
+ }
41
+ return a;
42
+ }
43
+
44
+
45
+
46
+ exports.mergeObject = mergeObject;
@@ -0,0 +1,19 @@
1
+ import {
2
+ firstUpper
3
+ } from "./chunk-EWJJKQIO.js";
4
+ import {
5
+ firstLower
6
+ } from "./chunk-4OBNLDTJ.js";
7
+
8
+ // packages/name/lineToSmallHump.ts
9
+ function lineToSmallHump(name) {
10
+ let arr = name.split("-");
11
+ arr = arr.map((vs) => {
12
+ return firstLower(vs);
13
+ });
14
+ return firstUpper(arr.join(""));
15
+ }
16
+
17
+ export {
18
+ lineToSmallHump
19
+ };
@@ -0,0 +1,21 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunk3OME5O5Gcjs = require('./chunk-3OME5O5G.cjs');
4
+
5
+
6
+ var _chunk2B742V22cjs = require('./chunk-2B742V22.cjs');
7
+
8
+
9
+ var _chunkLTVXRDTDcjs = require('./chunk-LTVXRDTD.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,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;
@@ -15,7 +15,11 @@ function toggleArray(objs, arr, id) {
15
15
  }
16
16
  return varr;
17
17
  }
18
+ function firstLower(vs) {
19
+ return vs.slice(0, 1).toLowerCase() + vs.slice(1);
20
+ }
18
21
 
19
22
  export {
20
- toggleArray
23
+ toggleArray,
24
+ firstLower
21
25
  };
@@ -0,0 +1,20 @@
1
+ import {
2
+ firstUpper
3
+ } from "./chunk-EWJJKQIO.js";
4
+ import {
5
+ firstLower
6
+ } from "./chunk-4OBNLDTJ.js";
7
+ import {
8
+ __export
9
+ } from "./chunk-UICA3PK6.js";
10
+
11
+ // packages/basic/string/index.ts
12
+ var string_exports = {};
13
+ __export(string_exports, {
14
+ firstLower: () => firstLower,
15
+ firstUpper: () => firstUpper
16
+ });
17
+
18
+ export {
19
+ string_exports
20
+ };
@@ -0,0 +1,24 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkNRJPCN4Jcjs = require('./chunk-NRJPCN4J.cjs');
4
+
5
+
6
+ var _chunk3VYRYSWKcjs = require('./chunk-3VYRYSWK.cjs');
7
+
8
+
9
+ var _chunkXRGLFTH2cjs = require('./chunk-XRGLFTH2.cjs');
10
+
11
+
12
+ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
13
+
14
+ // packages/basic/object/index.ts
15
+ var object_exports = {};
16
+ _chunk5AZGAKWRcjs.__export.call(void 0, object_exports, {
17
+ isObject: () => _chunkXRGLFTH2cjs.isObject,
18
+ mergeObject: () => _chunkNRJPCN4Jcjs.mergeObject,
19
+ unmergeObject: () => _chunk3VYRYSWKcjs.unmergeObject
20
+ });
21
+
22
+
23
+
24
+ exports.object_exports = object_exports;
@@ -0,0 +1,46 @@
1
+ // packages/basic/object/mergeObject.ts
2
+ function mergeObject(a, b, j = 0, i) {
3
+ if (a instanceof Array) {
4
+ if (j > 0 && i) {
5
+ if (b instanceof Array) {
6
+ for (const v of b) {
7
+ if (!a.includes(v)) {
8
+ a.push(v);
9
+ }
10
+ }
11
+ } else {
12
+ if (!a.includes(b)) {
13
+ a.push(b);
14
+ }
15
+ }
16
+ } else {
17
+ a = b;
18
+ }
19
+ } else if (typeof a == "object") {
20
+ const cv = Object.prototype.toString.call(a);
21
+ const ct = Object.prototype.toString.call(b);
22
+ if (a && typeof b == "object" && cv == ct && j > 0) {
23
+ const n = j - 1;
24
+ if (n > 0) {
25
+ for (const key in b) {
26
+ const v = a[key];
27
+ const t = b[key];
28
+ a[key] = mergeObject(v, t, n, i);
29
+ }
30
+ } else {
31
+ for (const key in b) {
32
+ a[key] = b[key];
33
+ }
34
+ }
35
+ } else {
36
+ a = b;
37
+ }
38
+ } else {
39
+ a = b;
40
+ }
41
+ return a;
42
+ }
43
+
44
+ export {
45
+ mergeObject
46
+ };
@@ -0,0 +1,32 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkTRLNJ6BOcjs = require('./chunk-TRLNJ6BO.cjs');
4
+
5
+
6
+ var _chunkOC2MRJDZcjs = require('./chunk-OC2MRJDZ.cjs');
7
+
8
+
9
+ var _chunk3OME5O5Gcjs = require('./chunk-3OME5O5G.cjs');
10
+
11
+
12
+ var _chunk2B742V22cjs = require('./chunk-2B742V22.cjs');
13
+
14
+
15
+ var _chunkLTVXRDTDcjs = require('./chunk-LTVXRDTD.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: () => _chunkTRLNJ6BOcjs.getComponentNames,
24
+ getNames: () => _chunkOC2MRJDZcjs.getNames,
25
+ humpToLine: () => _chunkLTVXRDTDcjs.humpToLine,
26
+ lineToLargeHump: () => _chunk3OME5O5Gcjs.lineToLargeHump,
27
+ lineToSmallHump: () => _chunk2B742V22cjs.lineToSmallHump
28
+ });
29
+
30
+
31
+
32
+ exports.name_exports = name_exports;
@@ -0,0 +1,38 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunk3OME5O5Gcjs = require('./chunk-3OME5O5G.cjs');
4
+
5
+
6
+ var _chunk2B742V22cjs = require('./chunk-2B742V22.cjs');
7
+
8
+
9
+ var _chunkLTVXRDTDcjs = require('./chunk-LTVXRDTD.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,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,9 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ export {
8
+ __export
9
+ };
@@ -0,0 +1,32 @@
1
+ import {
2
+ getComponentNames
3
+ } from "./chunk-YHBKZTYZ.js";
4
+ import {
5
+ getNames
6
+ } from "./chunk-3YPXLIH5.js";
7
+ import {
8
+ lineToLargeHump
9
+ } from "./chunk-2PY55D6T.js";
10
+ import {
11
+ lineToSmallHump
12
+ } from "./chunk-O3RJ5M35.js";
13
+ import {
14
+ humpToLine
15
+ } from "./chunk-J7CICTHH.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
+ };