@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
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/
|
|
2
|
-
function
|
|
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;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
mergeObject
|
|
3
|
-
|
|
2
|
+
mergeObject
|
|
3
|
+
} from "./chunk-RD4EP3M5.js";
|
|
4
|
+
import {
|
|
4
5
|
unmergeObject
|
|
5
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-A6J46LQK.js";
|
|
6
7
|
import {
|
|
7
8
|
isObject
|
|
8
9
|
} from "./chunk-WO6JQRTD.js";
|
|
@@ -15,7 +16,6 @@ var object_exports = {};
|
|
|
15
16
|
__export(object_exports, {
|
|
16
17
|
isObject: () => isObject,
|
|
17
18
|
mergeObject: () => mergeObject,
|
|
18
|
-
mergeObject2: () => mergeObject2,
|
|
19
19
|
unmergeObject: () => unmergeObject
|
|
20
20
|
});
|
|
21
21
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkZZEFL2TEcjs = require('./chunk-ZZEFL2TE.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunk2BY5RQHUcjs = require('./chunk-2BY5RQHU.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkYGJOBIEOcjs = require('./chunk-YGJOBIEO.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,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,15 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkYK7WI6H7cjs = require('./chunk-YK7WI6H7.cjs');
|
|
4
|
+
|
|
5
|
+
// packages/urls/getImportUrlSuffix.ts
|
|
6
|
+
function getImportUrlSuffix(url, imp) {
|
|
7
|
+
return _chunkYK7WI6H7cjs.getImportUrl.call(void 0, url, imp).replace(
|
|
8
|
+
/\.([a-z|A-Z]+)$/,
|
|
9
|
+
""
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
exports.getImportUrlSuffix = getImportUrlSuffix;
|
|
@@ -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,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;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
+
var _chunkNRJPCN4Jcjs = require('./chunk-NRJPCN4J.cjs');
|
|
3
4
|
|
|
4
5
|
|
|
5
|
-
var
|
|
6
|
+
var _chunk3VYRYSWKcjs = require('./chunk-3VYRYSWK.cjs');
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
var _chunkXRGLFTH2cjs = require('./chunk-XRGLFTH2.cjs');
|
|
@@ -14,9 +15,8 @@ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
|
|
|
14
15
|
var object_exports = {};
|
|
15
16
|
_chunk5AZGAKWRcjs.__export.call(void 0, object_exports, {
|
|
16
17
|
isObject: () => _chunkXRGLFTH2cjs.isObject,
|
|
17
|
-
mergeObject: () =>
|
|
18
|
-
|
|
19
|
-
unmergeObject: () => _chunkVAYHA5HScjs.unmergeObject
|
|
18
|
+
mergeObject: () => _chunkNRJPCN4Jcjs.mergeObject,
|
|
19
|
+
unmergeObject: () => _chunk3VYRYSWKcjs.unmergeObject
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
|
|
@@ -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,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,32 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkJSU6KHXPcjs = require('./chunk-JSU6KHXP.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkIMCJXCTHcjs = require('./chunk-IMCJXCTH.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkLTVXRDTDcjs = require('./chunk-LTVXRDTD.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunk3OME5O5Gcjs = require('./chunk-3OME5O5G.cjs');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
var _chunk2B742V22cjs = require('./chunk-2B742V22.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: () => _chunkJSU6KHXPcjs.getComponentNames,
|
|
24
|
+
getNames: () => _chunkIMCJXCTHcjs.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,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
matchs
|
|
3
|
+
} from "./chunk-FRGDQOX4.js";
|
|
4
|
+
import {
|
|
5
|
+
matchsStart
|
|
6
|
+
} from "./chunk-S6JRKYPY.js";
|
|
7
|
+
import {
|
|
8
|
+
matchsWhole
|
|
9
|
+
} from "./chunk-IRGCP7KH.js";
|
|
10
|
+
import {
|
|
11
|
+
matchsEnd
|
|
12
|
+
} from "./chunk-YNOFNHEK.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,21 @@
|
|
|
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/getNames.ts
|
|
12
|
+
function getNames(name) {
|
|
13
|
+
const line = humpToLine(name);
|
|
14
|
+
const upper = lineToLargeHump(line);
|
|
15
|
+
const lower = lineToSmallHump(upper);
|
|
16
|
+
return [line, upper, lower];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
getNames
|
|
21
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
object_exports
|
|
3
|
-
} from "./chunk-AZNBYC7K.js";
|
|
4
1
|
import {
|
|
5
2
|
string_exports
|
|
6
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LCS7IWP7.js";
|
|
4
|
+
import {
|
|
5
|
+
object_exports
|
|
6
|
+
} from "./chunk-MAIGGOA4.js";
|
|
7
7
|
import {
|
|
8
8
|
array_exports
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AP2GHAT5.js";
|
|
10
10
|
import {
|
|
11
11
|
__export
|
|
12
12
|
} from "./chunk-UICA3PK6.js";
|
|
@@ -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,21 @@
|
|
|
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 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
|
+
|
|
20
|
+
|
|
21
|
+
exports.getImportUrl = getImportUrl;
|
|
@@ -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,28 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkNGQKVTCRcjs = require('./chunk-NGQKVTCR.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkZZEFL2TEcjs = require('./chunk-ZZEFL2TE.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunk2BY5RQHUcjs = require('./chunk-2BY5RQHU.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunkYGJOBIEOcjs = require('./chunk-YGJOBIEO.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: () => _chunkNGQKVTCRcjs.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
|
+
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,23 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// 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
|
+
|
|
22
|
+
|
|
23
|
+
exports.matchsStart = matchsStart;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { i as index$1 } from './index-f6dfebab.js';
|
|
2
|
+
import { i as index$3 } from './index-f8e894a2.js';
|
|
3
|
+
import { i as index$2 } from './index-3062a21e.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 };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getImportUrl } from './urls/getImportUrl.js';
|
|
2
|
+
import { getImportUrlSuffix } from './urls/getImportUrlSuffix.js';
|
|
3
|
+
import { getReplaceUrl } from './urls/getReplaceUrl.js';
|
|
4
|
+
import { getUrlCatalogue } from './urls/getUrlCatalogue.js';
|
|
5
|
+
import { getUrlCatalogueObj } from './urls/getUrlCatalogueObj.js';
|
|
6
|
+
|
|
7
|
+
declare const index_getImportUrl: typeof getImportUrl;
|
|
8
|
+
declare const index_getImportUrlSuffix: typeof getImportUrlSuffix;
|
|
9
|
+
declare const index_getReplaceUrl: typeof getReplaceUrl;
|
|
10
|
+
declare const index_getUrlCatalogue: typeof getUrlCatalogue;
|
|
11
|
+
declare const index_getUrlCatalogueObj: typeof getUrlCatalogueObj;
|
|
12
|
+
declare namespace index {
|
|
13
|
+
export {
|
|
14
|
+
index_getImportUrl as getImportUrl,
|
|
15
|
+
index_getImportUrlSuffix as getImportUrlSuffix,
|
|
16
|
+
index_getReplaceUrl as getReplaceUrl,
|
|
17
|
+
index_getUrlCatalogue as getUrlCatalogue,
|
|
18
|
+
index_getUrlCatalogueObj as getUrlCatalogueObj,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { index as i };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { isObject } from './basic/object/isObject.js';
|
|
2
|
-
import { mergeObject
|
|
2
|
+
import { mergeObject } from './basic/object/mergeObject.js';
|
|
3
|
+
import { unmergeObject } from './basic/object/unmergeObject.js';
|
|
3
4
|
|
|
4
5
|
declare const index_isObject: typeof isObject;
|
|
5
6
|
declare const index_mergeObject: typeof mergeObject;
|
|
6
|
-
declare const index_mergeObject2: typeof mergeObject2;
|
|
7
7
|
declare const index_unmergeObject: typeof unmergeObject;
|
|
8
8
|
declare namespace index {
|
|
9
9
|
export {
|
|
10
10
|
index_isObject as isObject,
|
|
11
11
|
index_mergeObject as mergeObject,
|
|
12
|
-
index_mergeObject2 as mergeObject2,
|
|
13
12
|
index_unmergeObject as unmergeObject,
|
|
14
13
|
};
|
|
15
14
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { matchs } from './judge/matchs.js';
|
|
2
|
+
import { matchsEnd } from './judge/matchsEnd.js';
|
|
3
|
+
import { matchsStart } from './judge/matchsStart.js';
|
|
4
|
+
import { matchsWhole } from './judge/matchsWhole.js';
|
|
5
|
+
|
|
6
|
+
declare const index_matchs: typeof matchs;
|
|
7
|
+
declare const index_matchsEnd: typeof matchsEnd;
|
|
8
|
+
declare const index_matchsStart: typeof matchsStart;
|
|
9
|
+
declare const index_matchsWhole: typeof matchsWhole;
|
|
10
|
+
declare namespace index {
|
|
11
|
+
export {
|
|
12
|
+
index_matchs as matchs,
|
|
13
|
+
index_matchsEnd as matchsEnd,
|
|
14
|
+
index_matchsStart as matchsStart,
|
|
15
|
+
index_matchsWhole as matchsWhole,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { index as i };
|