diginext-utils 2.0.31 → 2.0.33
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/README.md +162 -162
- package/dist/Checker.d.ts +8 -7
- package/dist/Checker.js +48 -28
- package/dist/Checker.mjs +29 -0
- package/dist/EventDispatcher.d.ts +12 -12
- package/dist/EventDispatcher.js +72 -47
- package/dist/EventDispatcher.mjs +54 -0
- package/dist/FileUpload.d.ts +11 -11
- package/dist/FileUpload.js +81 -61
- package/dist/FileUpload.mjs +62 -0
- package/dist/Slug.d.ts +9 -8
- package/dist/Slug.js +350 -330
- package/dist/Slug.mjs +331 -0
- package/dist/Timer-7b0c4e7c.d.ts +11 -0
- package/dist/Timer.d.ts +1 -4
- package/dist/Timer.js +31 -7
- package/dist/Timer.mjs +7 -0
- package/dist/Validation.d.ts +5 -4
- package/dist/Validation.js +54 -37
- package/dist/Validation.mjs +35 -0
- package/dist/array-dc599632.d.ts +158 -0
- package/dist/array.d.ts +1 -113
- package/dist/array.js +246 -266
- package/dist/array.mjs +49 -0
- package/dist/browser-8d042ffe.d.ts +22 -0
- package/dist/camera-1a859d72.d.ts +15 -0
- package/dist/chunk-5NTK5JAI.mjs +57 -0
- package/dist/chunk-5UEMANWE.mjs +91 -0
- package/dist/chunk-5ZOWNKSD.mjs +166 -0
- package/dist/chunk-6GNGTFNC.mjs +118 -0
- package/dist/chunk-7MK72U4O.mjs +19 -0
- package/dist/chunk-7XKT3AQX.mjs +17 -0
- package/dist/chunk-7ZCEZM7K.mjs +41 -0
- package/dist/chunk-AMBWJGSW.mjs +151 -0
- package/dist/chunk-C7S43KGB.mjs +15 -0
- package/dist/chunk-CJM7T7ON.mjs +24 -0
- package/dist/chunk-CKILLYAP.mjs +16 -0
- package/dist/chunk-DX7MUT3M.mjs +51 -0
- package/dist/chunk-EGUJQ5VF.mjs +32 -0
- package/dist/chunk-ETEIHDWU.mjs +25 -0
- package/dist/chunk-FJXSVGL7.mjs +22 -0
- package/dist/chunk-GJCAEOND.mjs +20 -0
- package/dist/chunk-GNJDIUYM.mjs +40 -0
- package/dist/chunk-IA7GINWD.mjs +39 -0
- package/dist/chunk-JEI7BOXY.mjs +21 -0
- package/dist/chunk-K4KENOE6.mjs +20 -0
- package/dist/chunk-KMERW6KS.mjs +34 -0
- package/dist/chunk-KPO3RH5G.mjs +27 -0
- package/dist/chunk-KWG5LYNK.mjs +100 -0
- package/dist/chunk-NUTQDHLQ.mjs +40 -0
- package/dist/chunk-O64XUDAH.mjs +35 -0
- package/dist/chunk-OYRPWQUA.mjs +257 -0
- package/dist/chunk-PNZ4KGXL.mjs +56 -0
- package/dist/chunk-QZYX26HT.mjs +24 -0
- package/dist/chunk-RDGP2CKM.mjs +195 -0
- package/dist/chunk-VFG5VU6S.mjs +12 -0
- package/dist/chunk-X3IMFCZG.mjs +23 -0
- package/dist/chunk-ZHNGZMRD.mjs +17 -0
- package/dist/color.d.ts +23 -22
- package/dist/color.js +96 -79
- package/dist/color.mjs +78 -0
- package/dist/console/enableConsole.d.ts +1 -2
- package/dist/console/enableConsole.js +38 -10
- package/dist/console/enableConsole.mjs +9 -0
- package/dist/console/index.d.ts +2 -11
- package/dist/console/index.js +58 -15
- package/dist/console/index.mjs +14 -0
- package/dist/console/log.d.ts +15 -14
- package/dist/console/log.js +74 -44
- package/dist/console/log.mjs +19 -0
- package/dist/createDir-220e0081.d.ts +13 -0
- package/dist/device/browser.d.ts +1 -5
- package/dist/device/browser.js +60 -32
- package/dist/device/browser.mjs +15 -0
- package/dist/device/camera.d.ts +1 -7
- package/dist/device/camera.js +184 -166
- package/dist/device/camera.mjs +8 -0
- package/dist/device/index.d.ts +1 -5
- package/dist/device/index.js +201 -216
- package/dist/device/index.mjs +15 -0
- package/dist/device/os.d.ts +11 -10
- package/dist/device/os.js +55 -28
- package/dist/device/os.mjs +33 -0
- package/dist/enableConsole-ddc24282.d.ts +11 -0
- package/dist/file/createDir.d.ts +1 -5
- package/dist/file/createDir.js +34 -13
- package/dist/file/createDir.mjs +7 -0
- package/dist/file/fileMove.d.ts +1 -4
- package/dist/file/fileMove.js +49 -29
- package/dist/file/fileMove.mjs +7 -0
- package/dist/file/findFilesByExt.d.ts +1 -13
- package/dist/file/findFilesByExt.js +64 -45
- package/dist/file/findFilesByExt.mjs +11 -0
- package/dist/file/index.d.ts +10 -8
- package/dist/file/index.js +104 -9
- package/dist/file/index.mjs +17 -0
- package/dist/fileMove-3a09e429.d.ts +13 -0
- package/dist/findFilesByExt-753e91d7.d.ts +24 -0
- package/dist/images/index.d.ts +2 -2
- package/dist/images/index.js +131 -8
- package/dist/images/index.mjs +15 -0
- package/dist/images/loadImage.d.ts +3 -0
- package/dist/images/loadImage.js +42 -0
- package/dist/images/loadImage.mjs +21 -0
- package/dist/images/resize.d.ts +3 -2
- package/dist/images/resize.js +60 -34
- package/dist/images/resize.mjs +9 -0
- package/dist/images/upload.d.ts +10 -9
- package/dist/images/upload.js +130 -25
- package/dist/images/upload.mjs +14 -0
- package/dist/index-1f738e52.d.ts +22 -0
- package/dist/index-22309f0c.d.ts +23 -0
- package/dist/index-6ae3c86b.d.ts +63 -0
- package/dist/index-c8fffc86.d.ts +90 -0
- package/dist/index-d652ed2c.d.ts +26 -0
- package/dist/index.d.ts +47 -36
- package/dist/index.js +1352 -62
- package/dist/index.mjs +87 -0
- package/dist/json.d.ts +8 -7
- package/dist/json.js +48 -28
- package/dist/json.mjs +29 -0
- package/dist/math/diffDate.d.ts +6 -5
- package/dist/math/diffDate.js +33 -11
- package/dist/math/diffDate.mjs +9 -0
- package/dist/math/index.d.ts +3 -30
- package/dist/math/index.js +159 -92
- package/dist/math/index.mjs +34 -0
- package/dist/math/positiveNumber.d.ts +3 -2
- package/dist/math/positiveNumber.js +53 -14
- package/dist/math/positiveNumber.mjs +10 -0
- package/dist/name/en.d.ts +5 -4
- package/dist/name/en.js +37 -19
- package/dist/name/en.mjs +9 -0
- package/dist/name/index.d.ts +3 -12
- package/dist/name/index.js +87 -12
- package/dist/name/index.mjs +20 -0
- package/dist/name/vi.d.ts +5 -4
- package/dist/name/vi.js +63 -25
- package/dist/name/vi.mjs +14 -0
- package/{esm/object.d.ts → dist/object-43aaaf92.d.ts} +79 -58
- package/dist/object.d.ts +1 -59
- package/dist/object.js +96 -71
- package/dist/object.mjs +21 -0
- package/dist/permission/index.d.ts +8 -7
- package/dist/permission/index.js +230 -6
- package/dist/permission/index.mjs +15 -0
- package/dist/permission/requestCamera.d.ts +1 -5
- package/dist/permission/requestCamera.js +49 -38
- package/dist/permission/requestCamera.mjs +9 -0
- package/dist/permission/requestDeviceOrientationControl.d.ts +1 -2
- package/dist/permission/requestDeviceOrientationControl.js +203 -36
- package/dist/permission/requestDeviceOrientationControl.mjs +10 -0
- package/dist/requestCamera-32b7dfc7.d.ts +14 -0
- package/dist/requestDeviceOrientationControl-b6458660.d.ts +11 -0
- package/dist/response/index.d.ts +49 -48
- package/dist/response/index.js +92 -47
- package/dist/response/index.mjs +16 -0
- package/dist/string/formatNumber.d.ts +7 -6
- package/dist/string/formatNumber.js +53 -12
- package/dist/string/formatNumber.mjs +10 -0
- package/dist/string/generatePassword.d.ts +10 -9
- package/dist/string/generatePassword.js +52 -21
- package/dist/string/generatePassword.mjs +10 -0
- package/dist/string/generateUUID.d.ts +3 -2
- package/dist/string/generateUUID.js +37 -34
- package/dist/string/generateUUID.mjs +9 -0
- package/dist/string/index.d.ts +6 -65
- package/dist/string/index.js +312 -157
- package/dist/string/index.mjs +31 -0
- package/dist/string/makeDaySlug.d.ts +31 -30
- package/dist/string/makeDaySlug.js +43 -19
- package/dist/string/makeDaySlug.mjs +9 -0
- package/dist/string/random.d.ts +14 -13
- package/dist/string/random.js +53 -22
- package/dist/string/random.mjs +19 -0
- package/dist/string/trimNull.d.ts +3 -2
- package/dist/string/trimNull.js +45 -17
- package/dist/string/trimNull.mjs +9 -0
- package/dist/string/url.d.ts +1 -36
- package/dist/string/url.js +115 -97
- package/dist/string/url.mjs +22 -0
- package/dist/url-60657387.d.ts +57 -0
- package/package.json +66 -66
- package/src/Checker.ts +29 -29
- package/src/EventDispatcher.ts +62 -62
- package/src/FileUpload.ts +66 -66
- package/src/Slug.ts +365 -365
- package/src/Timer.ts +7 -7
- package/src/Validation.ts +36 -36
- package/src/array.ts +285 -285
- package/src/color.ts +87 -87
- package/src/console/enableConsole.ts +8 -8
- package/src/console/index.ts +17 -17
- package/src/console/log.ts +39 -39
- package/src/device/browser.ts +29 -29
- package/src/device/camera.ts +207 -207
- package/src/device/index.ts +230 -230
- package/src/device/os.ts +29 -29
- package/src/file/createDir.ts +14 -14
- package/src/file/fileMove.ts +32 -32
- package/src/file/findFilesByExt.ts +46 -46
- package/src/file/index.ts +7 -7
- package/src/images/index.ts +3 -3
- package/src/images/loadImage.ts +16 -0
- package/src/images/resize.ts +35 -35
- package/src/images/upload.ts +24 -24
- package/src/index.ts +39 -39
- package/src/json.ts +29 -29
- package/src/math/diffDate.ts +10 -10
- package/src/math/index.ts +90 -90
- package/src/math/positiveNumber.ts +12 -12
- package/src/name/en.ts +27 -27
- package/src/name/index.ts +8 -8
- package/src/name/vi.ts +23 -23
- package/src/object.ts +72 -72
- package/src/permission/index.ts +6 -6
- package/src/permission/requestCamera.ts +43 -43
- package/src/permission/requestDeviceOrientationControl.ts +33 -33
- package/src/response/index.ts +45 -45
- package/src/string/formatNumber.ts +12 -12
- package/src/string/generatePassword.ts +18 -18
- package/src/string/generateUUID.ts +37 -37
- package/src/string/index.ts +180 -180
- package/src/string/makeDaySlug.ts +40 -40
- package/src/string/random.ts +24 -24
- package/src/string/trimNull.ts +16 -16
- package/src/string/url.ts +116 -116
- package/dist/Checker.js.map +0 -1
- package/dist/EventDispatcher.js.map +0 -1
- package/dist/FileUpload.js.map +0 -1
- package/dist/Slug.js.map +0 -1
- package/dist/Timer.js.map +0 -1
- package/dist/Validation.js.map +0 -1
- package/dist/array.js.map +0 -1
- package/dist/color.js.map +0 -1
- package/dist/console/enableConsole.js.map +0 -1
- package/dist/console/index.js.map +0 -1
- package/dist/console/log.js.map +0 -1
- package/dist/device/browser.js.map +0 -1
- package/dist/device/camera.js.map +0 -1
- package/dist/device/index.js.map +0 -1
- package/dist/device/os.js.map +0 -1
- package/dist/file/createDir.js.map +0 -1
- package/dist/file/fileMove.js.map +0 -1
- package/dist/file/findFilesByExt.js.map +0 -1
- package/dist/file/index.js.map +0 -1
- package/dist/images/index.js.map +0 -1
- package/dist/images/resize.js.map +0 -1
- package/dist/images/upload.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/json.js.map +0 -1
- package/dist/math/diffDate.js.map +0 -1
- package/dist/math/index.js.map +0 -1
- package/dist/math/positiveNumber.js.map +0 -1
- package/dist/name/en.js.map +0 -1
- package/dist/name/index.js.map +0 -1
- package/dist/name/vi.js.map +0 -1
- package/dist/object.js.map +0 -1
- package/dist/permission/index.js.map +0 -1
- package/dist/permission/requestCamera.js.map +0 -1
- package/dist/permission/requestDeviceOrientationControl.js.map +0 -1
- package/dist/response/index.js.map +0 -1
- package/dist/string/formatNumber.js.map +0 -1
- package/dist/string/generatePassword.js.map +0 -1
- package/dist/string/generateUUID.js.map +0 -1
- package/dist/string/index.js.map +0 -1
- package/dist/string/makeDaySlug.js.map +0 -1
- package/dist/string/random.js.map +0 -1
- package/dist/string/trimNull.js.map +0 -1
- package/dist/string/url.js.map +0 -1
- package/esm/Checker.d.ts +0 -8
- package/esm/Checker.js +0 -28
- package/esm/Checker.js.map +0 -1
- package/esm/EventDispatcher.d.ts +0 -13
- package/esm/EventDispatcher.js +0 -49
- package/esm/EventDispatcher.js.map +0 -1
- package/esm/FileUpload.d.ts +0 -12
- package/esm/FileUpload.js +0 -62
- package/esm/FileUpload.js.map +0 -1
- package/esm/Slug.d.ts +0 -9
- package/esm/Slug.js +0 -330
- package/esm/Slug.js.map +0 -1
- package/esm/Timer.d.ts +0 -4
- package/esm/Timer.js +0 -7
- package/esm/Timer.js.map +0 -1
- package/esm/Validation.d.ts +0 -5
- package/esm/Validation.js +0 -37
- package/esm/Validation.js.map +0 -1
- package/esm/array.d.ts +0 -113
- package/esm/array.js +0 -275
- package/esm/array.js.map +0 -1
- package/esm/color.d.ts +0 -23
- package/esm/color.js +0 -80
- package/esm/color.js.map +0 -1
- package/esm/console/enableConsole.d.ts +0 -2
- package/esm/console/enableConsole.js +0 -7
- package/esm/console/enableConsole.js.map +0 -1
- package/esm/console/index.d.ts +0 -11
- package/esm/console/index.js +0 -13
- package/esm/console/index.js.map +0 -1
- package/esm/console/log.d.ts +0 -15
- package/esm/console/log.js +0 -33
- package/esm/console/log.js.map +0 -1
- package/esm/device/browser.d.ts +0 -5
- package/esm/device/browser.js +0 -30
- package/esm/device/browser.js.map +0 -1
- package/esm/device/camera.d.ts +0 -7
- package/esm/device/camera.js +0 -168
- package/esm/device/camera.js.map +0 -1
- package/esm/device/index.d.ts +0 -5
- package/esm/device/index.js +0 -217
- package/esm/device/index.js.map +0 -1
- package/esm/device/os.d.ts +0 -11
- package/esm/device/os.js +0 -28
- package/esm/device/os.js.map +0 -1
- package/esm/file/createDir.d.ts +0 -5
- package/esm/file/createDir.js +0 -13
- package/esm/file/createDir.js.map +0 -1
- package/esm/file/fileMove.d.ts +0 -4
- package/esm/file/fileMove.js +0 -29
- package/esm/file/fileMove.js.map +0 -1
- package/esm/file/findFilesByExt.d.ts +0 -13
- package/esm/file/findFilesByExt.js +0 -46
- package/esm/file/findFilesByExt.js.map +0 -1
- package/esm/file/index.d.ts +0 -9
- package/esm/file/index.js +0 -6
- package/esm/file/index.js.map +0 -1
- package/esm/images/index.d.ts +0 -2
- package/esm/images/index.js +0 -4
- package/esm/images/index.js.map +0 -1
- package/esm/images/resize.d.ts +0 -2
- package/esm/images/resize.js +0 -31
- package/esm/images/resize.js.map +0 -1
- package/esm/images/upload.d.ts +0 -10
- package/esm/images/upload.js +0 -20
- package/esm/images/upload.js.map +0 -1
- package/esm/index.d.ts +0 -37
- package/esm/index.js +0 -38
- package/esm/index.js.map +0 -1
- package/esm/json.d.ts +0 -8
- package/esm/json.js +0 -28
- package/esm/json.js.map +0 -1
- package/esm/math/diffDate.d.ts +0 -5
- package/esm/math/diffDate.js +0 -10
- package/esm/math/diffDate.js.map +0 -1
- package/esm/math/index.d.ts +0 -30
- package/esm/math/index.js +0 -78
- package/esm/math/index.js.map +0 -1
- package/esm/math/positiveNumber.d.ts +0 -2
- package/esm/math/positiveNumber.js +0 -13
- package/esm/math/positiveNumber.js.map +0 -1
- package/esm/name/en.d.ts +0 -5
- package/esm/name/en.js +0 -22
- package/esm/name/en.js.map +0 -1
- package/esm/name/index.d.ts +0 -12
- package/esm/name/index.js +0 -6
- package/esm/name/index.js.map +0 -1
- package/esm/name/vi.d.ts +0 -5
- package/esm/name/vi.js +0 -24
- package/esm/name/vi.js.map +0 -1
- package/esm/object.js +0 -70
- package/esm/object.js.map +0 -1
- package/esm/permission/index.d.ts +0 -8
- package/esm/permission/index.js +0 -5
- package/esm/permission/index.js.map +0 -1
- package/esm/permission/requestCamera.d.ts +0 -5
- package/esm/permission/requestCamera.js +0 -39
- package/esm/permission/requestCamera.js.map +0 -1
- package/esm/permission/requestDeviceOrientationControl.d.ts +0 -2
- package/esm/permission/requestDeviceOrientationControl.js +0 -35
- package/esm/permission/requestDeviceOrientationControl.js.map +0 -1
- package/esm/response/index.d.ts +0 -49
- package/esm/response/index.js +0 -46
- package/esm/response/index.js.map +0 -1
- package/esm/string/formatNumber.d.ts +0 -6
- package/esm/string/formatNumber.js +0 -11
- package/esm/string/formatNumber.js.map +0 -1
- package/esm/string/generatePassword.d.ts +0 -9
- package/esm/string/generatePassword.js +0 -20
- package/esm/string/generatePassword.js.map +0 -1
- package/esm/string/generateUUID.d.ts +0 -2
- package/esm/string/generateUUID.js +0 -33
- package/esm/string/generateUUID.js.map +0 -1
- package/esm/string/index.d.ts +0 -65
- package/esm/string/index.js +0 -150
- package/esm/string/index.js.map +0 -1
- package/esm/string/makeDaySlug.d.ts +0 -31
- package/esm/string/makeDaySlug.js +0 -16
- package/esm/string/makeDaySlug.js.map +0 -1
- package/esm/string/random.d.ts +0 -14
- package/esm/string/random.js +0 -20
- package/esm/string/random.js.map +0 -1
- package/esm/string/trimNull.d.ts +0 -2
- package/esm/string/trimNull.js +0 -14
- package/esm/string/trimNull.js.map +0 -1
- package/esm/string/url.d.ts +0 -36
- package/esm/string/url.js +0 -98
- package/esm/string/url.js.map +0 -1
package/dist/array.d.ts
CHANGED
|
@@ -1,113 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param {Array} array
|
|
5
|
-
* @param {string} key
|
|
6
|
-
* @returns {Number}
|
|
7
|
-
*/
|
|
8
|
-
export declare const averageArray: (array: [], key: string) => number;
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* @param {Array} array
|
|
12
|
-
* @param {string} key
|
|
13
|
-
* @returns {Number}
|
|
14
|
-
*/
|
|
15
|
-
export declare const minArray: (array: [], key: string) => number;
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @param {Array} array
|
|
19
|
-
* @param {string} key
|
|
20
|
-
* @returns {Number}
|
|
21
|
-
*/
|
|
22
|
-
export declare const maxArray: (array: [], key: string) => number;
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* @param {Array} array
|
|
26
|
-
* @param {string} key
|
|
27
|
-
* @returns {Array}
|
|
28
|
-
*/
|
|
29
|
-
export declare const sortElementByString: (array: any, key: string) => any[] | undefined;
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
* @param {Array} array
|
|
33
|
-
* @param {string} key
|
|
34
|
-
* @returns {Array}
|
|
35
|
-
*/
|
|
36
|
-
export declare const sortElementByNumber: (array: any, key: string) => any[] | undefined;
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
* @param {Array} array
|
|
40
|
-
* @returns {any}
|
|
41
|
-
*/
|
|
42
|
-
export declare const firstElement: (array: any[]) => any;
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @param {Array} array
|
|
46
|
-
* @returns {any}
|
|
47
|
-
*/
|
|
48
|
-
export declare const lastElement: (array: any[]) => any;
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* @param {Array} array
|
|
52
|
-
* @returns {any}
|
|
53
|
-
*/
|
|
54
|
-
export declare const randomIndex: (array: any[]) => number;
|
|
55
|
-
/**
|
|
56
|
-
*
|
|
57
|
-
* @param {Array} array
|
|
58
|
-
* @returns {any}
|
|
59
|
-
*/
|
|
60
|
-
export declare const randomElement: (array: any[]) => any;
|
|
61
|
-
/**
|
|
62
|
-
* Remove same elements from 2 arrays
|
|
63
|
-
*/
|
|
64
|
-
export declare const mergeAndMakeUniqueElement: (list1: any[], list2: any[], key: string) => any[] | undefined;
|
|
65
|
-
/**
|
|
66
|
-
* check target == toMatch
|
|
67
|
-
* @param {Array} target
|
|
68
|
-
* @param {Array} toMatch
|
|
69
|
-
* @returns {Boolean}
|
|
70
|
-
*/
|
|
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
|
-
/**
|
|
76
|
-
* Get an array with shuffle element
|
|
77
|
-
*/
|
|
78
|
-
export declare const getHalfRandom: (array: any[], n: number) => any[];
|
|
79
|
-
/**
|
|
80
|
-
* Make array shuffle itself
|
|
81
|
-
*/
|
|
82
|
-
export declare const shuffle: (array: any[]) => any[];
|
|
83
|
-
/**
|
|
84
|
-
*
|
|
85
|
-
* @param {Array} array
|
|
86
|
-
* @param {Number} oldIndex
|
|
87
|
-
* @param {Number} newIndex
|
|
88
|
-
* @returns {Array}
|
|
89
|
-
*/
|
|
90
|
-
export declare const moveIndex: (array: any[], oldIndex: number, newIndex: number) => any[];
|
|
91
|
-
export declare const moveArray: (array: any[], oldIndex: number, newIndex: number) => any[];
|
|
92
|
-
declare const xarray: {
|
|
93
|
-
sumArray: (array: [], key: string) => number;
|
|
94
|
-
averageArray: (array: [], key: string) => number;
|
|
95
|
-
minArray: (array: [], key: string) => number;
|
|
96
|
-
maxArray: (array: [], key: string) => number;
|
|
97
|
-
sortElementByString: (array: any, key: string) => any[] | undefined;
|
|
98
|
-
sortElementByNumber: (array: any, key: string) => any[] | undefined;
|
|
99
|
-
firstElement: (array: any[]) => any;
|
|
100
|
-
lastElement: (array: any[]) => any;
|
|
101
|
-
randomIndex: (array: any[]) => number;
|
|
102
|
-
randomElement: (array: any[]) => any;
|
|
103
|
-
mergeAndMakeUniqueElement: (list1: any[], list2: any[], key: string) => any[] | undefined;
|
|
104
|
-
allMatchInArray: (target: any[], toMatch: any[]) => boolean;
|
|
105
|
-
removeItem: (item: any, array: any[]) => any[];
|
|
106
|
-
removeItemByKey: (key: string, value: any, array: any[]) => any[];
|
|
107
|
-
getRandom: (array: any[], n: number) => any[];
|
|
108
|
-
getHalfRandom: (array: any[], n: number) => any[];
|
|
109
|
-
shuffle: (array: any[]) => any[];
|
|
110
|
-
moveIndex: (array: any[], oldIndex: number, newIndex: number) => any[];
|
|
111
|
-
moveArray: (array: any[], oldIndex: number, newIndex: number) => any[];
|
|
112
|
-
};
|
|
113
|
-
export default xarray;
|
|
1
|
+
export { i as allMatchInArray, b as averageArray, x as default, f as firstElement, o as getHalfRandom, n as getRandom, l as lastElement, c as maxArray, h as mergeAndMakeUniqueElement, m as minArray, t as moveArray, q as moveIndex, g as randomElement, r as randomIndex, j as removeItem, k as removeItemByKey, p as shuffle, e as sortElementByNumber, d as sortElementByString, s as sumArray } from './array-dc599632.js';
|
package/dist/array.js
CHANGED
|
@@ -1,297 +1,277 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
if (key)
|
|
11
|
-
return array.reduce((c, v) => c + v[key], 0);
|
|
12
|
-
else
|
|
13
|
-
return array.reduce((c, v) => c + v, 0);
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
14
9
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const averageArray = (array, key) => {
|
|
23
|
-
if (!array) {
|
|
24
|
-
console.warn("ARRAY NOT EXITED !");
|
|
25
|
-
return 0;
|
|
26
|
-
}
|
|
27
|
-
return (0, exports.sumArray)(array, key) / array.length || 0;
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
28
17
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/array.ts
|
|
21
|
+
var array_exports = {};
|
|
22
|
+
__export(array_exports, {
|
|
23
|
+
allMatchInArray: () => allMatchInArray,
|
|
24
|
+
averageArray: () => averageArray,
|
|
25
|
+
default: () => array_default,
|
|
26
|
+
firstElement: () => firstElement,
|
|
27
|
+
getHalfRandom: () => getHalfRandom,
|
|
28
|
+
getRandom: () => getRandom,
|
|
29
|
+
lastElement: () => lastElement,
|
|
30
|
+
maxArray: () => maxArray,
|
|
31
|
+
mergeAndMakeUniqueElement: () => mergeAndMakeUniqueElement,
|
|
32
|
+
minArray: () => minArray,
|
|
33
|
+
moveArray: () => moveArray,
|
|
34
|
+
moveIndex: () => moveIndex,
|
|
35
|
+
randomElement: () => randomElement,
|
|
36
|
+
randomIndex: () => randomIndex,
|
|
37
|
+
removeItem: () => removeItem,
|
|
38
|
+
removeItemByKey: () => removeItemByKey,
|
|
39
|
+
shuffle: () => shuffle,
|
|
40
|
+
sortElementByNumber: () => sortElementByNumber,
|
|
41
|
+
sortElementByString: () => sortElementByString,
|
|
42
|
+
sumArray: () => sumArray
|
|
43
|
+
});
|
|
44
|
+
module.exports = __toCommonJS(array_exports);
|
|
45
|
+
|
|
46
|
+
// src/math/index.ts
|
|
47
|
+
var DEG2RAD = Math.PI / 180;
|
|
48
|
+
var RAD2DEG = 180 / Math.PI;
|
|
49
|
+
var randInt = (low, high) => {
|
|
50
|
+
return low + Math.floor(Math.random() * (high - low + 1));
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// src/array.ts
|
|
54
|
+
var sumArray = (array, key) => {
|
|
55
|
+
if (!array) {
|
|
56
|
+
console.warn("ARRAY NOT EXITED !");
|
|
47
57
|
return 0;
|
|
58
|
+
}
|
|
59
|
+
if (key)
|
|
60
|
+
return array.reduce((c, v) => c + v[key], 0);
|
|
61
|
+
else
|
|
62
|
+
return array.reduce((c, v) => c + v, 0);
|
|
48
63
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
* @param {Array} array
|
|
53
|
-
* @param {string} key
|
|
54
|
-
* @returns {Number}
|
|
55
|
-
*/
|
|
56
|
-
const maxArray = (array, key) => {
|
|
57
|
-
if (!array) {
|
|
58
|
-
console.warn("ARRAY NOT EXITED !");
|
|
59
|
-
return 0;
|
|
60
|
-
}
|
|
61
|
-
if (array.length > 0) {
|
|
62
|
-
if (key)
|
|
63
|
-
return array.reduce((c, v) => (c > v[key] ? c : v[key]));
|
|
64
|
-
else
|
|
65
|
-
return array.reduce((c, v) => (c > v ? c : v));
|
|
66
|
-
}
|
|
64
|
+
var averageArray = (array, key) => {
|
|
65
|
+
if (!array) {
|
|
66
|
+
console.warn("ARRAY NOT EXITED !");
|
|
67
67
|
return 0;
|
|
68
|
+
}
|
|
69
|
+
return sumArray(array, key) / array.length || 0;
|
|
68
70
|
};
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
*/
|
|
76
|
-
const sortElementByString = (array, key) => {
|
|
77
|
-
if (!Array.isArray(array))
|
|
78
|
-
return [];
|
|
71
|
+
var minArray = (array, key) => {
|
|
72
|
+
if (!array) {
|
|
73
|
+
console.warn("ARRAY NOT EXITED !");
|
|
74
|
+
return 0;
|
|
75
|
+
}
|
|
76
|
+
if (array.length > 0) {
|
|
79
77
|
if (key)
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
78
|
+
return array.reduce((c, v) => c < v[key] ? c : v[key]);
|
|
79
|
+
else
|
|
80
|
+
return array.reduce((c, v) => c < v ? c : v);
|
|
81
|
+
}
|
|
82
|
+
return 0;
|
|
85
83
|
};
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
*/
|
|
93
|
-
const sortElementByNumber = (array, key) => {
|
|
94
|
-
if (!Array.isArray(array))
|
|
95
|
-
return [];
|
|
84
|
+
var maxArray = (array, key) => {
|
|
85
|
+
if (!array) {
|
|
86
|
+
console.warn("ARRAY NOT EXITED !");
|
|
87
|
+
return 0;
|
|
88
|
+
}
|
|
89
|
+
if (array.length > 0) {
|
|
96
90
|
if (key)
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
91
|
+
return array.reduce((c, v) => c > v[key] ? c : v[key]);
|
|
92
|
+
else
|
|
93
|
+
return array.reduce((c, v) => c > v ? c : v);
|
|
94
|
+
}
|
|
95
|
+
return 0;
|
|
101
96
|
};
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
return array[0];
|
|
112
|
-
return null;
|
|
97
|
+
var sortElementByString = (array, key) => {
|
|
98
|
+
if (!Array.isArray(array))
|
|
99
|
+
return [];
|
|
100
|
+
if (key)
|
|
101
|
+
return array.sort((x, y) => {
|
|
102
|
+
var a = x[key].toUpperCase(), b = y[key].toUpperCase();
|
|
103
|
+
return a == b ? 0 : a > b ? 1 : -1;
|
|
104
|
+
});
|
|
105
|
+
console.log("NO KEY");
|
|
113
106
|
};
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
if (array.length || array.length > 0)
|
|
123
|
-
return array[array.length - 1];
|
|
124
|
-
return null;
|
|
107
|
+
var sortElementByNumber = (array, key) => {
|
|
108
|
+
if (!Array.isArray(array))
|
|
109
|
+
return [];
|
|
110
|
+
if (key)
|
|
111
|
+
return array.sort((a, b) => {
|
|
112
|
+
return a[key] - b[key];
|
|
113
|
+
});
|
|
114
|
+
console.log("NO KEY");
|
|
125
115
|
};
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
const randomIndex = (array) => {
|
|
133
|
-
if (array)
|
|
134
|
-
return (0, math_1.randInt)(0, array.length - 1);
|
|
135
|
-
return -1;
|
|
116
|
+
var firstElement = (array) => {
|
|
117
|
+
if (array) {
|
|
118
|
+
if (array.length || array.length > 0)
|
|
119
|
+
return array[0];
|
|
120
|
+
}
|
|
121
|
+
return null;
|
|
136
122
|
};
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
const randomElement = (array) => {
|
|
144
|
-
if (array)
|
|
145
|
-
return array[(0, exports.randomIndex)(array)];
|
|
146
|
-
return null;
|
|
123
|
+
var lastElement = (array) => {
|
|
124
|
+
if (array) {
|
|
125
|
+
if (array.length || array.length > 0)
|
|
126
|
+
return array[array.length - 1];
|
|
127
|
+
}
|
|
128
|
+
return null;
|
|
147
129
|
};
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
const mergeAndMakeUniqueElement = (list1, list2, key) => {
|
|
153
|
-
if (!list1 || !list2)
|
|
154
|
-
return;
|
|
155
|
-
if (key) {
|
|
156
|
-
return list1.concat(list2).filter((item, index, self) => {
|
|
157
|
-
return self.findIndex((x) => x[key] == item[key]) === index;
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
else {
|
|
161
|
-
return list1.concat(list2).filter((x, index, self) => {
|
|
162
|
-
return self.indexOf(x) === index;
|
|
163
|
-
});
|
|
164
|
-
}
|
|
130
|
+
var randomIndex = (array) => {
|
|
131
|
+
if (array)
|
|
132
|
+
return randInt(0, array.length - 1);
|
|
133
|
+
return -1;
|
|
165
134
|
};
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
135
|
+
var randomElement = (array) => {
|
|
136
|
+
if (array)
|
|
137
|
+
return array[randomIndex(array)];
|
|
138
|
+
return null;
|
|
139
|
+
};
|
|
140
|
+
var mergeAndMakeUniqueElement = (list1, list2, key) => {
|
|
141
|
+
if (!list1 || !list2)
|
|
142
|
+
return;
|
|
143
|
+
if (key) {
|
|
144
|
+
return list1.concat(list2).filter((item, index, self) => {
|
|
145
|
+
return self.findIndex((x) => x[key] == item[key]) === index;
|
|
146
|
+
});
|
|
147
|
+
} else {
|
|
148
|
+
return list1.concat(list2).filter((x, index, self) => {
|
|
149
|
+
return self.indexOf(x) === index;
|
|
178
150
|
});
|
|
179
|
-
|
|
151
|
+
}
|
|
180
152
|
};
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
153
|
+
var allMatchInArray = (target, toMatch) => {
|
|
154
|
+
if (!target || !toMatch)
|
|
155
|
+
return false;
|
|
156
|
+
const found = toMatch.every((item) => {
|
|
157
|
+
return target.includes(item);
|
|
158
|
+
});
|
|
159
|
+
return found;
|
|
160
|
+
};
|
|
161
|
+
var removeItem = (item, array) => {
|
|
162
|
+
const index = array.indexOf(item);
|
|
163
|
+
if (index == -1) {
|
|
164
|
+
console.warn("[ArrayExtra.removeItem] Item not found.");
|
|
189
165
|
return array;
|
|
166
|
+
}
|
|
167
|
+
array.splice(index, 1);
|
|
168
|
+
return array;
|
|
190
169
|
};
|
|
191
|
-
|
|
192
|
-
const
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
console.warn("[ArrayExtra.removeItemByKey] Item not found.", key, value);
|
|
198
|
-
return array;
|
|
199
|
-
}
|
|
200
|
-
array.splice(foundIndex, 1);
|
|
170
|
+
var removeItemByKey = (key, value, array) => {
|
|
171
|
+
const foundIndex = array.findIndex((item) => {
|
|
172
|
+
return item[key] == value;
|
|
173
|
+
});
|
|
174
|
+
if (foundIndex < 0) {
|
|
175
|
+
console.warn("[ArrayExtra.removeItemByKey] Item not found.", key, value);
|
|
201
176
|
return array;
|
|
177
|
+
}
|
|
178
|
+
array.splice(foundIndex, 1);
|
|
179
|
+
return array;
|
|
202
180
|
};
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
return result;
|
|
181
|
+
var getRandom = (array, n) => {
|
|
182
|
+
var result = new Array(n), len = array.length, taken = new Array(len);
|
|
183
|
+
if (n > len)
|
|
184
|
+
throw new RangeError("getRandom: more elements taken than available");
|
|
185
|
+
while (n--) {
|
|
186
|
+
var x = Math.floor(Math.random() * len);
|
|
187
|
+
result[n] = array[x in taken ? taken[x] : x];
|
|
188
|
+
taken[x] = --len in taken ? taken[len] : len;
|
|
189
|
+
}
|
|
190
|
+
return result;
|
|
214
191
|
};
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
*/
|
|
219
|
-
const getHalfRandom = (array, n) => {
|
|
220
|
-
var n = Math.ceil(array.length / 2);
|
|
221
|
-
return (0, exports.getRandom)(array, n);
|
|
192
|
+
var getHalfRandom = (array, n) => {
|
|
193
|
+
var n = Math.ceil(array.length / 2);
|
|
194
|
+
return getRandom(array, n);
|
|
222
195
|
};
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
*/
|
|
227
|
-
const shuffle = (array) => {
|
|
228
|
-
var i = array.length, j, temp;
|
|
229
|
-
if (array.length < 1)
|
|
230
|
-
return array;
|
|
231
|
-
while (--i) {
|
|
232
|
-
j = Math.floor(Math.random() * (i + 1));
|
|
233
|
-
temp = array[i];
|
|
234
|
-
array[i] = array[j];
|
|
235
|
-
array[j] = temp;
|
|
236
|
-
}
|
|
196
|
+
var shuffle = (array) => {
|
|
197
|
+
var i = array.length, j, temp;
|
|
198
|
+
if (array.length < 1)
|
|
237
199
|
return array;
|
|
200
|
+
while (--i) {
|
|
201
|
+
j = Math.floor(Math.random() * (i + 1));
|
|
202
|
+
temp = array[i];
|
|
203
|
+
array[i] = array[j];
|
|
204
|
+
array[j] = temp;
|
|
205
|
+
}
|
|
206
|
+
return array;
|
|
238
207
|
};
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
* @param {Number} newIndex
|
|
245
|
-
* @returns {Array}
|
|
246
|
-
*/
|
|
247
|
-
const moveIndex = (array, oldIndex, newIndex) => {
|
|
248
|
-
if (newIndex >= array.length) {
|
|
249
|
-
var k = newIndex - array.length + 1;
|
|
250
|
-
while (k--) {
|
|
251
|
-
array.push(undefined);
|
|
252
|
-
}
|
|
208
|
+
var moveIndex = (array, oldIndex, newIndex) => {
|
|
209
|
+
if (newIndex >= array.length) {
|
|
210
|
+
var k = newIndex - array.length + 1;
|
|
211
|
+
while (k--) {
|
|
212
|
+
array.push(void 0);
|
|
253
213
|
}
|
|
254
|
-
|
|
255
|
-
|
|
214
|
+
}
|
|
215
|
+
array.splice(newIndex, 0, array.splice(oldIndex, 1)[0]);
|
|
216
|
+
return array;
|
|
256
217
|
};
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
218
|
+
var moveArray = (array, oldIndex, newIndex) => {
|
|
219
|
+
while (oldIndex < 0) {
|
|
220
|
+
oldIndex += array.length;
|
|
221
|
+
}
|
|
222
|
+
while (newIndex < 0) {
|
|
223
|
+
newIndex += array.length;
|
|
224
|
+
}
|
|
225
|
+
if (newIndex >= array.length) {
|
|
226
|
+
var k = newIndex - array.length;
|
|
227
|
+
while (k-- + 1) {
|
|
228
|
+
array.push(999);
|
|
261
229
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
if (newIndex >= array.length) {
|
|
266
|
-
var k = newIndex - array.length;
|
|
267
|
-
while (k-- + 1) {
|
|
268
|
-
array.push(999);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
array.splice(newIndex, 0, array.splice(oldIndex, 1)[0]);
|
|
272
|
-
return array;
|
|
230
|
+
}
|
|
231
|
+
array.splice(newIndex, 0, array.splice(oldIndex, 1)[0]);
|
|
232
|
+
return array;
|
|
273
233
|
};
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
moveArray: exports.moveArray,
|
|
234
|
+
var xarray = {
|
|
235
|
+
sumArray,
|
|
236
|
+
averageArray,
|
|
237
|
+
minArray,
|
|
238
|
+
maxArray,
|
|
239
|
+
sortElementByString,
|
|
240
|
+
sortElementByNumber,
|
|
241
|
+
firstElement,
|
|
242
|
+
lastElement,
|
|
243
|
+
randomIndex,
|
|
244
|
+
randomElement,
|
|
245
|
+
mergeAndMakeUniqueElement,
|
|
246
|
+
allMatchInArray,
|
|
247
|
+
removeItem,
|
|
248
|
+
removeItemByKey,
|
|
249
|
+
getRandom,
|
|
250
|
+
getHalfRandom,
|
|
251
|
+
shuffle,
|
|
252
|
+
moveIndex,
|
|
253
|
+
moveArray
|
|
295
254
|
};
|
|
296
|
-
|
|
297
|
-
|
|
255
|
+
var array_default = xarray;
|
|
256
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
257
|
+
0 && (module.exports = {
|
|
258
|
+
allMatchInArray,
|
|
259
|
+
averageArray,
|
|
260
|
+
firstElement,
|
|
261
|
+
getHalfRandom,
|
|
262
|
+
getRandom,
|
|
263
|
+
lastElement,
|
|
264
|
+
maxArray,
|
|
265
|
+
mergeAndMakeUniqueElement,
|
|
266
|
+
minArray,
|
|
267
|
+
moveArray,
|
|
268
|
+
moveIndex,
|
|
269
|
+
randomElement,
|
|
270
|
+
randomIndex,
|
|
271
|
+
removeItem,
|
|
272
|
+
removeItemByKey,
|
|
273
|
+
shuffle,
|
|
274
|
+
sortElementByNumber,
|
|
275
|
+
sortElementByString,
|
|
276
|
+
sumArray
|
|
277
|
+
});
|