diginext-utils 2.0.5 → 2.0.8
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/Checker.d.ts +0 -1
- package/dist/Checker.js +27 -45
- package/dist/Checker.js.map +1 -0
- package/dist/EventDispatcher.d.ts +1 -3
- package/dist/EventDispatcher.js +47 -70
- package/dist/EventDispatcher.js.map +1 -0
- package/dist/FileUpload.d.ts +0 -1
- package/dist/FileUpload.js +61 -79
- package/dist/FileUpload.js.map +1 -0
- package/dist/Slug.d.ts +0 -1
- package/dist/Slug.js +329 -347
- package/dist/Slug.js.map +1 -0
- package/dist/Timer.d.ts +1 -3
- package/dist/Timer.js +8 -32
- package/dist/Timer.js.map +1 -0
- package/dist/Validation.d.ts +1 -3
- package/dist/Validation.js +38 -55
- package/dist/Validation.js.map +1 -0
- package/dist/array.d.ts +19 -21
- package/dist/array.js +264 -242
- package/dist/array.js.map +1 -0
- package/dist/color.d.ts +7 -9
- package/dist/color.js +78 -87
- package/dist/color.js.map +1 -0
- package/dist/console/enableConsole.d.ts +1 -3
- package/dist/console/enableConsole.js +10 -36
- package/dist/console/enableConsole.js.map +1 -0
- package/dist/console/index.d.ts +3 -5
- package/dist/console/index.js +15 -42
- package/dist/console/index.js.map +1 -0
- package/dist/device/browser.d.ts +5 -7
- package/dist/device/browser.js +33 -60
- package/dist/device/browser.js.map +1 -0
- package/dist/device/camera.d.ts +7 -16
- package/dist/device/camera.js +167 -187
- package/dist/device/camera.js.map +1 -0
- package/dist/device.d.ts +4 -6
- package/dist/device.js +210 -190
- package/dist/device.js.map +1 -0
- package/dist/file/createDir.d.ts +1 -2
- package/dist/file/createDir.js +14 -34
- package/dist/file/createDir.js.map +1 -0
- package/dist/file/fileMove.d.ts +1 -3
- package/dist/file/fileMove.js +30 -49
- package/dist/file/fileMove.js.map +1 -0
- package/dist/file/findFilesByExt.d.ts +0 -1
- package/dist/file/findFilesByExt.js +40 -58
- package/dist/file/findFilesByExt.js.map +1 -0
- package/dist/index.d.ts +16 -12
- package/dist/index.js +33 -906
- package/dist/index.js.map +1 -0
- package/dist/math/diffDate.d.ts +1 -3
- package/dist/math/diffDate.js +11 -31
- package/dist/math/diffDate.js.map +1 -0
- package/dist/math/index.d.ts +8 -10
- package/dist/math/index.js +87 -71
- package/dist/math/index.js.map +1 -0
- package/dist/math/positiveNumber.d.ts +1 -3
- package/dist/math/positiveNumber.js +14 -51
- package/dist/math/positiveNumber.js.map +1 -0
- package/dist/name/en.d.ts +1 -3
- package/dist/name/en.js +18 -34
- package/dist/name/en.js.map +1 -0
- package/dist/name/vi.d.ts +1 -3
- package/dist/name/vi.js +24 -60
- package/dist/name/vi.js.map +1 -0
- package/dist/object.d.ts +9 -11
- package/dist/object.js +57 -82
- package/dist/object.js.map +1 -0
- package/dist/permission/requestCamera.d.ts +2 -3
- package/dist/permission/requestCamera.js +38 -47
- package/dist/permission/requestCamera.js.map +1 -0
- package/dist/permission/requestDeviceOrientationControl.d.ts +0 -1
- package/dist/permission/requestDeviceOrientationControl.js +36 -198
- package/dist/permission/requestDeviceOrientationControl.js.map +1 -0
- package/dist/string/formatNumber.d.ts +1 -3
- package/dist/string/formatNumber.js +12 -51
- package/dist/string/formatNumber.js.map +1 -0
- package/dist/string/generatePassword.d.ts +1 -3
- package/dist/string/generatePassword.js +21 -50
- package/dist/string/generatePassword.js.map +1 -0
- package/dist/string/generateUUID.d.ts +1 -3
- package/dist/string/generateUUID.js +34 -35
- package/dist/string/generateUUID.js.map +1 -0
- package/dist/string/index.d.ts +8 -10
- package/dist/string/index.js +119 -127
- package/dist/string/index.js.map +1 -0
- package/dist/string/random.d.ts +6 -8
- package/dist/string/random.js +21 -50
- package/dist/string/random.js.map +1 -0
- package/dist/string/trimNull.d.ts +1 -3
- package/dist/string/trimNull.js +15 -41
- package/dist/string/trimNull.js.map +1 -0
- package/dist/string/url.d.ts +7 -14
- package/dist/string/url.js +93 -108
- package/dist/string/url.js.map +1 -0
- package/package.json +6 -9
- package/src/Checker.ts +27 -0
- package/src/EventDispatcher.ts +60 -0
- package/src/FileUpload.ts +65 -0
- package/src/Slug.ts +364 -0
- package/src/Timer.ts +5 -0
- package/src/Validation.ts +35 -0
- package/src/array.ts +261 -0
- package/src/color.ts +89 -0
- package/src/console/enableConsole.ts +6 -0
- package/src/console/index.ts +11 -0
- package/src/device/browser.ts +29 -0
- package/src/device/camera.ts +209 -0
- package/src/device.ts +223 -0
- package/src/file/createDir.ts +14 -0
- package/src/file/fileMove.ts +32 -0
- package/src/file/findFilesByExt.ts +39 -0
- package/src/index.ts +17 -0
- package/src/math/diffDate.ts +8 -0
- package/src/math/index.ts +88 -0
- package/src/math/positiveNumber.ts +10 -0
- package/src/name/en.ts +24 -0
- package/src/name/vi.ts +21 -0
- package/src/object.ts +49 -0
- package/src/permission/requestCamera.ts +43 -0
- package/src/permission/requestDeviceOrientationControl.ts +33 -0
- package/src/string/formatNumber.ts +10 -0
- package/src/string/generatePassword.ts +16 -0
- package/src/string/generateUUID.ts +35 -0
- package/src/string/index.ts +145 -0
- package/src/string/random.ts +20 -0
- package/src/string/trimNull.ts +11 -0
- package/src/string/url.ts +109 -0
- package/dist/.DS_Store +0 -0
- package/dist/Checker.mjs +0 -26
- package/dist/EventDispatcher.mjs +0 -52
- package/dist/FileUpload.mjs +0 -60
- package/dist/Slug.mjs +0 -328
- package/dist/Timer.mjs +0 -7
- package/dist/Validation.mjs +0 -34
- package/dist/array.mjs +0 -44
- package/dist/chunk-2R5DRG2S.mjs +0 -28
- package/dist/chunk-3NMJTC44.mjs +0 -146
- package/dist/chunk-5AL36RZR.mjs +0 -54
- package/dist/chunk-7UXN7I4K.mjs +0 -96
- package/dist/chunk-A4YWYLCH.mjs +0 -23
- package/dist/chunk-AHFJBIQJ.mjs +0 -10
- package/dist/chunk-AKU6F3WT.mjs +0 -11
- package/dist/chunk-ALNAD4H7.mjs +0 -10
- package/dist/chunk-FOWYH6LL.mjs +0 -38
- package/dist/chunk-FTE6FZSH.mjs +0 -24
- package/dist/chunk-LXQIKFED.mjs +0 -17
- package/dist/chunk-NLQXFCPR.mjs +0 -30
- package/dist/chunk-QXFH3X2K.mjs +0 -49
- package/dist/chunk-R2BH5I6O.mjs +0 -9
- package/dist/chunk-S2U7F2JJ.mjs +0 -207
- package/dist/chunk-UKRVCU5M.mjs +0 -171
- package/dist/color.mjs +0 -68
- package/dist/console/enableConsole.mjs +0 -11
- package/dist/console/index.mjs +0 -18
- package/dist/device/browser.mjs +0 -39
- package/dist/device/camera.mjs +0 -146
- package/dist/device.mjs +0 -13
- package/dist/file/createDir.mjs +0 -16
- package/dist/file/fileMove.mjs +0 -32
- package/dist/file/findFilesByExt.mjs +0 -42
- package/dist/index.mjs +0 -143
- package/dist/math/diffDate.mjs +0 -11
- package/dist/math/index.mjs +0 -21
- package/dist/math/positiveNumber.mjs +0 -19
- package/dist/name/en.mjs +0 -18
- package/dist/name/vi.mjs +0 -34
- package/dist/object.mjs +0 -17
- package/dist/permission/requestCamera.mjs +0 -7
- package/dist/permission/requestDeviceOrientationControl.mjs +0 -176
- package/dist/string/formatNumber.mjs +0 -13
- package/dist/string/generatePassword.mjs +0 -22
- package/dist/string/generateUUID.mjs +0 -15
- package/dist/string/index.mjs +0 -96
- package/dist/string/random.mjs +0 -17
- package/dist/string/trimNull.mjs +0 -16
- package/dist/string/url.mjs +0 -79
package/dist/Timer.js
CHANGED
|
@@ -1,33 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Timer = void 0;
|
|
4
|
+
exports.Timer = {
|
|
5
|
+
wait: async (ms) => {
|
|
6
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
7
|
+
},
|
|
8
8
|
};
|
|
9
|
-
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// src/Timer.ts
|
|
20
|
-
var Timer_exports = {};
|
|
21
|
-
__export(Timer_exports, {
|
|
22
|
-
Timer: () => Timer
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(Timer_exports);
|
|
25
|
-
var Timer = {
|
|
26
|
-
wait: async (ms) => {
|
|
27
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
-
0 && (module.exports = {
|
|
32
|
-
Timer
|
|
33
|
-
});
|
|
9
|
+
//# sourceMappingURL=Timer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Timer.js","sourceRoot":"","sources":["../src/Timer.ts"],"names":[],"mappings":";;;AAAa,QAAA,KAAK,GAAG;IACpB,IAAI,EAAE,KAAK,EAAE,EAAU,EAAE,EAAE;QAC1B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;IAC1D,CAAC;CACD,CAAC"}
|
package/dist/Validation.d.ts
CHANGED
package/dist/Validation.js
CHANGED
|
@@ -1,56 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Validation = void 0;
|
|
4
|
+
exports.Validation = {
|
|
5
|
+
imageValidate(file) {
|
|
6
|
+
// console.log("imageValidate")
|
|
7
|
+
var maxSize = 10;
|
|
8
|
+
var fileSize = 1024 * 1024 * maxSize; // 10mb
|
|
9
|
+
var fileTypes = ["image/png", "image/jpeg"];
|
|
10
|
+
// var isFileValid = true;
|
|
11
|
+
if (!file || fileTypes.indexOf(file.type) < 0) {
|
|
12
|
+
alert("Vui lòng upload ảnh đúng định dạng jpg hay png");
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
else if (file.size > fileSize) {
|
|
16
|
+
alert("Vui lòng upload ảnh có dung lượng thấp hơn " + maxSize + "mb");
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
return true;
|
|
20
|
+
},
|
|
21
|
+
videoValidate(file) {
|
|
22
|
+
// console.log("videoValidate")
|
|
23
|
+
var maxSize = 15;
|
|
24
|
+
var fileSize = 1024 * 1024 * maxSize; // 10mb
|
|
25
|
+
var fileTypes = "video";
|
|
26
|
+
// console.log(file.type)
|
|
27
|
+
// var isFileValid = true;
|
|
28
|
+
if (!file || file.type.indexOf(fileTypes) < 0) {
|
|
29
|
+
alert("Vui lòng upload video");
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
else if (file.size > fileSize) {
|
|
33
|
+
alert("Vui lòng upload video có dung lượng thấp hơn " + maxSize + "mb");
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
return true;
|
|
37
|
+
},
|
|
8
38
|
};
|
|
9
|
-
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// src/Validation.ts
|
|
20
|
-
var Validation_exports = {};
|
|
21
|
-
__export(Validation_exports, {
|
|
22
|
-
Validation: () => Validation
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(Validation_exports);
|
|
25
|
-
var Validation = {
|
|
26
|
-
imageValidate(file) {
|
|
27
|
-
var maxSize = 10;
|
|
28
|
-
var fileSize = 1024 * 1024 * maxSize;
|
|
29
|
-
var fileTypes = ["image/png", "image/jpeg"];
|
|
30
|
-
if (!file || fileTypes.indexOf(file.type) < 0) {
|
|
31
|
-
alert("Vui l\xF2ng upload \u1EA3nh \u0111\xFAng \u0111\u1ECBnh d\u1EA1ng jpg hay png");
|
|
32
|
-
return false;
|
|
33
|
-
} else if (file.size > fileSize) {
|
|
34
|
-
alert("Vui l\xF2ng upload \u1EA3nh c\xF3 dung l\u01B0\u1EE3ng th\u1EA5p h\u01A1n " + maxSize + "mb");
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
return true;
|
|
38
|
-
},
|
|
39
|
-
videoValidate(file) {
|
|
40
|
-
var maxSize = 15;
|
|
41
|
-
var fileSize = 1024 * 1024 * maxSize;
|
|
42
|
-
var fileTypes = "video";
|
|
43
|
-
if (!file || file.type.indexOf(fileTypes) < 0) {
|
|
44
|
-
alert("Vui l\xF2ng upload video");
|
|
45
|
-
return false;
|
|
46
|
-
} else if (file.size > fileSize) {
|
|
47
|
-
alert("Vui l\xF2ng upload video c\xF3 dung l\u01B0\u1EE3ng th\u1EA5p h\u01A1n " + maxSize + "mb");
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
return true;
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
54
|
-
0 && (module.exports = {
|
|
55
|
-
Validation
|
|
56
|
-
});
|
|
39
|
+
//# sourceMappingURL=Validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Validation.js","sourceRoot":"","sources":["../src/Validation.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;IACzB,aAAa,CAAC,IAAU;QACvB,+BAA+B;QAC/B,IAAI,OAAO,GAAG,EAAE,CAAC;QACjB,IAAI,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,OAAO,CAAC,CAAC,OAAO;QAC7C,IAAI,SAAS,GAAG,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;QAC5C,0BAA0B;QAC1B,IAAI,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;YAC9C,KAAK,CAAC,gDAAgD,CAAC,CAAC;YACxD,OAAO,KAAK,CAAC;SACb;aAAM,IAAI,IAAI,CAAC,IAAI,GAAG,QAAQ,EAAE;YAChC,KAAK,CAAC,6CAA6C,GAAG,OAAO,GAAG,IAAI,CAAC,CAAC;YACtE,OAAO,KAAK,CAAC;SACb;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,aAAa,CAAC,IAAU;QACvB,+BAA+B;QAE/B,IAAI,OAAO,GAAG,EAAE,CAAC;QACjB,IAAI,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,OAAO,CAAC,CAAC,OAAO;QAC7C,IAAI,SAAS,GAAG,OAAO,CAAC;QACxB,yBAAyB;QACzB,0BAA0B;QAC1B,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE;YAC9C,KAAK,CAAC,uBAAuB,CAAC,CAAC;YAC/B,OAAO,KAAK,CAAC;SACb;aAAM,IAAI,IAAI,CAAC,IAAI,GAAG,QAAQ,EAAE;YAChC,KAAK,CAAC,+CAA+C,GAAG,OAAO,GAAG,IAAI,CAAC,CAAC;YACxE,OAAO,KAAK,CAAC;SACb;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAC"}
|
package/dist/array.d.ts
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
declare const sumArray: (array: [], key: string) => number;
|
|
1
|
+
export declare const sumArray: (array: [], key: string) => number;
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @param {Array} array
|
|
5
5
|
* @param {string} key
|
|
6
6
|
* @returns {Number}
|
|
7
7
|
*/
|
|
8
|
-
declare const averageArray: (array: [], key: string) => number;
|
|
8
|
+
export declare const averageArray: (array: [], key: string) => number;
|
|
9
9
|
/**
|
|
10
10
|
*
|
|
11
11
|
* @param {Array} array
|
|
12
12
|
* @param {string} key
|
|
13
13
|
* @returns {Number}
|
|
14
14
|
*/
|
|
15
|
-
declare const minArray: (array: [], key: string) => number;
|
|
15
|
+
export declare const minArray: (array: [], key: string) => number;
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @param {Array} array
|
|
19
19
|
* @param {string} key
|
|
20
20
|
* @returns {Number}
|
|
21
21
|
*/
|
|
22
|
-
declare const maxArray: (array: [], key: string) => number;
|
|
22
|
+
export declare const maxArray: (array: [], key: string) => number;
|
|
23
23
|
/**
|
|
24
24
|
*
|
|
25
25
|
* @param {Array} array
|
|
26
26
|
* @param {string} key
|
|
27
27
|
* @returns {Array}
|
|
28
28
|
*/
|
|
29
|
-
declare const sortElementByString: (array: any, key: string) => any[];
|
|
29
|
+
export declare const sortElementByString: (array: any, key: string) => any[] | undefined;
|
|
30
30
|
/**
|
|
31
31
|
*
|
|
32
32
|
* @param {Array} array
|
|
33
33
|
* @param {string} key
|
|
34
34
|
* @returns {Array}
|
|
35
35
|
*/
|
|
36
|
-
declare const sortElementByNumber: (array: any, key: string) => any[];
|
|
36
|
+
export declare const sortElementByNumber: (array: any, key: string) => any[] | undefined;
|
|
37
37
|
/**
|
|
38
38
|
*
|
|
39
39
|
* @param {Array} array
|
|
40
40
|
* @returns {any}
|
|
41
41
|
*/
|
|
42
|
-
declare const firstElement: (array: any[]) => any;
|
|
42
|
+
export declare const firstElement: (array: any[]) => any;
|
|
43
43
|
/**
|
|
44
44
|
*
|
|
45
45
|
* @param {Array} array
|
|
46
46
|
* @returns {any}
|
|
47
47
|
*/
|
|
48
|
-
declare const lastElement: (array: any[]) => any;
|
|
48
|
+
export declare const lastElement: (array: any[]) => any;
|
|
49
49
|
/**
|
|
50
50
|
*
|
|
51
51
|
* @param {Array} array
|
|
52
52
|
* @returns {any}
|
|
53
53
|
*/
|
|
54
|
-
declare const randomIndex: (array: any[]) => number;
|
|
54
|
+
export declare const randomIndex: (array: any[]) => number;
|
|
55
55
|
/**
|
|
56
56
|
*
|
|
57
57
|
* @param {Array} array
|
|
58
58
|
* @returns {any}
|
|
59
59
|
*/
|
|
60
|
-
declare const randomElement: (array: any[]) => any;
|
|
60
|
+
export declare const randomElement: (array: any[]) => any;
|
|
61
61
|
/**
|
|
62
62
|
* Remove same elements from 2 arrays
|
|
63
63
|
*/
|
|
64
|
-
declare const mergeAndMakeUniqueElement: (list1: any[], list2: any[], key: string) => any[];
|
|
64
|
+
export declare const mergeAndMakeUniqueElement: (list1: any[], list2: any[], key: string) => any[] | undefined;
|
|
65
65
|
/**
|
|
66
66
|
* check target == toMatch
|
|
67
67
|
* @param {Array} target
|
|
68
68
|
* @param {Array} toMatch
|
|
69
69
|
* @returns {Boolean}
|
|
70
70
|
*/
|
|
71
|
-
declare const allMatchInArray: (target: any[], toMatch: any[]) => boolean;
|
|
72
|
-
declare const removeItem: (item: any, array: any[]) => any[];
|
|
73
|
-
declare const removeItemByKey: (key: string, value: any, array: any[]) => any[];
|
|
74
|
-
declare const getRandom: (array: any[], n: number) => any[];
|
|
71
|
+
export declare const allMatchInArray: (target: any[], toMatch: any[]) => boolean;
|
|
72
|
+
export declare const removeItem: (item: any, array: any[]) => any[];
|
|
73
|
+
export declare const removeItemByKey: (key: string, value: any, array: any[]) => any[];
|
|
74
|
+
export declare const getRandom: (array: any[], n: number) => any[];
|
|
75
75
|
/**
|
|
76
76
|
* Get an array with shuffle element
|
|
77
77
|
*/
|
|
78
|
-
declare const getHalfRandom: (array: any[], n: number) => any[];
|
|
78
|
+
export declare const getHalfRandom: (array: any[], n: number) => any[];
|
|
79
79
|
/**
|
|
80
80
|
* Make array shuffle itself
|
|
81
81
|
*/
|
|
82
|
-
declare const shuffle: (array: any[]) => any[];
|
|
82
|
+
export declare const shuffle: (array: any[]) => any[];
|
|
83
83
|
/**
|
|
84
84
|
*
|
|
85
85
|
* @param {Array} array
|
|
@@ -87,7 +87,5 @@ declare const shuffle: (array: any[]) => any[];
|
|
|
87
87
|
* @param {Number} newIndex
|
|
88
88
|
* @returns {Array}
|
|
89
89
|
*/
|
|
90
|
-
declare const moveIndex: (array: any[], oldIndex: number, newIndex: number) => any[];
|
|
91
|
-
declare const moveArray: (array: any[], oldIndex: number, newIndex: number) => any[];
|
|
92
|
-
|
|
93
|
-
export { allMatchInArray, averageArray, firstElement, getHalfRandom, getRandom, lastElement, maxArray, mergeAndMakeUniqueElement, minArray, moveArray, moveIndex, randomElement, randomIndex, removeItem, removeItemByKey, shuffle, sortElementByNumber, sortElementByString, sumArray };
|
|
90
|
+
export declare const moveIndex: (array: any[], oldIndex: number, newIndex: number) => any[];
|
|
91
|
+
export declare const moveArray: (array: any[], oldIndex: number, newIndex: number) => any[];
|