@fangzhongya/utils 0.0.4 → 0.0.6

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 (77) hide show
  1. package/dist/basic/array/index.cjs +6 -3
  2. package/dist/basic/array/index.d.ts +1 -1
  3. package/dist/basic/array/index.js +5 -2
  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 +12 -20
  10. package/dist/basic/index.d.ts +9 -5
  11. package/dist/basic/index.js +17 -25
  12. package/dist/basic/object/index.cjs +8 -3
  13. package/dist/basic/object/index.d.ts +2 -1
  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/index.cjs +2 -1
  23. package/dist/basic/string/index.js +2 -1
  24. package/dist/basic/string/index2.cjs +1 -0
  25. package/dist/basic/string/index2.js +1 -0
  26. package/dist/chunk-3VYRYSWK.cjs +49 -0
  27. package/dist/chunk-4PBAZ73I.cjs +20 -0
  28. package/dist/chunk-5AZGAKWR.cjs +9 -0
  29. package/dist/chunk-5VQ4EAJZ.cjs +33 -0
  30. package/dist/chunk-75TBDXR6.js +24 -0
  31. package/dist/chunk-A6J46LQK.js +49 -0
  32. package/dist/{chunk-KRIX2OSK.cjs → chunk-BL4KF5G4.cjs} +5 -1
  33. package/dist/chunk-ED5PJTG5.js +22 -0
  34. package/dist/chunk-HRECTLZO.js +20 -0
  35. package/dist/chunk-HVQG2IGJ.js +33 -0
  36. package/dist/chunk-J7SPTSZM.cjs +16 -0
  37. package/dist/chunk-JNC5JEFB.cjs +22 -0
  38. package/dist/chunk-MAIGGOA4.js +24 -0
  39. package/dist/chunk-MPKGL6EV.js +16 -0
  40. package/dist/chunk-N6OX2U6W.cjs +20 -0
  41. package/dist/chunk-NRJPCN4J.cjs +46 -0
  42. package/dist/{chunk-Z3GMPMGF.js → chunk-OX5EXWS2.js} +5 -1
  43. package/dist/chunk-R7G5MSGO.cjs +24 -0
  44. package/dist/chunk-RD4EP3M5.js +46 -0
  45. package/dist/chunk-UICA3PK6.js +9 -0
  46. package/dist/chunk-YBUHXX5U.cjs +24 -0
  47. package/dist/chunk-YYNHNLVW.js +20 -0
  48. package/dist/index-24872dab.d.ts +13 -0
  49. package/dist/index-5691335a.d.ts +14 -0
  50. package/dist/index-56b2efa3.d.ts +13 -0
  51. package/dist/index-6be6487f.d.ts +15 -0
  52. package/dist/index-8473d4b5.d.ts +16 -0
  53. package/dist/index-ef15848a.d.ts +10 -0
  54. package/dist/index.cjs +16 -22
  55. package/dist/index.d.ts +13 -5
  56. package/dist/index.js +20 -26
  57. package/dist/iss/index.cjs +2 -1
  58. package/dist/iss/index.js +2 -1
  59. package/dist/log/index.cjs +8 -0
  60. package/dist/log/index.d.ts +1 -0
  61. package/dist/log/index.js +8 -0
  62. package/dist/log/styleLog.cjs +7 -0
  63. package/dist/log/styleLog.d.ts +46 -0
  64. package/dist/log/styleLog.js +7 -0
  65. package/package.json +65 -34
  66. package/dist/chunk-26S4B3P7.cjs +0 -42
  67. package/dist/chunk-4PCC2CMD.cjs +0 -1
  68. package/dist/chunk-5XHHUZZE.cjs +0 -1
  69. package/dist/chunk-EMPPRI5E.cjs +0 -1
  70. package/dist/chunk-F3UDXNR6.cjs +0 -1
  71. package/dist/chunk-J3FKWWZW.js +0 -0
  72. package/dist/chunk-LWHAS5EP.js +0 -42
  73. package/dist/chunk-OGMUZJ3Q.js +0 -0
  74. package/dist/chunk-PIZLEQ2W.js +0 -0
  75. package/dist/chunk-UDLHQNVY.js +0 -0
  76. package/dist/chunk-W25BSSSM.js +0 -0
  77. package/dist/chunk-WA2BUAMB.cjs +0 -1
@@ -1,11 +1,14 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-WA2BUAMB.cjs');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-JNC5JEFB.cjs');
2
2
 
3
3
 
4
4
  var _chunkISHLY7WMcjs = require('../../chunk-ISHLY7WM.cjs');
5
5
 
6
6
 
7
- var _chunkKRIX2OSKcjs = require('../../chunk-KRIX2OSK.cjs');
8
7
 
8
+ var _chunkBL4KF5G4cjs = require('../../chunk-BL4KF5G4.cjs');
9
+ require('../../chunk-5AZGAKWR.cjs');
9
10
 
10
11
 
11
- exports.isArray = _chunkISHLY7WMcjs.isArray; exports.toggleArray = _chunkKRIX2OSKcjs.toggleArray;
12
+
13
+
14
+ exports.firstLower = _chunkBL4KF5G4cjs.firstLower; exports.isArray = _chunkISHLY7WMcjs.isArray; exports.toggleArray = _chunkBL4KF5G4cjs.toggleArray;
@@ -1,2 +1,2 @@
1
1
  export { isArray } from './isArray.js';
2
- export { toggleArray } from './toggleArray.js';
2
+ export { firstLower, toggleArray } from './toggleArray.js';
@@ -1,11 +1,14 @@
1
- import "../../chunk-J3FKWWZW.js";
1
+ import "../../chunk-ED5PJTG5.js";
2
2
  import {
3
3
  isArray
4
4
  } from "../../chunk-5PX3AFSC.js";
5
5
  import {
6
+ firstLower,
6
7
  toggleArray
7
- } from "../../chunk-Z3GMPMGF.js";
8
+ } from "../../chunk-OX5EXWS2.js";
9
+ import "../../chunk-UICA3PK6.js";
8
10
  export {
11
+ firstLower,
9
12
  isArray,
10
13
  toggleArray
11
14
  };
@@ -1,6 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
  var _chunkISHLY7WMcjs = require('../../chunk-ISHLY7WM.cjs');
4
+ require('../../chunk-5AZGAKWR.cjs');
4
5
 
5
6
 
6
7
  exports.isArray = _chunkISHLY7WMcjs.isArray;
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  isArray
3
3
  } from "../../chunk-5PX3AFSC.js";
4
+ import "../../chunk-UICA3PK6.js";
4
5
  export {
5
6
  isArray
6
7
  };
@@ -1,6 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkKRIX2OSKcjs = require('../../chunk-KRIX2OSK.cjs');
4
3
 
4
+ var _chunkBL4KF5G4cjs = require('../../chunk-BL4KF5G4.cjs');
5
+ require('../../chunk-5AZGAKWR.cjs');
5
6
 
6
- exports.toggleArray = _chunkKRIX2OSKcjs.toggleArray;
7
+
8
+
9
+ exports.firstLower = _chunkBL4KF5G4cjs.firstLower; exports.toggleArray = _chunkBL4KF5G4cjs.toggleArray;
@@ -6,6 +6,12 @@ interface Objunkn {
6
6
  * @param {*} objs
7
7
  * @param {*} id
8
8
  */
9
- declare function toggleArray(objs: Array<Objunkn>, arr: Objunkn, id: string): Array<Objunkn>;
9
+ declare function toggleArray(objs: Array<Objunkn>, arr: Objunkn, id: string): Array<Objunkn>;
10
+ /**
11
+ * 首字母小写
12
+ * @param {string} vs
13
+ * @returns string
14
+ */
15
+ declare function firstLower(vs: string): string;
10
16
 
11
- export { toggleArray };
17
+ export { firstLower, toggleArray };
@@ -1,6 +1,9 @@
1
1
  import {
2
+ firstLower,
2
3
  toggleArray
3
- } from "../../chunk-Z3GMPMGF.js";
4
+ } from "../../chunk-OX5EXWS2.js";
5
+ import "../../chunk-UICA3PK6.js";
4
6
  export {
7
+ firstLower,
5
8
  toggleArray
6
9
  };
@@ -1,30 +1,22 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-F3UDXNR6.cjs');
2
- require('../chunk-4PCC2CMD.cjs');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-YBUHXX5U.cjs');
3
2
 
4
3
 
5
- var _chunk26S4B3P7cjs = require('../chunk-26S4B3P7.cjs');
4
+ var _chunkR7G5MSGOcjs = require('../chunk-R7G5MSGO.cjs');
5
+ require('../chunk-NRJPCN4J.cjs');
6
+ require('../chunk-3VYRYSWK.cjs');
6
7
 
7
8
 
8
- var _chunkXRGLFTH2cjs = require('../chunk-XRGLFTH2.cjs');
9
- require('../chunk-WA2BUAMB.cjs');
9
+ var _chunk4PBAZ73Icjs = require('../chunk-4PBAZ73I.cjs');
10
+ require('../chunk-BEQYORII.cjs');
11
+ require('../chunk-XRGLFTH2.cjs');
10
12
 
11
13
 
12
- var _chunkISHLY7WMcjs = require('../chunk-ISHLY7WM.cjs');
14
+ var _chunkJNC5JEFBcjs = require('../chunk-JNC5JEFB.cjs');
15
+ require('../chunk-ISHLY7WM.cjs');
16
+ require('../chunk-BL4KF5G4.cjs');
17
+ require('../chunk-5AZGAKWR.cjs');
13
18
 
14
19
 
15
- var _chunkKRIX2OSKcjs = require('../chunk-KRIX2OSK.cjs');
16
- require('../chunk-5XHHUZZE.cjs');
17
20
 
18
21
 
19
-
20
-
21
- var _chunkBEQYORIIcjs = require('../chunk-BEQYORII.cjs');
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
- exports.firstLower = _chunkBEQYORIIcjs.firstLower; exports.firstUpper = _chunkBEQYORIIcjs.firstUpper; exports.getNmaeBar = _chunkBEQYORIIcjs.getNmaeBar; exports.isArray = _chunkISHLY7WMcjs.isArray; exports.isObject = _chunkXRGLFTH2cjs.isObject; exports.mergeObject = _chunk26S4B3P7cjs.mergeObject; exports.toggleArray = _chunkKRIX2OSKcjs.toggleArray;
22
+ exports.array = _chunkJNC5JEFBcjs.array_exports; exports.object = _chunkR7G5MSGOcjs.object_exports; exports.string = _chunk4PBAZ73Icjs.string_exports;
@@ -1,5 +1,9 @@
1
- export { isArray } from './array/isArray.js';
2
- export { toggleArray } from './array/toggleArray.js';
3
- export { isObject } from './object/isObject.js';
4
- export { mergeObject } from './object/mergeObject.js';
5
- export { firstLower, firstUpper, getNmaeBar } from './string/index2.js';
1
+ export { i as array } from '../index-6be6487f.js';
2
+ export { i as object } from '../index-8473d4b5.js';
3
+ export { i as string } from '../index-5691335a.js';
4
+ import './array/isArray.js';
5
+ import './array/toggleArray.js';
6
+ import './object/mergeObject.js';
7
+ import './object/isObject.js';
8
+ import './object/unmergeObject.js';
9
+ import './string/index2.js';
@@ -1,30 +1,22 @@
1
- import "../chunk-W25BSSSM.js";
2
- import "../chunk-OGMUZJ3Q.js";
1
+ import "../chunk-75TBDXR6.js";
3
2
  import {
4
- mergeObject
5
- } from "../chunk-LWHAS5EP.js";
3
+ object_exports
4
+ } from "../chunk-MAIGGOA4.js";
5
+ import "../chunk-RD4EP3M5.js";
6
+ import "../chunk-A6J46LQK.js";
6
7
  import {
7
- isObject
8
- } from "../chunk-WO6JQRTD.js";
9
- import "../chunk-J3FKWWZW.js";
8
+ string_exports
9
+ } from "../chunk-YYNHNLVW.js";
10
+ import "../chunk-DEENZC5X.js";
11
+ import "../chunk-WO6JQRTD.js";
10
12
  import {
11
- isArray
12
- } from "../chunk-5PX3AFSC.js";
13
- import {
14
- toggleArray
15
- } from "../chunk-Z3GMPMGF.js";
16
- import "../chunk-PIZLEQ2W.js";
17
- import {
18
- firstLower,
19
- firstUpper,
20
- getNmaeBar
21
- } from "../chunk-DEENZC5X.js";
13
+ array_exports
14
+ } from "../chunk-ED5PJTG5.js";
15
+ import "../chunk-5PX3AFSC.js";
16
+ import "../chunk-OX5EXWS2.js";
17
+ import "../chunk-UICA3PK6.js";
22
18
  export {
23
- firstLower,
24
- firstUpper,
25
- getNmaeBar,
26
- isArray,
27
- isObject,
28
- mergeObject,
29
- toggleArray
19
+ array_exports as array,
20
+ object_exports as object,
21
+ string_exports as string
30
22
  };
@@ -1,12 +1,17 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-4PCC2CMD.cjs');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-R7G5MSGO.cjs');
2
2
 
3
3
 
4
- var _chunk26S4B3P7cjs = require('../../chunk-26S4B3P7.cjs');
4
+ var _chunkNRJPCN4Jcjs = require('../../chunk-NRJPCN4J.cjs');
5
+
6
+
7
+ var _chunk3VYRYSWKcjs = require('../../chunk-3VYRYSWK.cjs');
5
8
 
6
9
 
7
10
  var _chunkXRGLFTH2cjs = require('../../chunk-XRGLFTH2.cjs');
8
11
  require('../../chunk-ISHLY7WM.cjs');
12
+ require('../../chunk-5AZGAKWR.cjs');
13
+
9
14
 
10
15
 
11
16
 
12
- exports.isObject = _chunkXRGLFTH2cjs.isObject; exports.mergeObject = _chunk26S4B3P7cjs.mergeObject;
17
+ exports.isObject = _chunkXRGLFTH2cjs.isObject; exports.mergeObject = _chunkNRJPCN4Jcjs.mergeObject; exports.unmergeObject = _chunk3VYRYSWKcjs.unmergeObject;
@@ -1,2 +1,3 @@
1
- export { isObject } from './isObject.js';
2
1
  export { mergeObject } from './mergeObject.js';
2
+ export { isObject } from './isObject.js';
3
+ export { unmergeObject } from './unmergeObject.js';
@@ -1,12 +1,17 @@
1
- import "../../chunk-OGMUZJ3Q.js";
1
+ import "../../chunk-MAIGGOA4.js";
2
2
  import {
3
3
  mergeObject
4
- } from "../../chunk-LWHAS5EP.js";
4
+ } from "../../chunk-RD4EP3M5.js";
5
+ import {
6
+ unmergeObject
7
+ } from "../../chunk-A6J46LQK.js";
5
8
  import {
6
9
  isObject
7
10
  } from "../../chunk-WO6JQRTD.js";
8
11
  import "../../chunk-5PX3AFSC.js";
12
+ import "../../chunk-UICA3PK6.js";
9
13
  export {
10
14
  isObject,
11
- mergeObject
15
+ mergeObject,
16
+ unmergeObject
12
17
  };
@@ -2,6 +2,7 @@
2
2
 
3
3
  var _chunkXRGLFTH2cjs = require('../../chunk-XRGLFTH2.cjs');
4
4
  require('../../chunk-ISHLY7WM.cjs');
5
+ require('../../chunk-5AZGAKWR.cjs');
5
6
 
6
7
 
7
8
  exports.isObject = _chunkXRGLFTH2cjs.isObject;
@@ -2,6 +2,7 @@ import {
2
2
  isObject
3
3
  } from "../../chunk-WO6JQRTD.js";
4
4
  import "../../chunk-5PX3AFSC.js";
5
+ import "../../chunk-UICA3PK6.js";
5
6
  export {
6
7
  isObject
7
8
  };
@@ -1,6 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk26S4B3P7cjs = require('../../chunk-26S4B3P7.cjs');
3
+ var _chunkNRJPCN4Jcjs = require('../../chunk-NRJPCN4J.cjs');
4
+ require('../../chunk-5AZGAKWR.cjs');
4
5
 
5
6
 
6
- exports.mergeObject = _chunk26S4B3P7cjs.mergeObject;
7
+ exports.mergeObject = _chunkNRJPCN4Jcjs.mergeObject;
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  mergeObject
3
- } from "../../chunk-LWHAS5EP.js";
3
+ } from "../../chunk-RD4EP3M5.js";
4
+ import "../../chunk-UICA3PK6.js";
4
5
  export {
5
6
  mergeObject
6
7
  };
@@ -0,0 +1,7 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunk3VYRYSWKcjs = require('../../chunk-3VYRYSWK.cjs');
4
+ require('../../chunk-5AZGAKWR.cjs');
5
+
6
+
7
+ exports.unmergeObject = _chunk3VYRYSWKcjs.unmergeObject;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 合并两个对象的值
3
+ * @param a 合并到的对象
4
+ * @param b 合并对象
5
+ * @param j 合并级别
6
+ * @param i 是否合并数组
7
+ * @returns 合并的对象
8
+ */
9
+ declare function unmergeObject<T>(a: T, b: T, j?: number, i?: boolean): T;
10
+
11
+ export { unmergeObject };
@@ -0,0 +1,7 @@
1
+ import {
2
+ unmergeObject
3
+ } from "../../chunk-A6J46LQK.js";
4
+ import "../../chunk-UICA3PK6.js";
5
+ export {
6
+ unmergeObject
7
+ };
@@ -1,9 +1,10 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-5XHHUZZE.cjs');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-4PBAZ73I.cjs');
2
2
 
3
3
 
4
4
 
5
5
 
6
6
  var _chunkBEQYORIIcjs = require('../../chunk-BEQYORII.cjs');
7
+ require('../../chunk-5AZGAKWR.cjs');
7
8
 
8
9
 
9
10
 
@@ -1,9 +1,10 @@
1
- import "../../chunk-PIZLEQ2W.js";
1
+ import "../../chunk-YYNHNLVW.js";
2
2
  import {
3
3
  firstLower,
4
4
  firstUpper,
5
5
  getNmaeBar
6
6
  } from "../../chunk-DEENZC5X.js";
7
+ import "../../chunk-UICA3PK6.js";
7
8
  export {
8
9
  firstLower,
9
10
  firstUpper,
@@ -3,6 +3,7 @@
3
3
 
4
4
 
5
5
  var _chunkBEQYORIIcjs = require('../../chunk-BEQYORII.cjs');
6
+ require('../../chunk-5AZGAKWR.cjs');
6
7
 
7
8
 
8
9
 
@@ -3,6 +3,7 @@ import {
3
3
  firstUpper,
4
4
  getNmaeBar
5
5
  } from "../../chunk-DEENZC5X.js";
6
+ import "../../chunk-UICA3PK6.js";
6
7
  export {
7
8
  firstLower,
8
9
  firstUpper,
@@ -0,0 +1,49 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// 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
+
48
+
49
+ exports.unmergeObject = unmergeObject;
@@ -0,0 +1,20 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+ var _chunkBEQYORIIcjs = require('./chunk-BEQYORII.cjs');
6
+
7
+
8
+ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
9
+
10
+ // packages/basic/string/index.ts
11
+ var string_exports = {};
12
+ _chunk5AZGAKWRcjs.__export.call(void 0, string_exports, {
13
+ firstLower: () => _chunkBEQYORIIcjs.firstLower,
14
+ firstUpper: () => _chunkBEQYORIIcjs.firstUpper,
15
+ getNmaeBar: () => _chunkBEQYORIIcjs.getNmaeBar
16
+ });
17
+
18
+
19
+
20
+ exports.string_exports = string_exports;
@@ -0,0 +1,9 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});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
+
8
+
9
+ exports.__export = __export;
@@ -0,0 +1,33 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// packages/log/styleLog.ts
2
+ function styleLog(msg = "", obj) {
3
+ const arr = ["\x1B[0m"];
4
+ if (_optionalChain([obj, 'optionalAccess', _ => _.revert])) {
5
+ arr.push("\x1B[4m");
6
+ }
7
+ if (_optionalChain([obj, 'optionalAccess', _2 => _2.lineThrough])) {
8
+ arr.push("\x1B[9m");
9
+ }
10
+ if (_optionalChain([obj, 'optionalAccess', _3 => _3.italic])) {
11
+ arr.push("\x1B[3m");
12
+ }
13
+ if (_optionalChain([obj, 'optionalAccess', _4 => _4.bold])) {
14
+ arr.push("\x1B[1m");
15
+ }
16
+ if (_optionalChain([obj, 'optionalAccess', _5 => _5.bag])) {
17
+ arr.push(`\x1B[4${_optionalChain([obj, 'optionalAccess', _6 => _6.bag])}m`);
18
+ } else {
19
+ arr.push("\x1B[40m");
20
+ }
21
+ if (_optionalChain([obj, 'optionalAccess', _7 => _7.text])) {
22
+ arr.push(`\x1B[3${_optionalChain([obj, 'optionalAccess', _8 => _8.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
+
32
+
33
+ exports.styleLog = styleLog;
@@ -0,0 +1,24 @@
1
+ import {
2
+ object_exports
3
+ } from "./chunk-MAIGGOA4.js";
4
+ import {
5
+ string_exports
6
+ } from "./chunk-YYNHNLVW.js";
7
+ import {
8
+ array_exports
9
+ } from "./chunk-ED5PJTG5.js";
10
+ import {
11
+ __export
12
+ } from "./chunk-UICA3PK6.js";
13
+
14
+ // packages/basic/index.ts
15
+ var basic_exports = {};
16
+ __export(basic_exports, {
17
+ array: () => array_exports,
18
+ object: () => object_exports,
19
+ string: () => string_exports
20
+ });
21
+
22
+ export {
23
+ basic_exports
24
+ };
@@ -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
+ };
@@ -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,22 @@
1
+ import {
2
+ isArray
3
+ } from "./chunk-5PX3AFSC.js";
4
+ import {
5
+ firstLower,
6
+ toggleArray
7
+ } from "./chunk-OX5EXWS2.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
+ };
@@ -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
+ };