@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.
- package/dist/basic/array/index.cjs +3 -3
- package/dist/basic/array/index.d.ts +1 -1
- package/dist/basic/array/index.js +4 -4
- package/dist/basic/index.cjs +15 -9
- package/dist/basic/index.d.ts +11 -5
- package/dist/basic/index.js +16 -10
- package/dist/basic/object/index.cjs +4 -4
- package/dist/basic/object/index.d.ts +2 -1
- package/dist/basic/object/index.js +5 -5
- package/dist/basic/object/mergeObject.cjs +2 -6
- package/dist/basic/object/mergeObject.d.ts +1 -19
- package/dist/basic/object/mergeObject.js +3 -7
- package/dist/basic/object/unmergeObject.cjs +7 -0
- package/dist/basic/object/unmergeObject.d.ts +11 -0
- package/dist/basic/object/unmergeObject.js +7 -0
- package/dist/basic/string/appearNum.cjs +7 -0
- package/dist/basic/string/appearNum.d.ts +9 -0
- package/dist/basic/string/appearNum.js +7 -0
- package/dist/basic/string/appearNumSeat.cjs +7 -0
- package/dist/basic/string/appearNumSeat.d.ts +9 -0
- package/dist/basic/string/appearNumSeat.js +7 -0
- package/dist/basic/string/firstLower.cjs +7 -0
- package/dist/basic/string/firstLower.d.ts +8 -0
- package/dist/basic/string/firstLower.js +7 -0
- package/dist/basic/string/firstUpper.cjs +7 -0
- package/dist/basic/string/firstUpper.d.ts +8 -0
- package/dist/basic/string/firstUpper.js +7 -0
- package/dist/basic/string/getStartSame.cjs +7 -0
- package/dist/basic/string/getStartSame.d.ts +6 -0
- package/dist/basic/string/getStartSame.js +7 -0
- package/dist/basic/string/getStartSames.cjs +7 -0
- package/dist/basic/string/getStartSames.d.ts +6 -0
- package/dist/basic/string/getStartSames.js +7 -0
- package/dist/basic/string/index.cjs +19 -3
- package/dist/basic/string/index.d.ts +6 -1
- package/dist/basic/string/index.js +22 -6
- package/dist/chunk-2B742V22.cjs +19 -0
- package/dist/chunk-2BY5RQHU.cjs +23 -0
- package/dist/chunk-2PY55D6T.js +16 -0
- package/dist/chunk-3HXQ7TGV.cjs +14 -0
- package/dist/chunk-3OME5O5G.cjs +16 -0
- package/dist/chunk-3VYRYSWK.cjs +49 -0
- package/dist/chunk-4OBNLDTJ.js +8 -0
- package/dist/chunk-6ADW34CB.cjs +32 -0
- package/dist/chunk-6RIGEV6G.cjs +25 -0
- package/dist/chunk-7DTHADVK.js +18 -0
- package/dist/chunk-A276ZDLP.js +19 -0
- package/dist/chunk-A6J46LQK.js +49 -0
- package/dist/{chunk-ED5PJTG5.js → chunk-AP2GHAT5.js} +3 -3
- package/dist/chunk-AS3WKQP7.js +21 -0
- package/dist/chunk-DILKJQYV.cjs +9 -0
- package/dist/chunk-DMZP4RPN.js +23 -0
- package/dist/chunk-EWJJKQIO.js +8 -0
- package/dist/chunk-FESWCW7T.js +38 -0
- package/dist/chunk-FRGDQOX4.js +25 -0
- package/dist/{chunk-JNC5JEFB.cjs → chunk-FXMA7ZCM.cjs} +2 -2
- package/dist/chunk-G3AKL6ST.js +32 -0
- package/dist/chunk-G3VPA4AU.cjs +36 -0
- package/dist/chunk-G6FL4SSB.js +15 -0
- package/dist/chunk-IMCJXCTH.cjs +21 -0
- package/dist/chunk-IRGCP7KH.js +23 -0
- package/dist/{chunk-DEENZC5X.js → chunk-J7CICTHH.js} +3 -11
- package/dist/chunk-J7S3KBHL.cjs +18 -0
- package/dist/chunk-JR6ZN6QD.cjs +23 -0
- package/dist/chunk-JSU6KHXP.cjs +38 -0
- package/dist/chunk-K6C3XTTI.cjs +24 -0
- package/dist/chunk-L45SIOB3.js +32 -0
- package/dist/chunk-LCS7IWP7.js +36 -0
- package/dist/chunk-LFC6RYSS.js +21 -0
- package/dist/{chunk-BEQYORII.cjs → chunk-LTVXRDTD.cjs} +3 -11
- package/dist/{chunk-AZNBYC7K.js → chunk-MAIGGOA4.js} +4 -4
- package/dist/chunk-NGQKVTCR.cjs +25 -0
- package/dist/chunk-NRJPCN4J.cjs +46 -0
- package/dist/chunk-O3RJ5M35.js +19 -0
- package/dist/chunk-O6GUK5PL.cjs +15 -0
- package/dist/chunk-OQL4GIEJ.cjs +8 -0
- package/dist/chunk-P3YVE7JK.cjs +21 -0
- package/dist/chunk-PW7RP73J.cjs +19 -0
- package/dist/{chunk-YZULJRHH.cjs → chunk-R7G5MSGO.cjs} +4 -4
- package/dist/chunk-RD4EP3M5.js +46 -0
- package/dist/chunk-S6JRKYPY.js +23 -0
- package/dist/chunk-SNABGVNO.js +14 -0
- package/dist/chunk-UEVMS6QD.cjs +8 -0
- package/dist/chunk-UL24YTNH.cjs +32 -0
- package/dist/chunk-V3AYCU2W.js +28 -0
- package/dist/chunk-VHMUSGCJ.js +21 -0
- package/dist/{chunk-P33DGEQL.js → chunk-XR6JKJYY.js} +5 -5
- package/dist/chunk-YGJOBIEO.cjs +23 -0
- package/dist/chunk-YK7WI6H7.cjs +21 -0
- package/dist/chunk-YNOFNHEK.js +23 -0
- package/dist/chunk-ZEXHP7HI.js +9 -0
- package/dist/chunk-ZLCUSADU.cjs +28 -0
- package/dist/chunk-ZRZ5HATA.js +25 -0
- package/dist/chunk-ZZEFL2TE.cjs +23 -0
- package/dist/index-0803eaeb.d.ts +13 -0
- package/dist/index-2f319b8a.d.ts +22 -0
- package/dist/{index-5c5bf158.d.ts → index-3062a21e.d.ts} +2 -3
- package/dist/index-445fe401.d.ts +19 -0
- package/dist/index-48710eab.d.ts +22 -0
- package/dist/{index-6be6487f.d.ts → index-f6dfebab.d.ts} +1 -1
- package/dist/index-f8e894a2.d.ts +25 -0
- package/dist/index.cjs +41 -9
- package/dist/index.d.ts +29 -6
- package/dist/index.js +41 -9
- package/dist/judge/index.cjs +20 -0
- package/dist/judge/index.d.ts +4 -0
- package/dist/judge/index.js +20 -0
- package/dist/judge/matchs.cjs +10 -0
- package/dist/judge/matchs.d.ts +3 -0
- package/dist/judge/matchs.js +10 -0
- package/dist/judge/matchsEnd.cjs +7 -0
- package/dist/judge/matchsEnd.d.ts +3 -0
- package/dist/judge/matchsEnd.js +7 -0
- package/dist/judge/matchsStart.cjs +7 -0
- package/dist/judge/matchsStart.d.ts +3 -0
- package/dist/judge/matchsStart.js +7 -0
- package/dist/judge/matchsWhole.cjs +7 -0
- package/dist/judge/matchsWhole.d.ts +3 -0
- package/dist/judge/matchsWhole.js +7 -0
- package/dist/name/getComponentNames.cjs +12 -0
- package/dist/name/getComponentNames.d.ts +8 -0
- package/dist/name/getComponentNames.js +12 -0
- package/dist/name/getNames.cjs +12 -0
- package/dist/name/getNames.d.ts +8 -0
- package/dist/name/getNames.js +12 -0
- package/dist/name/humpToLine.cjs +7 -0
- package/dist/name/humpToLine.d.ts +8 -0
- package/dist/name/humpToLine.js +7 -0
- package/dist/name/index.cjs +26 -0
- package/dist/name/index.d.ts +5 -0
- package/dist/name/index.js +26 -0
- package/dist/name/lineToLargeHump.cjs +8 -0
- package/dist/name/lineToLargeHump.d.ts +8 -0
- package/dist/name/lineToLargeHump.js +8 -0
- package/dist/name/lineToSmallHump.cjs +9 -0
- package/dist/name/lineToSmallHump.d.ts +8 -0
- package/dist/name/lineToSmallHump.js +9 -0
- package/dist/urls/getImportUrl.cjs +8 -0
- package/dist/urls/getImportUrl.d.ts +9 -0
- package/dist/urls/getImportUrl.js +8 -0
- package/dist/urls/getImportUrlSuffix.cjs +9 -0
- package/dist/urls/getImportUrlSuffix.d.ts +9 -0
- package/dist/urls/getImportUrlSuffix.js +9 -0
- package/dist/urls/getReplaceUrl.cjs +10 -0
- package/dist/urls/getReplaceUrl.d.ts +8 -0
- package/dist/urls/getReplaceUrl.js +10 -0
- package/dist/urls/getUrlCatalogue.cjs +7 -0
- package/dist/urls/getUrlCatalogue.d.ts +8 -0
- package/dist/urls/getUrlCatalogue.js +7 -0
- package/dist/urls/getUrlCatalogueObj.cjs +7 -0
- package/dist/urls/getUrlCatalogueObj.d.ts +13 -0
- package/dist/urls/getUrlCatalogueObj.js +7 -0
- package/dist/urls/index.cjs +27 -0
- package/dist/urls/index.d.ts +5 -0
- package/dist/urls/index.js +27 -0
- package/package.json +157 -34
- package/dist/basic/string/index2.cjs +0 -11
- package/dist/basic/string/index2.d.ts +0 -20
- package/dist/basic/string/index2.js +0 -11
- package/dist/chunk-4PBAZ73I.cjs +0 -20
- package/dist/chunk-J53DPBUN.cjs +0 -24
- package/dist/chunk-LYFX6BGT.js +0 -129
- package/dist/chunk-VAYHA5HS.cjs +0 -129
- package/dist/chunk-YYNHNLVW.js +0 -20
- package/dist/index-5691335a.d.ts +0 -14
- package/dist/index-8abebe13.d.ts +0 -13
package/dist/chunk-VAYHA5HS.cjs
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/object/mergeObject.ts
|
|
2
|
-
function mergeObject2(a, b, j = 1, i) {
|
|
3
|
-
for (const key in b) {
|
|
4
|
-
const v = a[key];
|
|
5
|
-
const t = b[key];
|
|
6
|
-
if (v) {
|
|
7
|
-
if (v instanceof Array) {
|
|
8
|
-
if (i) {
|
|
9
|
-
if (t instanceof Array) {
|
|
10
|
-
v.push(...t);
|
|
11
|
-
} else {
|
|
12
|
-
v.push(t);
|
|
13
|
-
}
|
|
14
|
-
} else {
|
|
15
|
-
a[key] = t;
|
|
16
|
-
}
|
|
17
|
-
} else if (typeof v == "object") {
|
|
18
|
-
const cv = Object.prototype.toString.call(v);
|
|
19
|
-
const ct = Object.prototype.toString.call(t);
|
|
20
|
-
if (cv == ct) {
|
|
21
|
-
const n = j - 1;
|
|
22
|
-
if (n > 0) {
|
|
23
|
-
a[key] = mergeObject2(v, t, n, i);
|
|
24
|
-
} else {
|
|
25
|
-
a[key] = t;
|
|
26
|
-
}
|
|
27
|
-
} else {
|
|
28
|
-
a[key] = t;
|
|
29
|
-
}
|
|
30
|
-
} else {
|
|
31
|
-
a[key] = t;
|
|
32
|
-
}
|
|
33
|
-
} else {
|
|
34
|
-
a[key] = t;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return a;
|
|
38
|
-
}
|
|
39
|
-
function unmergeObject(a, b, j = 0, i) {
|
|
40
|
-
let c;
|
|
41
|
-
if (a instanceof Array) {
|
|
42
|
-
if (j > 0 && i) {
|
|
43
|
-
c = Object.assign([], a);
|
|
44
|
-
if (b instanceof Array) {
|
|
45
|
-
for (const v of b) {
|
|
46
|
-
if (!a.includes(v)) {
|
|
47
|
-
c.push(v);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
} else {
|
|
51
|
-
if (!a.includes(b)) {
|
|
52
|
-
c.push(b);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
} else {
|
|
56
|
-
c = b;
|
|
57
|
-
}
|
|
58
|
-
} else if (typeof a == "object") {
|
|
59
|
-
const cv = Object.prototype.toString.call(a);
|
|
60
|
-
const ct = Object.prototype.toString.call(b);
|
|
61
|
-
if (a && typeof b == "object" && cv == ct && j > 0) {
|
|
62
|
-
c = { ...a };
|
|
63
|
-
const n = j - 1;
|
|
64
|
-
if (n > 0) {
|
|
65
|
-
for (const key in b) {
|
|
66
|
-
const v = a[key];
|
|
67
|
-
const t = b[key];
|
|
68
|
-
c[key] = mergeObject(v, t, n, i);
|
|
69
|
-
}
|
|
70
|
-
} else {
|
|
71
|
-
for (const key in b) {
|
|
72
|
-
c[key] = b[key];
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
} else {
|
|
76
|
-
c = b;
|
|
77
|
-
}
|
|
78
|
-
} else {
|
|
79
|
-
c = b;
|
|
80
|
-
}
|
|
81
|
-
return c;
|
|
82
|
-
}
|
|
83
|
-
function mergeObject(a, b, j = 0, i) {
|
|
84
|
-
if (a instanceof Array) {
|
|
85
|
-
if (j > 0 && i) {
|
|
86
|
-
if (b instanceof Array) {
|
|
87
|
-
for (const v of b) {
|
|
88
|
-
if (!a.includes(v)) {
|
|
89
|
-
a.push(v);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
} else {
|
|
93
|
-
if (!a.includes(b)) {
|
|
94
|
-
a.push(b);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
} else {
|
|
98
|
-
a = b;
|
|
99
|
-
}
|
|
100
|
-
} else if (typeof a == "object") {
|
|
101
|
-
const cv = Object.prototype.toString.call(a);
|
|
102
|
-
const ct = Object.prototype.toString.call(b);
|
|
103
|
-
if (a && typeof b == "object" && cv == ct && j > 0) {
|
|
104
|
-
const n = j - 1;
|
|
105
|
-
if (n > 0) {
|
|
106
|
-
for (const key in b) {
|
|
107
|
-
const v = a[key];
|
|
108
|
-
const t = b[key];
|
|
109
|
-
a[key] = mergeObject(v, t, n, i);
|
|
110
|
-
}
|
|
111
|
-
} else {
|
|
112
|
-
for (const key in b) {
|
|
113
|
-
a[key] = b[key];
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
} else {
|
|
117
|
-
a = b;
|
|
118
|
-
}
|
|
119
|
-
} else {
|
|
120
|
-
a = b;
|
|
121
|
-
}
|
|
122
|
-
return a;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
exports.mergeObject2 = mergeObject2; exports.unmergeObject = unmergeObject; exports.mergeObject = mergeObject;
|
package/dist/chunk-YYNHNLVW.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
firstLower,
|
|
3
|
-
firstUpper,
|
|
4
|
-
getNmaeBar
|
|
5
|
-
} from "./chunk-DEENZC5X.js";
|
|
6
|
-
import {
|
|
7
|
-
__export
|
|
8
|
-
} from "./chunk-UICA3PK6.js";
|
|
9
|
-
|
|
10
|
-
// packages/basic/string/index.ts
|
|
11
|
-
var string_exports = {};
|
|
12
|
-
__export(string_exports, {
|
|
13
|
-
firstLower: () => firstLower,
|
|
14
|
-
firstUpper: () => firstUpper,
|
|
15
|
-
getNmaeBar: () => getNmaeBar
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
export {
|
|
19
|
-
string_exports
|
|
20
|
-
};
|
package/dist/index-5691335a.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { firstLower, firstUpper, getNmaeBar } from './basic/string/index2.js';
|
|
2
|
-
|
|
3
|
-
declare const index_firstLower: typeof firstLower;
|
|
4
|
-
declare const index_firstUpper: typeof firstUpper;
|
|
5
|
-
declare const index_getNmaeBar: typeof getNmaeBar;
|
|
6
|
-
declare namespace index {
|
|
7
|
-
export {
|
|
8
|
-
index_firstLower as firstLower,
|
|
9
|
-
index_firstUpper as firstUpper,
|
|
10
|
-
index_getNmaeBar as getNmaeBar,
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export { index as i };
|
package/dist/index-8abebe13.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { i as index$1 } from './index-6be6487f.js';
|
|
2
|
-
import { i as index$2 } from './index-5c5bf158.js';
|
|
3
|
-
import { i as index$3 } from './index-5691335a.js';
|
|
4
|
-
|
|
5
|
-
declare namespace index {
|
|
6
|
-
export {
|
|
7
|
-
index$1 as array,
|
|
8
|
-
index$2 as object,
|
|
9
|
-
index$3 as string,
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { index as i };
|