diginext-utils 2.0.0 → 2.0.2

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.
Files changed (111) hide show
  1. package/dist/Checker.d.ts +6 -0
  2. package/dist/Checker.js +27 -0
  3. package/dist/Checker.mjs +25 -0
  4. package/dist/EventDispatcher.d.ts +13 -0
  5. package/dist/EventDispatcher.js +51 -0
  6. package/dist/EventDispatcher.mjs +51 -0
  7. package/dist/FileUpload.d.ts +12 -0
  8. package/dist/FileUpload.js +60 -0
  9. package/dist/FileUpload.mjs +60 -0
  10. package/dist/Slug.d.ts +5 -0
  11. package/dist/Slug.js +329 -0
  12. package/dist/Slug.mjs +327 -0
  13. package/dist/Timer.d.ts +5 -0
  14. package/dist/Timer.js +11 -0
  15. package/dist/Timer.mjs +2 -0
  16. package/dist/Validation.d.ts +6 -0
  17. package/dist/Validation.js +33 -0
  18. package/dist/Validation.mjs +33 -0
  19. package/dist/array.d.ts +93 -0
  20. package/dist/array.js +210 -0
  21. package/dist/array.mjs +3 -0
  22. package/dist/backend/file/createDir.d.ts +6 -0
  23. package/dist/backend/file/createDir.js +21 -0
  24. package/dist/backend/file/createDir.mjs +13 -0
  25. package/dist/backend/file/fileMove.d.ts +6 -0
  26. package/dist/backend/file/fileMove.js +37 -0
  27. package/dist/backend/file/fileMove.mjs +29 -0
  28. package/dist/backend/file/findFilesByExt.d.ts +6 -0
  29. package/dist/backend/file/findFilesByExt.js +48 -0
  30. package/dist/backend/file/findFilesByExt.mjs +40 -0
  31. package/dist/chunk-5AL36RZR.mjs +47 -0
  32. package/dist/chunk-7IYY7BKN.mjs +136 -0
  33. package/dist/chunk-ACLBWYEO.mjs +85 -0
  34. package/dist/chunk-AHFJBIQJ.mjs +9 -0
  35. package/dist/chunk-AKU6F3WT.mjs +9 -0
  36. package/dist/chunk-FOWYH6LL.mjs +32 -0
  37. package/dist/chunk-FTE6FZSH.mjs +17 -0
  38. package/dist/chunk-JKYSZLBF.mjs +27 -0
  39. package/dist/chunk-LXQIKFED.mjs +13 -0
  40. package/dist/chunk-Q5R25OIS.mjs +185 -0
  41. package/dist/chunk-R2BH5I6O.mjs +9 -0
  42. package/dist/chunk-UKRVCU5M.mjs +166 -0
  43. package/dist/chunk-VFKAZAWF.mjs +40 -0
  44. package/dist/chunk-VZGV2BTL.mjs +27 -0
  45. package/dist/chunk-Y4ZTQWPA.mjs +68 -0
  46. package/dist/color.d.ts +12 -0
  47. package/dist/color.js +69 -0
  48. package/dist/color.mjs +62 -0
  49. package/dist/console/enableConsole.d.ts +3 -0
  50. package/dist/console/enableConsole.js +15 -0
  51. package/dist/console/enableConsole.mjs +2 -0
  52. package/dist/console/index.d.ts +5 -0
  53. package/dist/console/index.js +19 -0
  54. package/dist/console/index.mjs +2 -0
  55. package/dist/device/browser.d.ts +7 -0
  56. package/dist/device/browser.js +40 -0
  57. package/dist/device/browser.mjs +2 -0
  58. package/dist/device/camera.d.ts +16 -0
  59. package/dist/device/camera.js +164 -0
  60. package/dist/device/camera.mjs +3 -0
  61. package/dist/device.d.ts +6 -0
  62. package/dist/device.js +173 -0
  63. package/dist/device.mjs +2 -0
  64. package/dist/index.d.ts +13 -280
  65. package/dist/index.mjs +14 -820
  66. package/dist/math/diffDate.d.ts +6 -0
  67. package/dist/math/diffDate.js +10 -0
  68. package/dist/math/diffDate.mjs +10 -0
  69. package/dist/math/positiveNumber.d.ts +3 -0
  70. package/dist/math/positiveNumber.js +28 -0
  71. package/dist/math/positiveNumber.mjs +16 -0
  72. package/dist/math.d.ts +55 -0
  73. package/dist/math.js +51 -0
  74. package/dist/math.mjs +2 -0
  75. package/dist/object.d.ts +25 -0
  76. package/dist/object.js +56 -0
  77. package/dist/object.mjs +2 -0
  78. package/dist/permission/requestCamera.d.ts +6 -0
  79. package/dist/permission/requestCamera.js +29 -0
  80. package/dist/permission/requestCamera.mjs +2 -0
  81. package/dist/permission/requestDeviceOrientationControl.d.ts +3 -0
  82. package/dist/permission/requestDeviceOrientationControl.js +176 -0
  83. package/dist/permission/requestDeviceOrientationControl.mjs +3 -0
  84. package/dist/string/formatNumber.d.ts +7 -0
  85. package/dist/string/formatNumber.js +28 -0
  86. package/dist/string/formatNumber.mjs +10 -0
  87. package/dist/string/generatePassword.d.ts +10 -0
  88. package/dist/string/generatePassword.js +27 -0
  89. package/dist/string/generatePassword.mjs +16 -0
  90. package/dist/string/generateUUID.d.ts +3 -0
  91. package/dist/string/generateUUID.js +14 -0
  92. package/dist/string/generateUUID.mjs +14 -0
  93. package/dist/string/name/en.d.ts +3 -0
  94. package/dist/string/name/en.js +19 -0
  95. package/dist/string/name/en.mjs +17 -0
  96. package/dist/string/name/vi.d.ts +3 -0
  97. package/dist/string/name/vi.js +37 -0
  98. package/dist/string/name/vi.mjs +20 -0
  99. package/dist/string/random.d.ts +11 -0
  100. package/dist/string/random.js +26 -0
  101. package/dist/string/random.mjs +2 -0
  102. package/dist/string/trimNull.d.ts +3 -0
  103. package/dist/string/trimNull.js +20 -0
  104. package/dist/string/trimNull.mjs +14 -0
  105. package/dist/string/url.d.ts +33 -0
  106. package/dist/string/url.js +89 -0
  107. package/dist/string/url.mjs +3 -0
  108. package/dist/string.d.ts +35 -0
  109. package/dist/string.js +107 -0
  110. package/dist/string.mjs +3 -0
  111. package/package.json +2 -5
package/dist/Slug.mjs ADDED
@@ -0,0 +1,327 @@
1
+ import './chunk-AKU6F3WT.mjs';
2
+
3
+ // src/Slug.ts
4
+ var makeSlug = (s, opt = {}) => {
5
+ var defaults = {
6
+ delimiter: "-",
7
+ lowercase: true,
8
+ replacements: {},
9
+ transliterate: typeof XRegExp === "undefined" ? true : false
10
+ };
11
+ for (var k in defaults) {
12
+ if (!opt.hasOwnProperty(k)) {
13
+ opt[k] = defaults[k];
14
+ }
15
+ }
16
+ var char_map = {
17
+ \u00C0: "A",
18
+ \u00C1: "A",
19
+ \u00C2: "A",
20
+ \u00C3: "A",
21
+ \u00C4: "A",
22
+ \u00C5: "A",
23
+ \u00C6: "AE",
24
+ \u00C7: "C",
25
+ \u00C8: "E",
26
+ \u00C9: "E",
27
+ \u00CA: "E",
28
+ \u00CB: "E",
29
+ \u00CC: "I",
30
+ \u00CD: "I",
31
+ \u00CE: "I",
32
+ \u00CF: "I",
33
+ \u00D0: "D",
34
+ \u00D1: "N",
35
+ \u00D2: "O",
36
+ \u00D3: "O",
37
+ \u00D4: "O",
38
+ \u00D5: "O",
39
+ \u00D6: "O",
40
+ \u0150: "O",
41
+ \u00D8: "O",
42
+ \u00D9: "U",
43
+ \u00DA: "U",
44
+ \u00DB: "U",
45
+ \u00DC: "U",
46
+ \u0170: "U",
47
+ \u00DD: "Y",
48
+ \u00DE: "TH",
49
+ \u00DF: "ss",
50
+ \u00E0: "a",
51
+ \u00E1: "a",
52
+ \u00E2: "a",
53
+ \u00E3: "a",
54
+ \u00E4: "a",
55
+ \u00E5: "a",
56
+ \u00E6: "ae",
57
+ \u00E7: "c",
58
+ \u00E8: "e",
59
+ \u00E9: "e",
60
+ \u00EA: "e",
61
+ \u00EB: "e",
62
+ \u00EC: "i",
63
+ \u00ED: "i",
64
+ \u00EE: "i",
65
+ \u00EF: "i",
66
+ \u00F0: "d",
67
+ \u00F1: "n",
68
+ \u00F2: "o",
69
+ \u00F3: "o",
70
+ \u00F4: "o",
71
+ \u00F5: "o",
72
+ \u00F6: "o",
73
+ \u0151: "o",
74
+ \u00F8: "o",
75
+ \u00F9: "u",
76
+ \u00FA: "u",
77
+ \u00FB: "u",
78
+ \u00FC: "u",
79
+ \u0171: "u",
80
+ \u00FD: "y",
81
+ \u00FE: "th",
82
+ \u00FF: "y",
83
+ "\xA9": "(c)",
84
+ \u0391: "A",
85
+ \u0392: "B",
86
+ \u0393: "G",
87
+ \u0394: "D",
88
+ \u0395: "E",
89
+ \u0396: "Z",
90
+ \u0397: "H",
91
+ \u0398: "8",
92
+ \u0399: "I",
93
+ \u039A: "K",
94
+ \u039B: "L",
95
+ \u039C: "M",
96
+ \u039D: "N",
97
+ \u039E: "3",
98
+ \u039F: "O",
99
+ \u03A0: "P",
100
+ \u03A1: "R",
101
+ \u03A3: "S",
102
+ \u03A4: "T",
103
+ \u03A5: "Y",
104
+ \u03A6: "F",
105
+ \u03A7: "X",
106
+ \u03A8: "PS",
107
+ \u03A9: "W",
108
+ \u0386: "A",
109
+ \u0388: "E",
110
+ \u038A: "I",
111
+ \u038C: "O",
112
+ \u038E: "Y",
113
+ \u0389: "H",
114
+ \u038F: "W",
115
+ \u03AA: "I",
116
+ \u03AB: "Y",
117
+ \u03B1: "a",
118
+ \u03B2: "b",
119
+ \u03B3: "g",
120
+ \u03B4: "d",
121
+ \u03B5: "e",
122
+ \u03B6: "z",
123
+ \u03B7: "h",
124
+ \u03B8: "8",
125
+ \u03B9: "i",
126
+ \u03BA: "k",
127
+ \u03BB: "l",
128
+ \u03BC: "m",
129
+ \u03BD: "n",
130
+ \u03BE: "3",
131
+ \u03BF: "o",
132
+ \u03C0: "p",
133
+ \u03C1: "r",
134
+ \u03C3: "s",
135
+ \u03C4: "t",
136
+ \u03C5: "y",
137
+ \u03C6: "f",
138
+ \u03C7: "x",
139
+ \u03C8: "ps",
140
+ \u03C9: "w",
141
+ \u03AC: "a",
142
+ \u03AD: "e",
143
+ \u03AF: "i",
144
+ \u03CC: "o",
145
+ \u03CD: "y",
146
+ \u03AE: "h",
147
+ \u03CE: "w",
148
+ \u03C2: "s",
149
+ \u03CA: "i",
150
+ \u03B0: "y",
151
+ \u03CB: "y",
152
+ \u0390: "i",
153
+ \u015E: "S",
154
+ \u0130: "I",
155
+ \u011E: "G",
156
+ \u015F: "s",
157
+ \u0131: "i",
158
+ \u011F: "g",
159
+ \u0410: "A",
160
+ \u0411: "B",
161
+ \u0412: "V",
162
+ \u0413: "G",
163
+ \u0414: "D",
164
+ \u0415: "E",
165
+ \u0401: "Yo",
166
+ \u0416: "Zh",
167
+ \u0417: "Z",
168
+ \u0418: "I",
169
+ \u0419: "J",
170
+ \u041A: "K",
171
+ \u041B: "L",
172
+ \u041C: "M",
173
+ \u041D: "N",
174
+ \u041E: "O",
175
+ \u041F: "P",
176
+ \u0420: "R",
177
+ \u0421: "S",
178
+ \u0422: "T",
179
+ \u0423: "U",
180
+ \u0424: "F",
181
+ \u0425: "H",
182
+ \u0426: "C",
183
+ \u0427: "Ch",
184
+ \u0428: "Sh",
185
+ \u0429: "Sh",
186
+ \u042A: "",
187
+ \u042B: "Y",
188
+ \u042C: "",
189
+ \u042D: "E",
190
+ \u042E: "Yu",
191
+ \u042F: "Ya",
192
+ \u0430: "a",
193
+ \u0431: "b",
194
+ \u0432: "v",
195
+ \u0433: "g",
196
+ \u0434: "d",
197
+ \u0435: "e",
198
+ \u0451: "yo",
199
+ \u0436: "zh",
200
+ \u0437: "z",
201
+ \u0438: "i",
202
+ \u0439: "j",
203
+ \u043A: "k",
204
+ \u043B: "l",
205
+ \u043C: "m",
206
+ \u043D: "n",
207
+ \u043E: "o",
208
+ \u043F: "p",
209
+ \u0440: "r",
210
+ \u0441: "s",
211
+ \u0442: "t",
212
+ \u0443: "u",
213
+ \u0444: "f",
214
+ \u0445: "h",
215
+ \u0446: "c",
216
+ \u0447: "ch",
217
+ \u0448: "sh",
218
+ \u0449: "sh",
219
+ \u044A: "",
220
+ \u044B: "y",
221
+ \u044C: "",
222
+ \u044D: "e",
223
+ \u044E: "yu",
224
+ \u044F: "ya",
225
+ \u0404: "Ye",
226
+ \u0406: "I",
227
+ \u0407: "Yi",
228
+ \u0490: "G",
229
+ \u0454: "ye",
230
+ \u0456: "i",
231
+ \u0457: "yi",
232
+ \u0491: "g",
233
+ \u010C: "C",
234
+ \u010E: "D",
235
+ \u011A: "E",
236
+ \u0147: "N",
237
+ \u0158: "R",
238
+ \u0160: "S",
239
+ \u0164: "T",
240
+ \u016E: "U",
241
+ \u017D: "Z",
242
+ \u010D: "c",
243
+ \u010F: "d",
244
+ \u011B: "e",
245
+ \u0148: "n",
246
+ \u0159: "r",
247
+ \u0161: "s",
248
+ \u0165: "t",
249
+ \u016F: "u",
250
+ \u017E: "z",
251
+ \u0104: "A",
252
+ \u0106: "C",
253
+ \u0118: "e",
254
+ \u0141: "L",
255
+ \u0143: "N",
256
+ \u015A: "S",
257
+ \u0179: "Z",
258
+ \u017B: "Z",
259
+ \u0105: "a",
260
+ \u0107: "c",
261
+ \u0119: "e",
262
+ \u0142: "l",
263
+ \u0144: "n",
264
+ \u015B: "s",
265
+ \u017A: "z",
266
+ \u017C: "z",
267
+ \u0100: "A",
268
+ \u0112: "E",
269
+ \u0122: "G",
270
+ \u012A: "i",
271
+ \u0136: "k",
272
+ \u013B: "L",
273
+ \u0145: "N",
274
+ \u016A: "u",
275
+ \u0101: "a",
276
+ \u0113: "e",
277
+ \u0123: "g",
278
+ \u012B: "i",
279
+ \u0137: "k",
280
+ \u013C: "l",
281
+ \u0146: "n",
282
+ \u016B: "u"
283
+ };
284
+ s = s.replace(/á|à|ả|ạ|ã|ă|ắ|ằ|ẳ|ẵ|ặ|â|ấ|ầ|ẩ|ẫ|ậ/gi, "a");
285
+ s = s.replace(/é|è|ẻ|ẽ|ẹ|ê|ế|ề|ể|ễ|ệ/gi, "e");
286
+ s = s.replace(/i|í|ì|ỉ|ĩ|ị/gi, "i");
287
+ s = s.replace(/ó|ò|ỏ|õ|ọ|ô|ố|ồ|ổ|ỗ|ộ|ơ|ớ|ờ|ở|ỡ|ợ/gi, "o");
288
+ s = s.replace(/ú|ù|ủ|ũ|ụ|ư|ứ|ừ|ử|ữ|ự/gi, "u");
289
+ s = s.replace(/ý|ỳ|ỷ|ỹ|ỵ/gi, "y");
290
+ s = s.replace(/đ/gi, "d");
291
+ s = s.replace(/\-\-\-\-\-/gi, "-");
292
+ s = s.replace(/\-\-\-\-/gi, "-");
293
+ s = s.replace(/\-\-\-/gi, "-");
294
+ s = s.replace(/\-\-/gi, "-");
295
+ s = "@" + s + "@";
296
+ s = s.replace(/\@\-|\-\@|\@/gi, "");
297
+ for (var k in opt.replacements) {
298
+ s = s.replace(RegExp(k, "g"), opt.replacements[k]);
299
+ }
300
+ if (opt.transliterate) {
301
+ for (var k in char_map) {
302
+ s = s.replace(RegExp(k, "g"), char_map[k]);
303
+ }
304
+ }
305
+ var alnum = typeof XRegExp === "undefined" ? RegExp("[^a-z0-9]+", "ig") : XRegExp("[^\\p{L}\\p{N}]+", "ig");
306
+ s = s.replace(alnum, opt.delimiter);
307
+ s = s.replace(RegExp("[" + opt.delimiter + "]{2,}", "g"), opt.delimiter);
308
+ s = s.substring(0, opt.limit);
309
+ s = s.replace(RegExp("(^" + opt.delimiter + "|" + opt.delimiter + "$)", "g"), "");
310
+ return opt.lowercase ? s.toLowerCase() : s;
311
+ };
312
+ /**
313
+ * Create a web friendly URL slug from a string.
314
+ *
315
+ * Requires XRegExp (http://xregexp.com) with unicode add-ons for UTF-8 support.
316
+ *
317
+ * Although supported, transliteration is discouraged because
318
+ * 1) most web browsers support UTF-8 characters in URLs
319
+ * 2) transliteration causes a loss of information
320
+ *
321
+ * @author Sean Murphy <sean@iamseanmurphy.com>
322
+ * @copyright Copyright 2012 Sean Murphy. All rights reserved.
323
+ * @license http://creativecommons.org/publicdomain/zero/1.0/
324
+ *
325
+ */
326
+
327
+ export { makeSlug };
@@ -0,0 +1,5 @@
1
+ declare const Timer: {
2
+ wait: (ms: number) => Promise<unknown>;
3
+ };
4
+
5
+ export { Timer as default };
package/dist/Timer.js ADDED
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ // src/Timer.ts
4
+ var Timer = {
5
+ wait: async (ms) => {
6
+ return new Promise((resolve) => setTimeout(resolve, ms));
7
+ }
8
+ };
9
+ var Timer_default = Timer;
10
+
11
+ module.exports = Timer_default;
package/dist/Timer.mjs ADDED
@@ -0,0 +1,2 @@
1
+ export { Timer_default as default } from './chunk-R2BH5I6O.mjs';
2
+ import './chunk-AKU6F3WT.mjs';
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ imageValidate(file: Blob): boolean;
3
+ videoValidate(file: Blob): boolean;
4
+ };
5
+
6
+ export { _default as default };
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ // src/Validation.ts
4
+ var Validation_default = {
5
+ imageValidate(file) {
6
+ var maxSize = 10;
7
+ var fileSize = 1024 * 1024 * maxSize;
8
+ var fileTypes = ["image/png", "image/jpeg"];
9
+ if (!file || fileTypes.indexOf(file.type) < 0) {
10
+ alert("Vui l\xF2ng upload \u1EA3nh \u0111\xFAng \u0111\u1ECBnh d\u1EA1ng jpg hay png");
11
+ return false;
12
+ } else if (file.size > fileSize) {
13
+ alert("Vui l\xF2ng upload \u1EA3nh c\xF3 dung l\u01B0\u1EE3ng th\u1EA5p h\u01A1n " + maxSize + "mb");
14
+ return false;
15
+ }
16
+ return true;
17
+ },
18
+ videoValidate(file) {
19
+ var maxSize = 15;
20
+ var fileSize = 1024 * 1024 * maxSize;
21
+ var fileTypes = "video";
22
+ if (!file || file.type.indexOf(fileTypes) < 0) {
23
+ alert("Vui l\xF2ng upload video");
24
+ return false;
25
+ } else if (file.size > fileSize) {
26
+ alert("Vui l\xF2ng upload video c\xF3 dung l\u01B0\u1EE3ng th\u1EA5p h\u01A1n " + maxSize + "mb");
27
+ return false;
28
+ }
29
+ return true;
30
+ }
31
+ };
32
+
33
+ module.exports = Validation_default;
@@ -0,0 +1,33 @@
1
+ import './chunk-AKU6F3WT.mjs';
2
+
3
+ // src/Validation.ts
4
+ var Validation_default = {
5
+ imageValidate(file) {
6
+ var maxSize = 10;
7
+ var fileSize = 1024 * 1024 * maxSize;
8
+ var fileTypes = ["image/png", "image/jpeg"];
9
+ if (!file || fileTypes.indexOf(file.type) < 0) {
10
+ alert("Vui l\xF2ng upload \u1EA3nh \u0111\xFAng \u0111\u1ECBnh d\u1EA1ng jpg hay png");
11
+ return false;
12
+ } else if (file.size > fileSize) {
13
+ alert("Vui l\xF2ng upload \u1EA3nh c\xF3 dung l\u01B0\u1EE3ng th\u1EA5p h\u01A1n " + maxSize + "mb");
14
+ return false;
15
+ }
16
+ return true;
17
+ },
18
+ videoValidate(file) {
19
+ var maxSize = 15;
20
+ var fileSize = 1024 * 1024 * maxSize;
21
+ var fileTypes = "video";
22
+ if (!file || file.type.indexOf(fileTypes) < 0) {
23
+ alert("Vui l\xF2ng upload video");
24
+ return false;
25
+ } else if (file.size > fileSize) {
26
+ alert("Vui l\xF2ng upload video c\xF3 dung l\u01B0\u1EE3ng th\u1EA5p h\u01A1n " + maxSize + "mb");
27
+ return false;
28
+ }
29
+ return true;
30
+ }
31
+ };
32
+
33
+ export { Validation_default as default };
@@ -0,0 +1,93 @@
1
+ declare const sumArray: (array: [], key: string) => number;
2
+ /**
3
+ *
4
+ * @param {Array} array
5
+ * @param {string} key
6
+ * @returns {Number}
7
+ */
8
+ declare const averageArray: (array: [], key: string) => number;
9
+ /**
10
+ *
11
+ * @param {Array} array
12
+ * @param {string} key
13
+ * @returns {Number}
14
+ */
15
+ declare const minArray: (array: [], key: string) => number;
16
+ /**
17
+ *
18
+ * @param {Array} array
19
+ * @param {string} key
20
+ * @returns {Number}
21
+ */
22
+ declare const maxArray: (array: [], key: string) => number;
23
+ /**
24
+ *
25
+ * @param {Array} array
26
+ * @param {string} key
27
+ * @returns {Array}
28
+ */
29
+ declare const sortElementByString: (array: any, key: string) => any[];
30
+ /**
31
+ *
32
+ * @param {Array} array
33
+ * @param {string} key
34
+ * @returns {Array}
35
+ */
36
+ declare const sortElementByNumber: (array: any, key: string) => any[];
37
+ /**
38
+ *
39
+ * @param {Array} array
40
+ * @returns {any}
41
+ */
42
+ declare const firstElement: (array: any[]) => any;
43
+ /**
44
+ *
45
+ * @param {Array} array
46
+ * @returns {any}
47
+ */
48
+ declare const lastElement: (array: any[]) => any;
49
+ /**
50
+ *
51
+ * @param {Array} array
52
+ * @returns {any}
53
+ */
54
+ declare const randomIndex: (array: any[]) => number;
55
+ /**
56
+ *
57
+ * @param {Array} array
58
+ * @returns {any}
59
+ */
60
+ declare const randomElement: (array: any[]) => any;
61
+ /**
62
+ * Remove same elements from 2 arrays
63
+ */
64
+ declare const mergeAndMakeUniqueElement: (list1: any[], list2: any[], key: string) => any[];
65
+ /**
66
+ * check target == toMatch
67
+ * @param {Array} target
68
+ * @param {Array} toMatch
69
+ * @returns {Boolean}
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[];
75
+ /**
76
+ * Get an array with shuffle element
77
+ */
78
+ declare const getHalfRandom: (array: any[], n: number) => any[];
79
+ /**
80
+ * Make array shuffle itself
81
+ */
82
+ 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
+ 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 };