@fangzhongya/utils 0.0.8-7 → 0.0.8-71
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/asyncMergeArray.cjs +2 -2
- package/dist/basic/array/asyncMergeArray.d.ts +6 -6
- package/dist/basic/array/asyncMergeArray.js +1 -1
- package/dist/basic/array/deleteArray.cjs +7 -0
- package/dist/basic/array/deleteArray.d.ts +6 -0
- package/dist/basic/array/deleteArray.js +7 -0
- package/dist/basic/array/duplicateRemoval.d.ts +6 -6
- package/dist/basic/array/index.cjs +10 -6
- package/dist/basic/array/index.d.ts +2 -1
- package/dist/basic/array/index.js +10 -6
- package/dist/basic/array/isArray.d.ts +5 -5
- package/dist/basic/array/replaceAfter.cjs +2 -2
- package/dist/basic/array/replaceAfter.d.ts +9 -8
- package/dist/basic/array/replaceAfter.js +1 -1
- package/dist/basic/array/toggleArray.cjs +2 -2
- package/dist/basic/array/toggleArray.d.ts +8 -8
- package/dist/basic/array/toggleArray.js +1 -1
- package/dist/basic/index.cjs +18 -9
- package/dist/basic/index.d.ts +14 -5
- package/dist/basic/index.js +17 -8
- package/dist/basic/object/attrValueSort.cjs +7 -0
- package/dist/basic/object/attrValueSort.d.ts +12 -0
- package/dist/basic/object/attrValueSort.js +7 -0
- package/dist/basic/object/deepCopy.cjs +7 -0
- package/dist/basic/object/deepCopy.d.ts +8 -0
- package/dist/basic/object/deepCopy.js +7 -0
- package/dist/basic/object/filterObject.cjs +7 -0
- package/dist/basic/object/filterObject.d.ts +14 -0
- package/dist/basic/object/filterObject.js +7 -0
- package/dist/basic/object/getSort.cjs +7 -0
- package/dist/basic/object/getSort.d.ts +10 -0
- package/dist/basic/object/getSort.js +7 -0
- package/dist/basic/object/hasOwn.cjs +7 -0
- package/dist/basic/object/hasOwn.d.ts +9 -0
- package/dist/basic/object/hasOwn.js +7 -0
- package/dist/basic/object/index.cjs +26 -2
- package/dist/basic/object/index.d.ts +7 -1
- package/dist/basic/object/index.js +25 -1
- package/dist/basic/object/isObject.d.ts +5 -5
- package/dist/basic/object/isObjectArray.d.ts +5 -5
- package/dist/basic/object/mergeObject.d.ts +8 -8
- package/dist/basic/object/setSort.cjs +7 -0
- package/dist/basic/object/setSort.d.ts +7 -0
- package/dist/basic/object/setSort.js +7 -0
- package/dist/basic/object/unmergeObject.d.ts +8 -8
- package/dist/basic/string/appearNum.d.ts +6 -6
- package/dist/basic/string/appearNumSeat.d.ts +7 -7
- package/dist/basic/string/firstLower.d.ts +5 -5
- package/dist/basic/string/firstUpper.d.ts +5 -5
- package/dist/basic/string/getStartSame.d.ts +6 -6
- package/dist/basic/string/getStartSames.d.ts +6 -6
- package/dist/basic/string/index.cjs +15 -3
- package/dist/basic/string/index.d.ts +2 -0
- package/dist/basic/string/index.js +16 -4
- package/dist/basic/string/splitUpper.d.ts +5 -5
- package/dist/basic/string/toFunction.cjs +9 -0
- package/dist/basic/string/toFunction.d.ts +11 -0
- package/dist/basic/string/toFunction.js +9 -0
- package/dist/basic/string/toJson.cjs +10 -0
- package/dist/basic/string/toJson.d.ts +7 -0
- package/dist/basic/string/toJson.js +10 -0
- package/dist/chunk-2OR4FUOA.cjs +47 -0
- package/dist/chunk-2QGQBPEX.js +15 -0
- package/dist/chunk-3IR2ABRO.js +8 -0
- package/dist/chunk-3LWFUVER.js +60 -0
- package/dist/{chunk-X6SR256S.js → chunk-3YREMQDD.js} +4 -4
- package/dist/chunk-4X7AFGTV.cjs +21 -0
- package/dist/{chunk-VIVEXAEC.cjs → chunk-6OF3XP3W.cjs} +5 -5
- package/dist/chunk-6YI3CDEW.js +35 -0
- package/dist/chunk-7AIT4XSD.cjs +13 -0
- package/dist/chunk-AFKJQ4QP.js +35 -0
- package/dist/chunk-ANTSTMDG.cjs +20 -0
- package/dist/chunk-APKFW4LU.js +36 -0
- package/dist/chunk-BMUGXWAO.cjs +26 -0
- package/dist/chunk-CDQONLGU.cjs +23 -0
- package/dist/chunk-CTLBHJGF.cjs +20 -0
- package/dist/chunk-D3SX7OUV.cjs +11 -0
- package/dist/chunk-D3YMEKIF.js +20 -0
- package/dist/chunk-DBSRZCFK.js +54 -0
- package/dist/chunk-DGQF7OEN.js +20 -0
- package/dist/chunk-EWXBN4VG.cjs +21 -0
- package/dist/{chunk-XN4JGC3A.cjs → chunk-FGQXKLTH.cjs} +8 -2
- package/dist/{chunk-V3FWFWP2.cjs → chunk-FWSMHV24.cjs} +14 -2
- package/dist/chunk-GFAUQTB2.cjs +33 -0
- package/dist/chunk-GIAO77MY.js +49 -0
- package/dist/chunk-GOUC2DFA.cjs +8 -0
- package/dist/chunk-GVVJIN46.js +81 -0
- package/dist/chunk-HJTIJGIF.cjs +21 -0
- package/dist/chunk-IIKQHLKT.cjs +60 -0
- package/dist/chunk-IWH77AZY.cjs +24 -0
- package/dist/chunk-JDKNU726.cjs +20 -0
- package/dist/{chunk-76ZUEOEJ.js → chunk-JU6FQE2Q.js} +9 -5
- package/dist/chunk-JYPJ5QJ5.cjs +35 -0
- package/dist/chunk-K33LOE73.js +29 -0
- package/dist/{chunk-JLEIVV37.cjs → chunk-KHGCW3A7.cjs} +7 -7
- package/dist/chunk-KQR7FXBF.js +20 -0
- package/dist/{chunk-JE4B4G3M.js → chunk-KUI3P5CP.js} +3 -3
- package/dist/{chunk-SYXWQKOO.cjs → chunk-L6DY4GCH.cjs} +5 -5
- package/dist/chunk-LEPZYF2N.cjs +49 -0
- package/dist/chunk-LI6WZE5I.js +54 -0
- package/dist/chunk-M323GS33.js +21 -0
- package/dist/chunk-MGX7U2CG.cjs +20 -0
- package/dist/chunk-MHHMXDHD.cjs +29 -0
- package/dist/chunk-MQHLAQQA.js +21 -0
- package/dist/chunk-N3FZ4WUI.js +16 -0
- package/dist/chunk-NCSN3MC5.js +21 -0
- package/dist/{chunk-P2CYIUCC.js → chunk-NLYMUIJC.js} +15 -3
- package/dist/{chunk-ZQX2TYQB.js → chunk-NSG7ZMXT.js} +4 -4
- package/dist/chunk-OJFV3426.js +17 -0
- package/dist/{chunk-NKIDWRRS.cjs → chunk-OYFW373E.cjs} +11 -7
- package/dist/chunk-PHKZER72.js +23 -0
- package/dist/chunk-PTLVJ5OL.cjs +17 -0
- package/dist/{chunk-2W7EPKCY.js → chunk-PVYBDMBK.js} +5 -5
- package/dist/chunk-Q63V2U5G.js +47 -0
- package/dist/chunk-Q6FMBSK4.js +27 -0
- package/dist/chunk-QFRZFZAA.js +20 -0
- package/dist/{chunk-WVKZTLXW.js → chunk-QJVB3JIZ.js} +8 -2
- package/dist/{chunk-KI5O5MZR.cjs → chunk-QZVMLHFW.cjs} +2 -2
- package/dist/chunk-S42NGJ5W.js +11 -0
- package/dist/chunk-SOAKYJIG.cjs +36 -0
- package/dist/chunk-T4BAVDTH.js +31 -0
- package/dist/{chunk-VNVG4BJ4.cjs → chunk-TCMJPIRM.cjs} +16 -12
- package/dist/chunk-TE3XNGF4.cjs +16 -0
- package/dist/chunk-UFYLVZNU.cjs +31 -0
- package/dist/{chunk-O2RP4UZQ.cjs → chunk-UGFSIZ5P.cjs} +2 -23
- package/dist/chunk-UPPSZFBE.cjs +121 -0
- package/dist/chunk-UX6A432F.cjs +11 -0
- package/dist/chunk-VBS6YE6H.js +121 -0
- package/dist/chunk-VCZ62DR2.js +11 -0
- package/dist/chunk-VOMPPHW6.js +26 -0
- package/dist/{chunk-HQFPDOWY.js → chunk-VOVIDEUN.js} +24 -0
- package/dist/chunk-VY5VQ7WE.cjs +21 -0
- package/dist/chunk-VYOTXPMM.cjs +8 -0
- package/dist/chunk-W45DTA4D.js +8 -0
- package/dist/chunk-WIYZQNGO.js +33 -0
- package/dist/chunk-WLBKU7NM.cjs +15 -0
- package/dist/{chunk-QKLVFB74.js → chunk-WX3JYE47.js} +2 -23
- package/dist/chunk-XSQOJWXL.cjs +54 -0
- package/dist/chunk-XUL6LPTN.js +21 -0
- package/dist/{chunk-AMKJIDHO.js → chunk-Y5WYKSYG.js} +1 -1
- package/dist/chunk-YAD5PHVF.cjs +81 -0
- package/dist/{chunk-PB6FN2XC.cjs → chunk-Z5VXOBXR.cjs} +24 -0
- package/dist/chunk-ZCSQFCKJ.cjs +54 -0
- package/dist/chunk-ZEAT23CI.js +13 -0
- package/dist/chunk-ZJIRJ4YJ.cjs +35 -0
- package/dist/css/fetchUnitValue.cjs +2 -2
- package/dist/css/fetchUnitValue.d.ts +7 -7
- package/dist/css/fetchUnitValue.js +1 -1
- package/dist/css/getAttrObj.cjs +7 -0
- package/dist/css/getAttrObj.d.ts +11 -0
- package/dist/css/getAttrObj.js +7 -0
- package/dist/css/getCss.d.ts +7 -1
- package/dist/css/getPositionRelative.cjs +8 -0
- package/dist/css/getPositionRelative.d.ts +7 -0
- package/dist/css/getPositionRelative.js +8 -0
- package/dist/css/getPrentClass.cjs +8 -0
- package/dist/css/getPrentClass.d.ts +7 -0
- package/dist/css/getPrentClass.js +8 -0
- package/dist/css/getPrentCorres.cjs +7 -0
- package/dist/css/getPrentCorres.d.ts +7 -0
- package/dist/css/getPrentCorres.js +7 -0
- package/dist/css/getSVG.cjs +8 -0
- package/dist/css/getSVG.d.ts +14 -0
- package/dist/css/getSVG.js +8 -0
- package/dist/css/index.cjs +36 -5
- package/dist/css/index.d.ts +8 -1
- package/dist/css/index.js +37 -6
- package/dist/css/setClassName.cjs +7 -0
- package/dist/css/setClassName.d.ts +6 -0
- package/dist/css/setClassName.js +7 -0
- package/dist/css/setCss.cjs +3 -2
- package/dist/css/setCss.d.ts +9 -1
- package/dist/css/setCss.js +2 -1
- package/dist/css/setObjStyle.cjs +9 -0
- package/dist/css/setObjStyle.d.ts +12 -0
- package/dist/css/setObjStyle.js +9 -0
- package/dist/dom/getLocus.cjs +7 -0
- package/dist/dom/getLocus.d.ts +14 -0
- package/dist/dom/getLocus.js +7 -0
- package/dist/dom/getShiftEvent.cjs +13 -0
- package/dist/dom/getShiftEvent.d.ts +25 -0
- package/dist/dom/getShiftEvent.js +13 -0
- package/dist/dom/index.cjs +18 -0
- package/dist/dom/index.d.ts +2 -0
- package/dist/dom/index.js +18 -0
- package/dist/html/analysisHtml.cjs +8 -0
- package/dist/html/analysisHtml.d.ts +13 -0
- package/dist/html/analysisHtml.js +8 -0
- package/dist/html/htmlEscape.cjs +7 -0
- package/dist/html/htmlEscape.d.ts +8 -0
- package/dist/html/htmlEscape.js +7 -0
- package/dist/html/index.cjs +13 -0
- package/dist/html/index.d.ts +2 -0
- package/dist/html/index.js +13 -0
- package/dist/index-082de317.d.ts +13 -0
- package/dist/{index-e7b43a74.d.ts → index-123cda08.d.ts} +4 -1
- package/dist/index-22ee0e10.d.ts +13 -0
- package/dist/{index-eef2a16c.d.ts → index-4d550d78.d.ts} +10 -0
- package/dist/index-5aea66bb.d.ts +21 -0
- package/dist/index-92feece4.d.ts +39 -0
- package/dist/index-ae0241ec.d.ts +13 -0
- package/dist/index-bc08cd32.d.ts +14 -0
- package/dist/index-ed8c0e9f.d.ts +37 -0
- package/dist/index.cjs +72 -33
- package/dist/index.d.ts +40 -13
- package/dist/index.js +75 -36
- package/dist/iss/index.d.ts +1 -1
- package/dist/judge/index.cjs +6 -6
- package/dist/judge/index.d.ts +1 -1
- package/dist/judge/index.js +5 -5
- package/dist/judge/matchs.cjs +3 -3
- package/dist/judge/matchs.d.ts +7 -7
- package/dist/judge/matchs.js +2 -2
- package/dist/judge/matchsEnd.d.ts +6 -6
- package/dist/judge/matchsStart.d.ts +6 -6
- package/dist/judge/matchsWhole.d.ts +6 -6
- package/dist/load/getSynch.d.ts +5 -5
- package/dist/log/styleLog.d.ts +65 -65
- package/dist/name/getComponentNames.cjs +3 -3
- package/dist/name/getComponentNames.d.ts +5 -5
- package/dist/name/getComponentNames.js +2 -2
- package/dist/name/getNames.cjs +3 -3
- package/dist/name/getNames.d.ts +5 -5
- package/dist/name/getNames.js +2 -2
- package/dist/name/humpToLine.d.ts +5 -5
- package/dist/name/index.cjs +7 -7
- package/dist/name/index.d.ts +1 -1
- package/dist/name/index.js +6 -6
- package/dist/name/lineToLargeHump.d.ts +5 -5
- package/dist/name/lineToSmallHump.d.ts +5 -5
- package/dist/node/getPort.cjs +2 -2
- package/dist/node/getPort.d.ts +10 -10
- package/dist/node/getPort.js +1 -1
- package/dist/node/index.cjs +3 -3
- package/dist/node/index.js +2 -2
- package/dist/tree/getTreeObj.cjs +11 -0
- package/dist/tree/getTreeObj.d.ts +26 -0
- package/dist/tree/getTreeObj.js +11 -0
- package/dist/tree/index.cjs +12 -0
- package/dist/tree/index.d.ts +1 -0
- package/dist/tree/index.js +12 -0
- package/dist/urls/getImportUrl.d.ts +6 -6
- package/dist/urls/getImportUrlSuffix.d.ts +6 -6
- package/dist/urls/getNewFileName.d.ts +5 -5
- package/dist/urls/getReplaceImportUrl.d.ts +6 -6
- package/dist/urls/getReplaceUrl.cjs +3 -3
- package/dist/urls/getReplaceUrl.d.ts +6 -6
- package/dist/urls/getReplaceUrl.js +2 -2
- package/dist/urls/getSuffix.d.ts +5 -5
- package/dist/urls/getUrlCatalogue.d.ts +5 -5
- package/dist/urls/getUrlCatalogueLast.d.ts +5 -5
- package/dist/urls/getUrlCatalogueObj.d.ts +14 -14
- package/dist/urls/index.cjs +7 -7
- package/dist/urls/index.js +6 -6
- package/dist/window/copy.cjs +7 -0
- package/dist/window/copy.d.ts +3 -0
- package/dist/window/copy.js +7 -0
- package/dist/window/getParam.cjs +7 -0
- package/dist/window/getParam.d.ts +6 -0
- package/dist/window/getParam.js +7 -0
- package/dist/window/index.cjs +12 -0
- package/dist/window/index.d.ts +2 -0
- package/dist/window/index.js +12 -0
- package/package.json +210 -76
- package/dist/chunk-36NQW7GX.cjs +0 -24
- package/dist/chunk-6WSP6FLZ.cjs +0 -8
- package/dist/chunk-7IXRH3MU.js +0 -8
- package/dist/chunk-7KXJO4NI.js +0 -24
- package/dist/chunk-AXMOZZCM.cjs +0 -22
- package/dist/chunk-DGOE2UXJ.cjs +0 -24
- package/dist/chunk-GOH6G74S.js +0 -17
- package/dist/chunk-GOJN3OQ4.js +0 -22
- package/dist/chunk-LG7MY5KL.cjs +0 -17
- package/dist/chunk-XQB2HUHZ.js +0 -23
- package/dist/index-610215b0.d.ts +0 -16
- package/dist/index-e5ab7f28.d.ts +0 -13
- package/dist/index-f7cb4d19.d.ts +0 -19
- package/dist/{chunk-T2QKEABG.js → chunk-33X65PQS.js} +3 -3
- package/dist/{chunk-T22I7TJQ.cjs → chunk-3YUI42XN.cjs} +3 -3
- package/dist/{chunk-6RIGEV6G.cjs → chunk-4MDPNVDF.cjs} +2 -2
- package/dist/{chunk-BWNLZJJG.js → chunk-EJWFLQF3.js} +3 -3
- package/dist/{chunk-PAJDTMC5.cjs → chunk-KRBTSMT2.cjs} +3 -3
- package/dist/{chunk-5UV36ZIW.cjs → chunk-O6P3QI3B.cjs} +3 -3
- package/dist/{chunk-ZRZ5HATA.js → chunk-QRPNQFNF.js} +3 -3
- package/dist/{chunk-MXLYIZIX.js → chunk-VRRDYCUH.js} +3 -3
- package/dist/{index-38b73962.d.ts → index-09cd203a.d.ts} +1 -1
- package/dist/{index-110fd300.d.ts → index-445fe401.d.ts} +1 -1
- package/dist/{index-f6ea5a6a.d.ts → index-a65f6120.d.ts} +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkZJIRJ4YJcjs = require('./chunk-ZJIRJ4YJ.cjs');
|
|
4
|
+
|
|
5
|
+
// packages/basic/string/toJson.ts
|
|
6
|
+
function toJSONStringify(obj, jb) {
|
|
7
|
+
return JSON.stringify(
|
|
8
|
+
obj,
|
|
9
|
+
function(_k, v) {
|
|
10
|
+
if (typeof v === "function") {
|
|
11
|
+
return "+Fun|" + v.toString().trim();
|
|
12
|
+
} else {
|
|
13
|
+
return v;
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
jb
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
function toJSONParse(str) {
|
|
20
|
+
return JSON.parse(str, function(_k, v) {
|
|
21
|
+
if (typeof v === "string") {
|
|
22
|
+
if (/^\+Fun\|(.|\n|\r)+?\}$/g.test(v)) {
|
|
23
|
+
return _chunkZJIRJ4YJcjs.toFunction.call(void 0, v.replace(/^\+Fun\|/, "")) || v;
|
|
24
|
+
} else {
|
|
25
|
+
return v;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return v;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
exports.toJSONStringify = toJSONStringify; exports.toJSONParse = toJSONParse;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// packages/basic/array/replaceAfter.ts
|
|
2
|
+
function replaceAfter(arr, obj, id, is) {
|
|
3
|
+
const varr = [];
|
|
4
|
+
if (id) {
|
|
5
|
+
arr.forEach((a) => {
|
|
6
|
+
const element = a;
|
|
7
|
+
const vs = obj;
|
|
8
|
+
if (element[id] !== vs[id]) {
|
|
9
|
+
varr.push(a);
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
} else {
|
|
13
|
+
arr.forEach((element) => {
|
|
14
|
+
if (element !== obj) {
|
|
15
|
+
varr.push(element);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
if (is) {
|
|
20
|
+
varr.unshift(obj);
|
|
21
|
+
} else {
|
|
22
|
+
varr.push(obj);
|
|
23
|
+
}
|
|
24
|
+
return varr;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
replaceAfter
|
|
29
|
+
};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkKRBTSMT2cjs = require('./chunk-KRBTSMT2.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _chunkLTVXRDTDcjs = require('./chunk-LTVXRDTD.cjs');
|
|
6
|
+
var _chunkO6P3QI3Bcjs = require('./chunk-O6P3QI3B.cjs');
|
|
10
7
|
|
|
11
8
|
|
|
12
9
|
var _chunkXHR36FJKcjs = require('./chunk-XHR36FJK.cjs');
|
|
@@ -15,13 +12,16 @@ var _chunkXHR36FJKcjs = require('./chunk-XHR36FJK.cjs');
|
|
|
15
12
|
var _chunkWI55O3IVcjs = require('./chunk-WI55O3IV.cjs');
|
|
16
13
|
|
|
17
14
|
|
|
15
|
+
var _chunkLTVXRDTDcjs = require('./chunk-LTVXRDTD.cjs');
|
|
16
|
+
|
|
17
|
+
|
|
18
18
|
var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
|
|
19
19
|
|
|
20
20
|
// packages/name/index.ts
|
|
21
21
|
var name_exports = {};
|
|
22
22
|
_chunk5AZGAKWRcjs.__export.call(void 0, name_exports, {
|
|
23
|
-
getComponentNames: () =>
|
|
24
|
-
getNames: () =>
|
|
23
|
+
getComponentNames: () => _chunkKRBTSMT2cjs.getComponentNames,
|
|
24
|
+
getNames: () => _chunkO6P3QI3Bcjs.getNames,
|
|
25
25
|
humpToLine: () => _chunkLTVXRDTDcjs.humpToLine,
|
|
26
26
|
lineToLargeHump: () => _chunkWI55O3IVcjs.lineToLargeHump,
|
|
27
27
|
lineToSmallHump: () => _chunkXHR36FJKcjs.lineToSmallHump
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
analysisHtml
|
|
3
|
+
} from "./chunk-GIAO77MY.js";
|
|
4
|
+
import {
|
|
5
|
+
htmlEscape
|
|
6
|
+
} from "./chunk-NCSN3MC5.js";
|
|
7
|
+
import {
|
|
8
|
+
__export
|
|
9
|
+
} from "./chunk-UICA3PK6.js";
|
|
10
|
+
|
|
11
|
+
// packages/html/index.ts
|
|
12
|
+
var html_exports = {};
|
|
13
|
+
__export(html_exports, {
|
|
14
|
+
analysisHtml: () => analysisHtml,
|
|
15
|
+
htmlEscape: () => htmlEscape
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
html_exports
|
|
20
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
string_exports
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NLYMUIJC.js";
|
|
4
4
|
import {
|
|
5
5
|
object_exports
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VOVIDEUN.js";
|
|
7
7
|
import {
|
|
8
8
|
array_exports
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JU6FQE2Q.js";
|
|
10
10
|
import {
|
|
11
11
|
__export
|
|
12
12
|
} from "./chunk-UICA3PK6.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk3YUI42XNcjs = require('./chunk-3YUI42XN.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk2BY5RQHUcjs = require('./chunk-2BY5RQHU.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkYGJOBIEOcjs = require('./chunk-YGJOBIEO.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkZZEFL2TEcjs = require('./chunk-ZZEFL2TE.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
|
|
@@ -17,7 +17,7 @@ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
|
|
|
17
17
|
// packages/judge/index.ts
|
|
18
18
|
var judge_exports = {};
|
|
19
19
|
_chunk5AZGAKWRcjs.__export.call(void 0, judge_exports, {
|
|
20
|
-
matchs: () =>
|
|
20
|
+
matchs: () => _chunk3YUI42XNcjs.matchs,
|
|
21
21
|
matchsEnd: () => _chunkYGJOBIEOcjs.matchsEnd,
|
|
22
22
|
matchsStart: () => _chunkZZEFL2TEcjs.matchsStart,
|
|
23
23
|
matchsWhole: () => _chunk2BY5RQHUcjs.matchsWhole
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkTE3XNGF4cjs = require('./chunk-TE3XNGF4.cjs');
|
|
4
|
+
|
|
5
|
+
// packages/html/analysisHtml.ts
|
|
6
|
+
function analysisHtml(str) {
|
|
7
|
+
const arr = [];
|
|
8
|
+
getHtml(arr, str);
|
|
9
|
+
return arr;
|
|
10
|
+
}
|
|
11
|
+
function getHtml(arr, str) {
|
|
12
|
+
const reg = /(<\/([a-z|A-Z][^\s|>]*)>)|(<([a-z|A-Z][^\s>/]*)((\s*([^\s="'/|>]+)(=('([^']*)'|"([^"]*)"|([^\s/>]*)))?\s*)*)(>|\/>))/g;
|
|
13
|
+
const rs = reg.exec(str);
|
|
14
|
+
if (rs && rs.length > 0) {
|
|
15
|
+
if (rs.index != 0) {
|
|
16
|
+
arr.push(str.substring(0, rs.index));
|
|
17
|
+
}
|
|
18
|
+
str = str.substring(rs.index + rs[0].length);
|
|
19
|
+
const js = rs[2];
|
|
20
|
+
if (js) {
|
|
21
|
+
return str;
|
|
22
|
+
}
|
|
23
|
+
const obj = {
|
|
24
|
+
div: rs[4],
|
|
25
|
+
attr: rs[5] ? _chunkTE3XNGF4cjs.getAttrObj.call(void 0, rs[5]) : void 0,
|
|
26
|
+
value: []
|
|
27
|
+
};
|
|
28
|
+
if (rs[13] == "/>") {
|
|
29
|
+
arr.push(obj);
|
|
30
|
+
} else {
|
|
31
|
+
arr.push(obj);
|
|
32
|
+
if (str) {
|
|
33
|
+
str = getHtml(obj.value, str);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (str) {
|
|
37
|
+
return getHtml(arr, str);
|
|
38
|
+
} else {
|
|
39
|
+
return "";
|
|
40
|
+
}
|
|
41
|
+
} else {
|
|
42
|
+
arr.push(str);
|
|
43
|
+
return "";
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
exports.analysisHtml = analysisHtml;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getPositionRelative
|
|
3
|
+
} from "./chunk-MQHLAQQA.js";
|
|
4
|
+
import {
|
|
5
|
+
getPrentClass
|
|
6
|
+
} from "./chunk-2QGQBPEX.js";
|
|
7
|
+
import {
|
|
8
|
+
getPrentCorres
|
|
9
|
+
} from "./chunk-OJFV3426.js";
|
|
10
|
+
import {
|
|
11
|
+
getSVG
|
|
12
|
+
} from "./chunk-WIYZQNGO.js";
|
|
13
|
+
import {
|
|
14
|
+
setClassName
|
|
15
|
+
} from "./chunk-D3YMEKIF.js";
|
|
16
|
+
import {
|
|
17
|
+
setCss
|
|
18
|
+
} from "./chunk-XUL6LPTN.js";
|
|
19
|
+
import {
|
|
20
|
+
setObjStyle,
|
|
21
|
+
toStyleString
|
|
22
|
+
} from "./chunk-M323GS33.js";
|
|
23
|
+
import {
|
|
24
|
+
fetchUnitValue
|
|
25
|
+
} from "./chunk-WX3JYE47.js";
|
|
26
|
+
import {
|
|
27
|
+
getAttrObj
|
|
28
|
+
} from "./chunk-N3FZ4WUI.js";
|
|
29
|
+
import {
|
|
30
|
+
getCss
|
|
31
|
+
} from "./chunk-5RZYHE3X.js";
|
|
32
|
+
import {
|
|
33
|
+
__export
|
|
34
|
+
} from "./chunk-UICA3PK6.js";
|
|
35
|
+
|
|
36
|
+
// packages/css/index.ts
|
|
37
|
+
var css_exports = {};
|
|
38
|
+
__export(css_exports, {
|
|
39
|
+
fetchUnitValue: () => fetchUnitValue,
|
|
40
|
+
getAttrObj: () => getAttrObj,
|
|
41
|
+
getCss: () => getCss,
|
|
42
|
+
getPositionRelative: () => getPositionRelative,
|
|
43
|
+
getPrentClass: () => getPrentClass,
|
|
44
|
+
getPrentCorres: () => getPrentCorres,
|
|
45
|
+
getSVG: () => getSVG,
|
|
46
|
+
setClassName: () => setClassName,
|
|
47
|
+
setCss: () => setCss,
|
|
48
|
+
setObjStyle: () => setObjStyle,
|
|
49
|
+
toStyleString: () => toStyleString
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export {
|
|
53
|
+
css_exports
|
|
54
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// packages/css/setObjStyle.ts
|
|
2
|
+
function toStyleString(obj) {
|
|
3
|
+
let st = "";
|
|
4
|
+
Object.keys(obj).forEach((key) => {
|
|
5
|
+
st += key + ":" + obj[key] + ";";
|
|
6
|
+
});
|
|
7
|
+
return st;
|
|
8
|
+
}
|
|
9
|
+
function setObjStyle(style, objColor) {
|
|
10
|
+
if (typeof style == "string") {
|
|
11
|
+
style = style + ";" + toStyleString(objColor);
|
|
12
|
+
} else {
|
|
13
|
+
style = Object.assign(style || {}, objColor);
|
|
14
|
+
}
|
|
15
|
+
return style;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
toStyleString,
|
|
20
|
+
setObjStyle
|
|
21
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkLEPZYF2Ncjs = require('./chunk-LEPZYF2N.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkEWXBN4VGcjs = require('./chunk-EWXBN4VG.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
|
|
10
|
+
|
|
11
|
+
// packages/html/index.ts
|
|
12
|
+
var html_exports = {};
|
|
13
|
+
_chunk5AZGAKWRcjs.__export.call(void 0, html_exports, {
|
|
14
|
+
analysisHtml: () => _chunkLEPZYF2Ncjs.analysisHtml,
|
|
15
|
+
htmlEscape: () => _chunkEWXBN4VGcjs.htmlEscape
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
exports.html_exports = html_exports;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/array/replaceAfter.ts
|
|
2
|
+
function replaceAfter(arr, obj, id, is) {
|
|
3
|
+
const varr = [];
|
|
4
|
+
if (id) {
|
|
5
|
+
arr.forEach((a) => {
|
|
6
|
+
const element = a;
|
|
7
|
+
const vs = obj;
|
|
8
|
+
if (element[id] !== vs[id]) {
|
|
9
|
+
varr.push(a);
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
} else {
|
|
13
|
+
arr.forEach((element) => {
|
|
14
|
+
if (element !== obj) {
|
|
15
|
+
varr.push(element);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
if (is) {
|
|
20
|
+
varr.unshift(obj);
|
|
21
|
+
} else {
|
|
22
|
+
varr.push(obj);
|
|
23
|
+
}
|
|
24
|
+
return varr;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
exports.replaceAfter = replaceAfter;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getCss
|
|
3
|
+
} from "./chunk-5RZYHE3X.js";
|
|
4
|
+
|
|
5
|
+
// packages/css/getPositionRelative.ts
|
|
6
|
+
function getPositionRelative(el, str = "relative") {
|
|
7
|
+
if (el && el.parentElement) {
|
|
8
|
+
const fel = el.parentElement;
|
|
9
|
+
if (getCss(fel, "position") == str) {
|
|
10
|
+
return fel;
|
|
11
|
+
} else {
|
|
12
|
+
return getPositionRelative(fel);
|
|
13
|
+
}
|
|
14
|
+
} else {
|
|
15
|
+
return el;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
getPositionRelative
|
|
21
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// packages/css/getAttrObj.ts
|
|
2
|
+
function getAttrObj(str) {
|
|
3
|
+
const reg = /\s*([^\s="'/>]+)(=('([^']*)'|"([^"]*)"|([^\s/>]*)))?\s*/g;
|
|
4
|
+
let result;
|
|
5
|
+
const obj = {};
|
|
6
|
+
while ((result = reg.exec(str)) !== null) {
|
|
7
|
+
const key = result[1];
|
|
8
|
+
const value = result[5] || result[3];
|
|
9
|
+
obj[key] = value;
|
|
10
|
+
}
|
|
11
|
+
return obj;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
getAttrObj
|
|
16
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// packages/html/htmlEscape.ts
|
|
2
|
+
var zObj = {
|
|
3
|
+
"<": "<",
|
|
4
|
+
">": ">",
|
|
5
|
+
'"': """,
|
|
6
|
+
"'": "'",
|
|
7
|
+
" ": " "
|
|
8
|
+
};
|
|
9
|
+
function htmlEscape(str) {
|
|
10
|
+
str = str.replace(/&(?!\w+;)/g, "&");
|
|
11
|
+
return str.replace(/[<>&" ']/g, (c) => {
|
|
12
|
+
if (c) {
|
|
13
|
+
return zObj[c] || c;
|
|
14
|
+
}
|
|
15
|
+
return c;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
htmlEscape
|
|
21
|
+
};
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
toJSONParse,
|
|
3
|
+
toJSONStringify
|
|
4
|
+
} from "./chunk-AFKJQ4QP.js";
|
|
1
5
|
import {
|
|
2
6
|
getStartSame
|
|
3
7
|
} from "./chunk-7DTHADVK.js";
|
|
@@ -5,11 +9,15 @@ import {
|
|
|
5
9
|
splitUpper
|
|
6
10
|
} from "./chunk-VKE5JARB.js";
|
|
7
11
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
12
|
+
getFunctionFormat,
|
|
13
|
+
toFunction
|
|
14
|
+
} from "./chunk-6YI3CDEW.js";
|
|
10
15
|
import {
|
|
11
16
|
appearNumSeat
|
|
12
17
|
} from "./chunk-DMZP4RPN.js";
|
|
18
|
+
import {
|
|
19
|
+
appearNum
|
|
20
|
+
} from "./chunk-SNABGVNO.js";
|
|
13
21
|
import {
|
|
14
22
|
getStartSames
|
|
15
23
|
} from "./chunk-A276ZDLP.js";
|
|
@@ -30,9 +38,13 @@ __export(string_exports, {
|
|
|
30
38
|
appearNumSeat: () => appearNumSeat,
|
|
31
39
|
firstLower: () => firstLower,
|
|
32
40
|
firstUpper: () => firstUpper,
|
|
41
|
+
getFunctionFormat: () => getFunctionFormat,
|
|
33
42
|
getStartSame: () => getStartSame,
|
|
34
43
|
getStartSames: () => getStartSames,
|
|
35
|
-
splitUpper: () => splitUpper
|
|
44
|
+
splitUpper: () => splitUpper,
|
|
45
|
+
toFunction: () => toFunction,
|
|
46
|
+
toJSONParse: () => toJSONParse,
|
|
47
|
+
toJSONStringify: () => toJSONStringify
|
|
36
48
|
});
|
|
37
49
|
|
|
38
50
|
export {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
matchs
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-33X65PQS.js";
|
|
4
|
+
import {
|
|
5
|
+
matchsWhole
|
|
6
|
+
} from "./chunk-IRGCP7KH.js";
|
|
4
7
|
import {
|
|
5
8
|
matchsEnd
|
|
6
9
|
} from "./chunk-YNOFNHEK.js";
|
|
7
10
|
import {
|
|
8
11
|
matchsStart
|
|
9
12
|
} from "./chunk-S6JRKYPY.js";
|
|
10
|
-
import {
|
|
11
|
-
matchsWhole
|
|
12
|
-
} from "./chunk-IRGCP7KH.js";
|
|
13
13
|
import {
|
|
14
14
|
__export
|
|
15
15
|
} from "./chunk-UICA3PK6.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// packages/css/getPrentCorres.ts
|
|
2
|
+
function getPrentCorres(el, is) {
|
|
3
|
+
if (is(el)) {
|
|
4
|
+
return el;
|
|
5
|
+
} else {
|
|
6
|
+
const fel = el.parentElement;
|
|
7
|
+
if (fel) {
|
|
8
|
+
return getPrentCorres(fel, is);
|
|
9
|
+
} else {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
getPrentCorres
|
|
17
|
+
};
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkMHHMXDHDcjs = require('./chunk-MHHMXDHD.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkSOAKYJIGcjs = require('./chunk-SOAKYJIG.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkTCMJPIRMcjs = require('./chunk-TCMJPIRM.cjs');
|
|
10
|
+
|
|
10
11
|
|
|
12
|
+
var _chunkXSQOJWXLcjs = require('./chunk-XSQOJWXL.cjs');
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
|
|
15
|
+
var _chunkGD3OA7GUcjs = require('./chunk-GD3OA7GU.cjs');
|
|
13
16
|
|
|
14
17
|
|
|
15
18
|
var _chunkISHLY7WMcjs = require('./chunk-ISHLY7WM.cjs');
|
|
@@ -20,11 +23,12 @@ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
|
|
|
20
23
|
// packages/basic/array/index.ts
|
|
21
24
|
var array_exports = {};
|
|
22
25
|
_chunk5AZGAKWRcjs.__export.call(void 0, array_exports, {
|
|
23
|
-
asyncMergeArray: () =>
|
|
26
|
+
asyncMergeArray: () => _chunkTCMJPIRMcjs.asyncMergeArray,
|
|
27
|
+
deleteArray: () => _chunkXSQOJWXLcjs.deleteArray,
|
|
24
28
|
duplicateRemoval: () => _chunkGD3OA7GUcjs.duplicateRemoval,
|
|
25
29
|
isArray: () => _chunkISHLY7WMcjs.isArray,
|
|
26
|
-
replaceAfter: () =>
|
|
27
|
-
toggleArray: () =>
|
|
30
|
+
replaceAfter: () => _chunkMHHMXDHDcjs.replaceAfter,
|
|
31
|
+
toggleArray: () => _chunkSOAKYJIGcjs.toggleArray
|
|
28
32
|
});
|
|
29
33
|
|
|
30
34
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// packages/basic/object/deepCopy.ts
|
|
2
|
+
function deepCopy(obj) {
|
|
3
|
+
if (obj && typeof obj === "object") {
|
|
4
|
+
const objClone = Array.isArray(obj) ? [] : {};
|
|
5
|
+
for (let key in obj) {
|
|
6
|
+
if (obj.hasOwnProperty(key)) {
|
|
7
|
+
if (obj[key] && typeof obj[key] === "object") {
|
|
8
|
+
objClone[key] = deepCopy(obj[key]);
|
|
9
|
+
} else {
|
|
10
|
+
objClone[key] = obj[key];
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return objClone;
|
|
15
|
+
} else {
|
|
16
|
+
const objClone = obj;
|
|
17
|
+
return objClone;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
deepCopy
|
|
23
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/css/getPrentCorres.ts
|
|
2
|
+
function getPrentCorres(el, is) {
|
|
3
|
+
if (is(el)) {
|
|
4
|
+
return el;
|
|
5
|
+
} else {
|
|
6
|
+
const fel = el.parentElement;
|
|
7
|
+
if (fel) {
|
|
8
|
+
return getPrentCorres(fel, is);
|
|
9
|
+
} else {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
exports.getPrentCorres = getPrentCorres;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getComponentNames
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VRRDYCUH.js";
|
|
4
4
|
import {
|
|
5
5
|
getNames
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
humpToLine
|
|
9
|
-
} from "./chunk-J7CICTHH.js";
|
|
6
|
+
} from "./chunk-EJWFLQF3.js";
|
|
10
7
|
import {
|
|
11
8
|
lineToSmallHump
|
|
12
9
|
} from "./chunk-AM67P3W7.js";
|
|
13
10
|
import {
|
|
14
11
|
lineToLargeHump
|
|
15
12
|
} from "./chunk-XCDKXZFR.js";
|
|
13
|
+
import {
|
|
14
|
+
humpToLine
|
|
15
|
+
} from "./chunk-J7CICTHH.js";
|
|
16
16
|
import {
|
|
17
17
|
__export
|
|
18
18
|
} from "./chunk-UICA3PK6.js";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// packages/dom/getLocus.ts
|
|
2
|
+
function getLocus(ks, js) {
|
|
3
|
+
const x = js.clientX - ks.clientX;
|
|
4
|
+
const y = js.clientY - ks.clientY;
|
|
5
|
+
return {
|
|
6
|
+
x,
|
|
7
|
+
y,
|
|
8
|
+
t: locus(x, y)
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function locus(x, y, mim = 10) {
|
|
12
|
+
const isX = x > 0 + mim || x < 0 - mim;
|
|
13
|
+
const isY = y > 0 + mim || y < 0 - mim;
|
|
14
|
+
if (isX && isY) {
|
|
15
|
+
if (x > 0) {
|
|
16
|
+
if (y > 0) {
|
|
17
|
+
return 5;
|
|
18
|
+
} else {
|
|
19
|
+
return 6;
|
|
20
|
+
}
|
|
21
|
+
} else {
|
|
22
|
+
if (y > 0) {
|
|
23
|
+
return 7;
|
|
24
|
+
} else {
|
|
25
|
+
return 8;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
} else if (isX) {
|
|
29
|
+
if (x > 0) {
|
|
30
|
+
return 1;
|
|
31
|
+
} else {
|
|
32
|
+
return 2;
|
|
33
|
+
}
|
|
34
|
+
} else if (isY) {
|
|
35
|
+
if (y > 0) {
|
|
36
|
+
return 3;
|
|
37
|
+
} else {
|
|
38
|
+
return 4;
|
|
39
|
+
}
|
|
40
|
+
} else {
|
|
41
|
+
return 0;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export {
|
|
46
|
+
getLocus
|
|
47
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// packages/basic/array/asyncMergeArray.ts
|
|
2
|
+
function asyncMergeArray(arr, callback) {
|
|
3
|
+
return new Promise((resolve, reject) => {
|
|
4
|
+
let index = 0;
|
|
5
|
+
const k = arr.length;
|
|
6
|
+
if (k > 0) {
|
|
7
|
+
arr.forEach((...a) => {
|
|
8
|
+
callback(
|
|
9
|
+
(...arr2) => {
|
|
10
|
+
index++;
|
|
11
|
+
if (k == index) {
|
|
12
|
+
resolve(arr2);
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
reject,
|
|
16
|
+
...a
|
|
17
|
+
);
|
|
18
|
+
});
|
|
19
|
+
} else {
|
|
20
|
+
resolve(arr);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
asyncMergeArray
|
|
27
|
+
};
|