@fangzhongya/utils 0.0.7-2 → 0.0.7-20
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 +7 -0
- package/dist/basic/array/asyncMergeArray.d.ts +9 -0
- package/dist/basic/array/asyncMergeArray.js +7 -0
- package/dist/basic/array/duplicateRemoval.cjs +7 -0
- package/dist/basic/array/duplicateRemoval.d.ts +9 -0
- package/dist/basic/array/duplicateRemoval.js +7 -0
- package/dist/basic/array/index.cjs +15 -3
- package/dist/basic/array/index.d.ts +4 -1
- package/dist/basic/array/index.js +14 -2
- package/dist/basic/array/replaceAfter.cjs +7 -0
- package/dist/basic/array/replaceAfter.d.ts +10 -0
- package/dist/basic/array/replaceAfter.js +7 -0
- package/dist/basic/array/toggleArray.cjs +2 -2
- package/dist/basic/array/toggleArray.d.ts +4 -7
- package/dist/basic/array/toggleArray.js +1 -1
- package/dist/basic/index.cjs +15 -10
- package/dist/basic/index.d.ts +14 -9
- package/dist/basic/index.js +14 -9
- package/dist/basic/object/index.cjs +9 -5
- package/dist/basic/object/index.d.ts +2 -1
- package/dist/basic/object/index.js +9 -5
- package/dist/basic/object/isObject.cjs +2 -3
- package/dist/basic/object/isObject.js +1 -2
- package/dist/basic/object/isObjectArray.cjs +9 -0
- package/dist/basic/object/isObjectArray.d.ts +8 -0
- package/dist/basic/object/isObjectArray.js +9 -0
- package/dist/basic/string/index.cjs +6 -2
- package/dist/basic/string/index.d.ts +3 -2
- package/dist/basic/string/index.js +6 -2
- package/dist/basic/string/splitUpper.cjs +7 -0
- package/dist/basic/string/splitUpper.d.ts +8 -0
- package/dist/basic/string/splitUpper.js +7 -0
- package/dist/{chunk-O6GUK5PL.cjs → chunk-27WA7EI2.cjs} +2 -2
- package/dist/{chunk-MAIGGOA4.js → chunk-36PHYPTV.js} +7 -3
- package/dist/chunk-3ERQHPTD.cjs +13 -0
- package/dist/chunk-3T5SHCYK.js +30 -0
- package/dist/{chunk-L45SIOB3.js → chunk-3XQKNIVL.js} +23 -7
- package/dist/chunk-4O7YOSS7.cjs +32 -0
- package/dist/{chunk-N6OX2U6W.cjs → chunk-5U2ZV4MK.cjs} +6 -2
- package/dist/chunk-5V52TYPZ.cjs +30 -0
- package/dist/chunk-6A6EAFGL.cjs +13 -0
- package/dist/chunk-7LMEBJPQ.js +16 -0
- package/dist/{chunk-LFC6RYSS.js → chunk-AWC672JW.js} +13 -0
- package/dist/{chunk-3BKSZA3U.cjs → chunk-AXMOZZCM.cjs} +4 -3
- package/dist/chunk-BDJORZRC.js +13 -0
- package/dist/{chunk-H2LFD53G.js → chunk-BVWHSNDI.js} +5 -1
- package/dist/chunk-CWNSXHMU.js +33 -0
- package/dist/chunk-DKQWP2SZ.cjs +33 -0
- package/dist/chunk-E75NHLNL.js +32 -0
- package/dist/chunk-EWXBN4VG.cjs +21 -0
- package/dist/chunk-GD3OA7GU.cjs +18 -0
- package/dist/chunk-GOH6G74S.js +17 -0
- package/dist/{chunk-HULCI3SJ.js → chunk-GOJN3OQ4.js} +4 -3
- package/dist/{chunk-YK7WI6H7.cjs → chunk-IRKWYW5B.cjs} +13 -0
- package/dist/chunk-JVM3OE63.cjs +48 -0
- package/dist/chunk-LG7MY5KL.cjs +17 -0
- package/dist/chunk-LHSOIOCS.cjs +16 -0
- package/dist/chunk-MIC3W2VY.cjs +8 -0
- package/dist/chunk-MXY4W3K5.js +8 -0
- package/dist/chunk-NCSN3MC5.js +21 -0
- package/dist/chunk-O2RP4UZQ.cjs +45 -0
- package/dist/{chunk-ASN2EUM7.cjs → chunk-OVWID444.cjs} +5 -1
- package/dist/chunk-Q6FMBSK4.js +27 -0
- package/dist/{chunk-HRECTLZO.js → chunk-QIK5MQUL.js} +7 -3
- package/dist/chunk-QKLVFB74.js +45 -0
- package/dist/chunk-QLBOPNV4.cjs +15 -0
- package/dist/chunk-QN3FHV6S.cjs +24 -0
- package/dist/chunk-SRR2GWC7.js +15 -0
- package/dist/chunk-TCMJPIRM.cjs +27 -0
- package/dist/chunk-UCZBNN4I.cjs +19 -0
- package/dist/chunk-UOADEBDH.js +13 -0
- package/dist/{chunk-R7G5MSGO.cjs → chunk-UU2ZF6GC.cjs} +7 -3
- package/dist/chunk-VYMN4FOM.cjs +16 -0
- package/dist/chunk-XAQM2IVP.js +16 -0
- package/dist/{chunk-G6FL4SSB.js → chunk-XBZX5YZW.js} +1 -1
- package/dist/{chunk-AS3WKQP7.js → chunk-XUUIYV6X.js} +3 -0
- package/dist/{chunk-P3YVE7JK.cjs → chunk-YAML5YPL.cjs} +3 -0
- package/dist/{chunk-MPDCMTGO.js → chunk-YAV4Z2HU.js} +5 -5
- package/dist/chunk-Z6NS6N32.js +19 -0
- package/dist/chunk-ZVBCHJA5.js +18 -0
- package/dist/css/fetchUnitValue.cjs +7 -0
- package/dist/css/fetchUnitValue.d.ts +10 -0
- package/dist/css/fetchUnitValue.js +7 -0
- package/dist/css/index.cjs +8 -0
- package/dist/css/index.d.ts +1 -0
- package/dist/css/index.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 +8 -0
- package/dist/html/index.d.ts +1 -0
- package/dist/html/index.js +8 -0
- package/dist/{index-24872dab.d.ts → index-09cd203a.d.ts} +3 -0
- package/dist/{index-82dfd1d9.d.ts → index-1d6e286f.d.ts} +5 -2
- package/dist/index-42672b09.d.ts +36 -0
- package/dist/index-64b035f5.d.ts +13 -0
- package/dist/index-8b70f9ee.d.ts +10 -0
- package/dist/index-b16b81dc.d.ts +22 -0
- package/dist/index-da501f98.d.ts +10 -0
- package/dist/{index-8473d4b5.d.ts → index-fab49d44.d.ts} +4 -1
- package/dist/index.cjs +35 -16
- package/dist/index.d.ts +31 -18
- package/dist/index.js +34 -15
- package/dist/iss/index.cjs +7 -3
- package/dist/iss/index.d.ts +1 -0
- package/dist/iss/index.js +8 -4
- package/dist/judge/index.d.ts +2 -2
- package/dist/name/index.d.ts +1 -1
- package/dist/urls/getImportUrl.cjs +2 -2
- package/dist/urls/getImportUrl.js +1 -1
- package/dist/urls/getImportUrlSuffix.cjs +3 -3
- package/dist/urls/getImportUrlSuffix.js +2 -2
- package/dist/urls/getNewFileName.cjs +8 -0
- package/dist/urls/getNewFileName.d.ts +8 -0
- package/dist/urls/getNewFileName.js +8 -0
- package/dist/urls/getReplaceImportUrl.cjs +8 -0
- package/dist/urls/getReplaceImportUrl.d.ts +9 -0
- package/dist/urls/getReplaceImportUrl.js +8 -0
- package/dist/urls/getSuffix.cjs +7 -0
- package/dist/urls/getSuffix.d.ts +8 -0
- package/dist/urls/getSuffix.js +7 -0
- package/dist/urls/getUrlCatalogueLast.cjs +7 -0
- package/dist/urls/getUrlCatalogueLast.d.ts +8 -0
- package/dist/urls/getUrlCatalogueLast.js +7 -0
- package/dist/urls/getUrlCatalogueObj.cjs +2 -2
- package/dist/urls/getUrlCatalogueObj.d.ts +5 -4
- package/dist/urls/getUrlCatalogueObj.js +1 -1
- package/dist/urls/index.cjs +23 -7
- package/dist/urls/index.d.ts +6 -2
- package/dist/urls/index.js +24 -8
- package/package.json +293 -234
- package/dist/chunk-4J3S27XY.cjs +0 -24
- package/dist/chunk-6ADW34CB.cjs +0 -32
- package/dist/chunk-ETPPNXJN.cjs +0 -20
- package/dist/chunk-WO6JQRTD.js +0 -16
- package/dist/chunk-XRGLFTH2.cjs +0 -16
- package/dist/chunk-YMC5G5SU.js +0 -20
- package/dist/index-0fa8abe5.d.ts +0 -13
- package/dist/index-b1455ca1.d.ts +0 -13
- package/dist/index-e2af3c0a.d.ts +0 -22
- package/dist/{index-172cff2e.d.ts → index-2f15b7ed.d.ts} +1 -1
- package/dist/{index-ceb2f683.d.ts → index-445fe401.d.ts} +2 -2
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkLG7MY5KLcjs = require('./chunk-LG7MY5KL.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkAXMOZZCMcjs = require('./chunk-AXMOZZCM.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkTCMJPIRMcjs = require('./chunk-TCMJPIRM.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunkGD3OA7GUcjs = require('./chunk-GD3OA7GU.cjs');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
var _chunkISHLY7WMcjs = require('./chunk-ISHLY7WM.cjs');
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
|
|
19
|
+
|
|
20
|
+
// packages/basic/array/index.ts
|
|
21
|
+
var array_exports = {};
|
|
22
|
+
_chunk5AZGAKWRcjs.__export.call(void 0, array_exports, {
|
|
23
|
+
asyncMergeArray: () => _chunkTCMJPIRMcjs.asyncMergeArray,
|
|
24
|
+
duplicateRemoval: () => _chunkGD3OA7GUcjs.duplicateRemoval,
|
|
25
|
+
isArray: () => _chunkISHLY7WMcjs.isArray,
|
|
26
|
+
replaceAfter: () => _chunkLG7MY5KLcjs.replaceAfter,
|
|
27
|
+
toggleArray: () => _chunkAXMOZZCMcjs.toggleArray
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
exports.array_exports = array_exports;
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkQLBOPNV4cjs = require('./chunk-QLBOPNV4.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkISHLY7WMcjs = require('./chunk-ISHLY7WM.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
var _chunkMIC3W2VYcjs = require('./chunk-MIC3W2VY.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
9
12
|
var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
|
|
10
13
|
|
|
11
14
|
// packages/iss/index.ts
|
|
12
15
|
var iss_exports = {};
|
|
13
16
|
_chunk5AZGAKWRcjs.__export.call(void 0, iss_exports, {
|
|
14
17
|
isArray: () => _chunkISHLY7WMcjs.isArray,
|
|
15
|
-
isObject: () =>
|
|
18
|
+
isObject: () => _chunkMIC3W2VYcjs.isObject,
|
|
19
|
+
isObjectArray: () => _chunkQLBOPNV4cjs.isObjectArray
|
|
16
20
|
});
|
|
17
21
|
|
|
18
22
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkYAML5YPLcjs = require('./chunk-YAML5YPL.cjs');
|
|
4
|
+
|
|
5
|
+
// packages/urls/getNewFileName.ts
|
|
6
|
+
function getNewFileName(url) {
|
|
7
|
+
const obj = _chunkYAML5YPLcjs.getUrlCatalogueObj.call(void 0, url);
|
|
8
|
+
let wb = obj.name;
|
|
9
|
+
if (wb) {
|
|
10
|
+
const reg = /([0-9]+)$/g;
|
|
11
|
+
const regs = reg.exec(wb);
|
|
12
|
+
if (regs && regs.length > 0) {
|
|
13
|
+
const sl = Number(regs[1]) + 1;
|
|
14
|
+
const reg1 = new RegExp(regs[1] + "$");
|
|
15
|
+
wb = wb.replace(
|
|
16
|
+
reg1,
|
|
17
|
+
(sl + "").padStart(regs[1].length, "0")
|
|
18
|
+
);
|
|
19
|
+
} else {
|
|
20
|
+
wb = wb + "1";
|
|
21
|
+
}
|
|
22
|
+
return obj.catalogue + obj.apart + wb + "." + obj.suffix;
|
|
23
|
+
} else {
|
|
24
|
+
return "";
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
exports.getNewFileName = getNewFileName;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/urls/getSuffix.ts
|
|
2
|
+
function getSuffix(url) {
|
|
3
|
+
const reg = /\.([a-z|A-Z]+)$/;
|
|
4
|
+
const regs = reg.exec(url);
|
|
5
|
+
if (regs && regs.length > 0) {
|
|
6
|
+
return regs[1];
|
|
7
|
+
}
|
|
8
|
+
return "";
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
exports.getSuffix = getSuffix;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fetchUnitValue
|
|
3
|
+
} from "./chunk-QKLVFB74.js";
|
|
4
|
+
import {
|
|
5
|
+
__export
|
|
6
|
+
} from "./chunk-UICA3PK6.js";
|
|
7
|
+
|
|
8
|
+
// packages/css/index.ts
|
|
9
|
+
var css_exports = {};
|
|
10
|
+
__export(css_exports, {
|
|
11
|
+
fetchUnitValue: () => fetchUnitValue
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
css_exports
|
|
16
|
+
};
|
|
@@ -5,6 +5,19 @@ import {
|
|
|
5
5
|
// packages/urls/getImportUrl.ts
|
|
6
6
|
function getImportUrl(url, imp) {
|
|
7
7
|
const arr = getStartSames(url, imp);
|
|
8
|
+
const ts = arr[0];
|
|
9
|
+
if (!/[\\|\/]$/.test(ts)) {
|
|
10
|
+
const regs = ts.match(/[\\|\/]([^\\|\/]*)$/);
|
|
11
|
+
if (regs && regs.length > 0) {
|
|
12
|
+
const a = regs[1];
|
|
13
|
+
arr[0] = ts.substring(
|
|
14
|
+
0,
|
|
15
|
+
regs.index + 1
|
|
16
|
+
);
|
|
17
|
+
arr[1] = a + arr[1];
|
|
18
|
+
arr[2] = a + arr[2];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
8
21
|
const l = arr[1].split(/\\|\//).length - 1;
|
|
9
22
|
let ds = ["./"];
|
|
10
23
|
if (l > 0) {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/array/toggleArray.ts
|
|
2
2
|
function toggleArray(arr, obj, id) {
|
|
3
|
-
|
|
3
|
+
const varr = [];
|
|
4
4
|
let is = true;
|
|
5
5
|
for (let index = 0; index < arr.length; index++) {
|
|
6
6
|
const element = arr[index];
|
|
7
|
-
|
|
7
|
+
const vs = obj;
|
|
8
|
+
if (element[id] === vs[id]) {
|
|
8
9
|
is = false;
|
|
9
10
|
} else {
|
|
10
|
-
varr.push(
|
|
11
|
+
varr.push(arr[index]);
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
if (is) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// packages/urls/getUrlCatalogueLast.ts
|
|
2
|
+
function getUrlCatalogueLast(str) {
|
|
3
|
+
const reg = /(\\|\/)([^\\|\/]+)(\\|\/)?(([^\\|\/]+)(\.[a-z|A-Z]+))?$/g;
|
|
4
|
+
const arr = reg.exec(str);
|
|
5
|
+
if (arr && arr.length > 0) {
|
|
6
|
+
return arr[2];
|
|
7
|
+
}
|
|
8
|
+
return "";
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
getUrlCatalogueLast
|
|
13
|
+
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
splitUpper
|
|
3
|
+
} from "./chunk-Z6NS6N32.js";
|
|
1
4
|
import {
|
|
2
5
|
getStartSame
|
|
3
6
|
} from "./chunk-7DTHADVK.js";
|
|
@@ -28,7 +31,8 @@ __export(string_exports, {
|
|
|
28
31
|
firstLower: () => firstLower,
|
|
29
32
|
firstUpper: () => firstUpper,
|
|
30
33
|
getStartSame: () => getStartSame,
|
|
31
|
-
getStartSames: () => getStartSames
|
|
34
|
+
getStartSames: () => getStartSames,
|
|
35
|
+
splitUpper: () => splitUpper
|
|
32
36
|
});
|
|
33
37
|
|
|
34
38
|
export {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getStartSames
|
|
3
|
+
} from "./chunk-A276ZDLP.js";
|
|
4
|
+
|
|
5
|
+
// packages/urls/getReplaceImportUrl.ts
|
|
6
|
+
function getReplaceImportUrl(url, imp) {
|
|
7
|
+
const arr = getStartSames(url, imp);
|
|
8
|
+
const ts = arr[0];
|
|
9
|
+
if (!/[\\|\/]$/.test(ts)) {
|
|
10
|
+
const regs = ts.match(/[\\|\/]([^\\|\/]*)$/);
|
|
11
|
+
if (regs && regs.length > 0) {
|
|
12
|
+
const a = regs[1];
|
|
13
|
+
arr[0] = ts.substring(
|
|
14
|
+
0,
|
|
15
|
+
regs.index + 1
|
|
16
|
+
);
|
|
17
|
+
arr[1] = a + arr[1];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const l = arr[1].split(/\\|\//).length - 1;
|
|
21
|
+
let ds = ["./"];
|
|
22
|
+
if (l > 0) {
|
|
23
|
+
ds = [];
|
|
24
|
+
for (let index = 0; index < l; index++) {
|
|
25
|
+
ds.push("../");
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return ds.join("");
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
getReplaceImportUrl
|
|
33
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkPW7RP73Jcjs = require('./chunk-PW7RP73J.cjs');
|
|
4
|
+
|
|
5
|
+
// packages/urls/getReplaceImportUrl.ts
|
|
6
|
+
function getReplaceImportUrl(url, imp) {
|
|
7
|
+
const arr = _chunkPW7RP73Jcjs.getStartSames.call(void 0, url, imp);
|
|
8
|
+
const ts = arr[0];
|
|
9
|
+
if (!/[\\|\/]$/.test(ts)) {
|
|
10
|
+
const regs = ts.match(/[\\|\/]([^\\|\/]*)$/);
|
|
11
|
+
if (regs && regs.length > 0) {
|
|
12
|
+
const a = regs[1];
|
|
13
|
+
arr[0] = ts.substring(
|
|
14
|
+
0,
|
|
15
|
+
regs.index + 1
|
|
16
|
+
);
|
|
17
|
+
arr[1] = a + arr[1];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const l = arr[1].split(/\\|\//).length - 1;
|
|
21
|
+
let ds = ["./"];
|
|
22
|
+
if (l > 0) {
|
|
23
|
+
ds = [];
|
|
24
|
+
for (let index = 0; index < l; index++) {
|
|
25
|
+
ds.push("../");
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return ds.join("");
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
exports.getReplaceImportUrl = getReplaceImportUrl;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
replaceAfter
|
|
3
|
+
} from "./chunk-GOH6G74S.js";
|
|
4
|
+
import {
|
|
5
|
+
toggleArray
|
|
6
|
+
} from "./chunk-GOJN3OQ4.js";
|
|
7
|
+
import {
|
|
8
|
+
asyncMergeArray
|
|
9
|
+
} from "./chunk-Q6FMBSK4.js";
|
|
10
|
+
import {
|
|
11
|
+
duplicateRemoval
|
|
12
|
+
} from "./chunk-ZVBCHJA5.js";
|
|
13
|
+
import {
|
|
14
|
+
isArray
|
|
15
|
+
} from "./chunk-5PX3AFSC.js";
|
|
16
|
+
import {
|
|
17
|
+
__export
|
|
18
|
+
} from "./chunk-UICA3PK6.js";
|
|
19
|
+
|
|
20
|
+
// packages/basic/array/index.ts
|
|
21
|
+
var array_exports = {};
|
|
22
|
+
__export(array_exports, {
|
|
23
|
+
asyncMergeArray: () => asyncMergeArray,
|
|
24
|
+
duplicateRemoval: () => duplicateRemoval,
|
|
25
|
+
isArray: () => isArray,
|
|
26
|
+
replaceAfter: () => replaceAfter,
|
|
27
|
+
toggleArray: () => toggleArray
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
array_exports
|
|
32
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// 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
|
+
|
|
20
|
+
|
|
21
|
+
exports.htmlEscape = htmlEscape;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/array/duplicateRemoval.ts
|
|
2
|
+
function duplicateRemoval(arr, key) {
|
|
3
|
+
const ks = [];
|
|
4
|
+
const arrs = [];
|
|
5
|
+
for (let index = 0; index < arr.length; index++) {
|
|
6
|
+
const element = arr[index];
|
|
7
|
+
const v = element[key];
|
|
8
|
+
if (!ks.includes(v)) {
|
|
9
|
+
ks.push(v);
|
|
10
|
+
arrs.push(arr[index]);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return arrs;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
exports.duplicateRemoval = duplicateRemoval;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// packages/basic/array/replaceAfter.ts
|
|
2
|
+
function replaceAfter(arr, obj, id) {
|
|
3
|
+
const varr = [];
|
|
4
|
+
for (let index = 0; index < arr.length; index++) {
|
|
5
|
+
const element = arr[index];
|
|
6
|
+
const vs = obj;
|
|
7
|
+
if (element[id] !== vs[id]) {
|
|
8
|
+
varr.push(arr[index]);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
varr.push(obj);
|
|
12
|
+
return varr;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
replaceAfter
|
|
17
|
+
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
// packages/basic/array/toggleArray.ts
|
|
2
2
|
function toggleArray(arr, obj, id) {
|
|
3
|
-
|
|
3
|
+
const varr = [];
|
|
4
4
|
let is = true;
|
|
5
5
|
for (let index = 0; index < arr.length; index++) {
|
|
6
6
|
const element = arr[index];
|
|
7
|
-
|
|
7
|
+
const vs = obj;
|
|
8
|
+
if (element[id] === vs[id]) {
|
|
8
9
|
is = false;
|
|
9
10
|
} else {
|
|
10
|
-
varr.push(
|
|
11
|
+
varr.push(arr[index]);
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
if (is) {
|
|
@@ -5,6 +5,19 @@ var _chunkPW7RP73Jcjs = require('./chunk-PW7RP73J.cjs');
|
|
|
5
5
|
// packages/urls/getImportUrl.ts
|
|
6
6
|
function getImportUrl(url, imp) {
|
|
7
7
|
const arr = _chunkPW7RP73Jcjs.getStartSames.call(void 0, url, imp);
|
|
8
|
+
const ts = arr[0];
|
|
9
|
+
if (!/[\\|\/]$/.test(ts)) {
|
|
10
|
+
const regs = ts.match(/[\\|\/]([^\\|\/]*)$/);
|
|
11
|
+
if (regs && regs.length > 0) {
|
|
12
|
+
const a = regs[1];
|
|
13
|
+
arr[0] = ts.substring(
|
|
14
|
+
0,
|
|
15
|
+
regs.index + 1
|
|
16
|
+
);
|
|
17
|
+
arr[1] = a + arr[1];
|
|
18
|
+
arr[2] = a + arr[2];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
8
21
|
const l = arr[1].split(/\\|\//).length - 1;
|
|
9
22
|
let ds = ["./"];
|
|
10
23
|
if (l > 0) {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunk6RIGEV6Gcjs = require('./chunk-6RIGEV6G.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunk6A6EAFGLcjs = require('./chunk-6A6EAFGL.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkDILKJQYVcjs = require('./chunk-DILKJQYV.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunk3ERQHPTDcjs = require('./chunk-3ERQHPTD.cjs');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
var _chunk27WA7EI2cjs = require('./chunk-27WA7EI2.cjs');
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var _chunkIRKWYW5Bcjs = require('./chunk-IRKWYW5B.cjs');
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
var _chunk5V52TYPZcjs = require('./chunk-5V52TYPZ.cjs');
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
var _chunkYAML5YPLcjs = require('./chunk-YAML5YPL.cjs');
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
var _chunkDKQWP2SZcjs = require('./chunk-DKQWP2SZ.cjs');
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
|
|
31
|
+
|
|
32
|
+
// packages/urls/index.ts
|
|
33
|
+
var urls_exports = {};
|
|
34
|
+
_chunk5AZGAKWRcjs.__export.call(void 0, urls_exports, {
|
|
35
|
+
getImportUrl: () => _chunkIRKWYW5Bcjs.getImportUrl,
|
|
36
|
+
getImportUrlSuffix: () => _chunk27WA7EI2cjs.getImportUrlSuffix,
|
|
37
|
+
getNewFileName: () => _chunk5V52TYPZcjs.getNewFileName,
|
|
38
|
+
getReplaceImportUrl: () => _chunkDKQWP2SZcjs.getReplaceImportUrl,
|
|
39
|
+
getReplaceUrl: () => _chunk6RIGEV6Gcjs.getReplaceUrl,
|
|
40
|
+
getSuffix: () => _chunk6A6EAFGLcjs.getSuffix,
|
|
41
|
+
getUrlCatalogue: () => _chunkDILKJQYVcjs.getUrlCatalogue,
|
|
42
|
+
getUrlCatalogueLast: () => _chunk3ERQHPTDcjs.getUrlCatalogueLast,
|
|
43
|
+
getUrlCatalogueObj: () => _chunkYAML5YPLcjs.getUrlCatalogueObj
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
exports.urls_exports = urls_exports;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/array/replaceAfter.ts
|
|
2
|
+
function replaceAfter(arr, obj, id) {
|
|
3
|
+
const varr = [];
|
|
4
|
+
for (let index = 0; index < arr.length; index++) {
|
|
5
|
+
const element = arr[index];
|
|
6
|
+
const vs = obj;
|
|
7
|
+
if (element[id] !== vs[id]) {
|
|
8
|
+
varr.push(arr[index]);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
varr.push(obj);
|
|
12
|
+
return varr;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
exports.replaceAfter = replaceAfter;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkO2RP4UZQcjs = require('./chunk-O2RP4UZQ.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
|
|
7
|
+
|
|
8
|
+
// packages/css/index.ts
|
|
9
|
+
var css_exports = {};
|
|
10
|
+
_chunk5AZGAKWRcjs.__export.call(void 0, css_exports, {
|
|
11
|
+
fetchUnitValue: () => _chunkO2RP4UZQcjs.fetchUnitValue
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
exports.css_exports = css_exports;
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/css/fetchUnitValue.ts
|
|
2
|
+
var tops = [
|
|
3
|
+
"\n",
|
|
4
|
+
"\r",
|
|
5
|
+
" ",
|
|
6
|
+
"+",
|
|
7
|
+
"-",
|
|
8
|
+
"*",
|
|
9
|
+
"/",
|
|
10
|
+
":",
|
|
11
|
+
"("
|
|
12
|
+
];
|
|
13
|
+
var ends = [
|
|
14
|
+
"\n",
|
|
15
|
+
"\r",
|
|
16
|
+
" ",
|
|
17
|
+
"+",
|
|
18
|
+
"-",
|
|
19
|
+
"*",
|
|
20
|
+
"/",
|
|
21
|
+
";",
|
|
22
|
+
")",
|
|
23
|
+
"}"
|
|
24
|
+
];
|
|
25
|
+
function fetchUnitValue(text, str, callback) {
|
|
26
|
+
const reg = new RegExp(`([-]?[0-9\\.]+)(${str})`, "g");
|
|
27
|
+
return text.replace(reg, function(a, b, c, d) {
|
|
28
|
+
let is = false;
|
|
29
|
+
const q = text.charAt(d - 1);
|
|
30
|
+
const h = text.charAt(d + a.length);
|
|
31
|
+
const s = Number(b);
|
|
32
|
+
if (!isNaN(s) && tops.includes(q) && ends.includes(h)) {
|
|
33
|
+
is = true;
|
|
34
|
+
}
|
|
35
|
+
let thv = a;
|
|
36
|
+
if (callback && is) {
|
|
37
|
+
thv = callback(s, c, a, d);
|
|
38
|
+
}
|
|
39
|
+
return thv;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
exports.fetchUnitValue = fetchUnitValue;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
+
var _chunkUCZBNN4Icjs = require('./chunk-UCZBNN4I.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
var _chunkJ7S3KBHLcjs = require('./chunk-J7S3KBHL.cjs');
|
|
4
7
|
|
|
5
8
|
|
|
@@ -28,7 +31,8 @@ _chunk5AZGAKWRcjs.__export.call(void 0, string_exports, {
|
|
|
28
31
|
firstLower: () => _chunkUEVMS6QDcjs.firstLower,
|
|
29
32
|
firstUpper: () => _chunkOQL4GIEJcjs.firstUpper,
|
|
30
33
|
getStartSame: () => _chunkJ7S3KBHLcjs.getStartSame,
|
|
31
|
-
getStartSames: () => _chunkPW7RP73Jcjs.getStartSames
|
|
34
|
+
getStartSames: () => _chunkPW7RP73Jcjs.getStartSames,
|
|
35
|
+
splitUpper: () => _chunkUCZBNN4Icjs.splitUpper
|
|
32
36
|
});
|
|
33
37
|
|
|
34
38
|
|
|
@@ -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
|
+
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
isObjectArray
|
|
3
|
+
} from "./chunk-SRR2GWC7.js";
|
|
4
4
|
import {
|
|
5
5
|
isArray
|
|
6
6
|
} from "./chunk-5PX3AFSC.js";
|
|
7
|
+
import {
|
|
8
|
+
isObject
|
|
9
|
+
} from "./chunk-MXY4W3K5.js";
|
|
7
10
|
import {
|
|
8
11
|
__export
|
|
9
12
|
} from "./chunk-UICA3PK6.js";
|
|
@@ -12,7 +15,8 @@ import {
|
|
|
12
15
|
var iss_exports = {};
|
|
13
16
|
__export(iss_exports, {
|
|
14
17
|
isArray: () => isArray,
|
|
15
|
-
isObject: () => isObject
|
|
18
|
+
isObject: () => isObject,
|
|
19
|
+
isObjectArray: () => isObjectArray
|
|
16
20
|
});
|
|
17
21
|
|
|
18
22
|
export {
|