diginext-utils 2.0.33 → 2.0.35

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 (184) hide show
  1. package/package.json +1 -1
  2. package/src/console/index.ts +2 -2
  3. package/src/string/url.ts +2 -2
  4. package/dist/Checker.d.ts +0 -9
  5. package/dist/Checker.js +0 -52
  6. package/dist/Checker.mjs +0 -29
  7. package/dist/EventDispatcher.d.ts +0 -13
  8. package/dist/EventDispatcher.js +0 -77
  9. package/dist/EventDispatcher.mjs +0 -54
  10. package/dist/FileUpload.d.ts +0 -12
  11. package/dist/FileUpload.js +0 -85
  12. package/dist/FileUpload.mjs +0 -62
  13. package/dist/Slug.d.ts +0 -10
  14. package/dist/Slug.js +0 -354
  15. package/dist/Slug.mjs +0 -331
  16. package/dist/Timer-7b0c4e7c.d.ts +0 -11
  17. package/dist/Timer.d.ts +0 -1
  18. package/dist/Timer.js +0 -33
  19. package/dist/Timer.mjs +0 -7
  20. package/dist/Validation.d.ts +0 -6
  21. package/dist/Validation.js +0 -56
  22. package/dist/Validation.mjs +0 -35
  23. package/dist/array-dc599632.d.ts +0 -158
  24. package/dist/array.d.ts +0 -1
  25. package/dist/array.js +0 -277
  26. package/dist/array.mjs +0 -49
  27. package/dist/browser-8d042ffe.d.ts +0 -22
  28. package/dist/camera-1a859d72.d.ts +0 -15
  29. package/dist/chunk-5NTK5JAI.mjs +0 -57
  30. package/dist/chunk-5UEMANWE.mjs +0 -91
  31. package/dist/chunk-5ZOWNKSD.mjs +0 -166
  32. package/dist/chunk-6GNGTFNC.mjs +0 -118
  33. package/dist/chunk-7MK72U4O.mjs +0 -19
  34. package/dist/chunk-7XKT3AQX.mjs +0 -17
  35. package/dist/chunk-7ZCEZM7K.mjs +0 -41
  36. package/dist/chunk-AMBWJGSW.mjs +0 -151
  37. package/dist/chunk-C7S43KGB.mjs +0 -15
  38. package/dist/chunk-CJM7T7ON.mjs +0 -24
  39. package/dist/chunk-CKILLYAP.mjs +0 -16
  40. package/dist/chunk-DX7MUT3M.mjs +0 -51
  41. package/dist/chunk-EGUJQ5VF.mjs +0 -32
  42. package/dist/chunk-ETEIHDWU.mjs +0 -25
  43. package/dist/chunk-FJXSVGL7.mjs +0 -22
  44. package/dist/chunk-GJCAEOND.mjs +0 -20
  45. package/dist/chunk-GNJDIUYM.mjs +0 -40
  46. package/dist/chunk-IA7GINWD.mjs +0 -39
  47. package/dist/chunk-JEI7BOXY.mjs +0 -21
  48. package/dist/chunk-K4KENOE6.mjs +0 -20
  49. package/dist/chunk-KMERW6KS.mjs +0 -34
  50. package/dist/chunk-KPO3RH5G.mjs +0 -27
  51. package/dist/chunk-KWG5LYNK.mjs +0 -100
  52. package/dist/chunk-NUTQDHLQ.mjs +0 -40
  53. package/dist/chunk-O64XUDAH.mjs +0 -35
  54. package/dist/chunk-OYRPWQUA.mjs +0 -257
  55. package/dist/chunk-PNZ4KGXL.mjs +0 -56
  56. package/dist/chunk-QZYX26HT.mjs +0 -24
  57. package/dist/chunk-RDGP2CKM.mjs +0 -195
  58. package/dist/chunk-VFG5VU6S.mjs +0 -12
  59. package/dist/chunk-X3IMFCZG.mjs +0 -23
  60. package/dist/chunk-ZHNGZMRD.mjs +0 -17
  61. package/dist/color.d.ts +0 -24
  62. package/dist/color.js +0 -106
  63. package/dist/color.mjs +0 -78
  64. package/dist/console/enableConsole.d.ts +0 -1
  65. package/dist/console/enableConsole.js +0 -42
  66. package/dist/console/enableConsole.mjs +0 -9
  67. package/dist/console/index.d.ts +0 -2
  68. package/dist/console/index.js +0 -61
  69. package/dist/console/index.mjs +0 -14
  70. package/dist/console/log.d.ts +0 -16
  71. package/dist/console/log.js +0 -75
  72. package/dist/console/log.mjs +0 -19
  73. package/dist/createDir-220e0081.d.ts +0 -13
  74. package/dist/device/browser.d.ts +0 -1
  75. package/dist/device/browser.js +0 -66
  76. package/dist/device/browser.mjs +0 -15
  77. package/dist/device/camera.d.ts +0 -1
  78. package/dist/device/camera.js +0 -190
  79. package/dist/device/camera.mjs +0 -8
  80. package/dist/device/index.d.ts +0 -1
  81. package/dist/device/index.js +0 -210
  82. package/dist/device/index.mjs +0 -15
  83. package/dist/device/os.d.ts +0 -12
  84. package/dist/device/os.js +0 -65
  85. package/dist/device/os.mjs +0 -33
  86. package/dist/enableConsole-ddc24282.d.ts +0 -11
  87. package/dist/file/createDir.d.ts +0 -1
  88. package/dist/file/createDir.js +0 -37
  89. package/dist/file/createDir.mjs +0 -7
  90. package/dist/file/fileMove.d.ts +0 -1
  91. package/dist/file/fileMove.js +0 -53
  92. package/dist/file/fileMove.mjs +0 -7
  93. package/dist/file/findFilesByExt.d.ts +0 -1
  94. package/dist/file/findFilesByExt.js +0 -69
  95. package/dist/file/findFilesByExt.mjs +0 -11
  96. package/dist/file/index.d.ts +0 -11
  97. package/dist/file/index.js +0 -106
  98. package/dist/file/index.mjs +0 -17
  99. package/dist/fileMove-3a09e429.d.ts +0 -13
  100. package/dist/findFilesByExt-753e91d7.d.ts +0 -24
  101. package/dist/images/index.d.ts +0 -2
  102. package/dist/images/index.js +0 -132
  103. package/dist/images/index.mjs +0 -15
  104. package/dist/images/loadImage.d.ts +0 -3
  105. package/dist/images/loadImage.js +0 -42
  106. package/dist/images/loadImage.mjs +0 -21
  107. package/dist/images/resize.d.ts +0 -3
  108. package/dist/images/resize.js +0 -64
  109. package/dist/images/resize.mjs +0 -9
  110. package/dist/images/upload.d.ts +0 -11
  111. package/dist/images/upload.js +0 -132
  112. package/dist/images/upload.mjs +0 -14
  113. package/dist/index-1f738e52.d.ts +0 -22
  114. package/dist/index-22309f0c.d.ts +0 -23
  115. package/dist/index-6ae3c86b.d.ts +0 -63
  116. package/dist/index-c8fffc86.d.ts +0 -90
  117. package/dist/index-d652ed2c.d.ts +0 -26
  118. package/dist/index.d.ts +0 -48
  119. package/dist/index.js +0 -1353
  120. package/dist/index.mjs +0 -87
  121. package/dist/json.d.ts +0 -9
  122. package/dist/json.js +0 -52
  123. package/dist/json.mjs +0 -29
  124. package/dist/math/diffDate.d.ts +0 -6
  125. package/dist/math/diffDate.js +0 -36
  126. package/dist/math/diffDate.mjs +0 -9
  127. package/dist/math/index.d.ts +0 -3
  128. package/dist/math/index.js +0 -160
  129. package/dist/math/index.mjs +0 -34
  130. package/dist/math/positiveNumber.d.ts +0 -3
  131. package/dist/math/positiveNumber.js +0 -56
  132. package/dist/math/positiveNumber.mjs +0 -10
  133. package/dist/name/en.d.ts +0 -6
  134. package/dist/name/en.js +0 -44
  135. package/dist/name/en.mjs +0 -9
  136. package/dist/name/index.d.ts +0 -3
  137. package/dist/name/index.js +0 -88
  138. package/dist/name/index.mjs +0 -20
  139. package/dist/name/vi.d.ts +0 -6
  140. package/dist/name/vi.js +0 -66
  141. package/dist/name/vi.mjs +0 -14
  142. package/dist/object-43aaaf92.d.ts +0 -80
  143. package/dist/object.d.ts +0 -1
  144. package/dist/object.js +0 -105
  145. package/dist/object.mjs +0 -21
  146. package/dist/permission/index.d.ts +0 -9
  147. package/dist/permission/index.js +0 -231
  148. package/dist/permission/index.mjs +0 -15
  149. package/dist/permission/requestCamera.d.ts +0 -1
  150. package/dist/permission/requestCamera.js +0 -54
  151. package/dist/permission/requestCamera.mjs +0 -9
  152. package/dist/permission/requestDeviceOrientationControl.d.ts +0 -1
  153. package/dist/permission/requestDeviceOrientationControl.js +0 -206
  154. package/dist/permission/requestDeviceOrientationControl.mjs +0 -10
  155. package/dist/requestCamera-32b7dfc7.d.ts +0 -14
  156. package/dist/requestDeviceOrientationControl-b6458660.d.ts +0 -11
  157. package/dist/response/index.d.ts +0 -50
  158. package/dist/response/index.js +0 -97
  159. package/dist/response/index.mjs +0 -16
  160. package/dist/string/formatNumber.d.ts +0 -7
  161. package/dist/string/formatNumber.js +0 -56
  162. package/dist/string/formatNumber.mjs +0 -10
  163. package/dist/string/generatePassword.d.ts +0 -10
  164. package/dist/string/generatePassword.js +0 -55
  165. package/dist/string/generatePassword.mjs +0 -10
  166. package/dist/string/generateUUID.d.ts +0 -3
  167. package/dist/string/generateUUID.js +0 -40
  168. package/dist/string/generateUUID.mjs +0 -9
  169. package/dist/string/index.d.ts +0 -6
  170. package/dist/string/index.js +0 -316
  171. package/dist/string/index.mjs +0 -31
  172. package/dist/string/makeDaySlug.d.ts +0 -32
  173. package/dist/string/makeDaySlug.js +0 -47
  174. package/dist/string/makeDaySlug.mjs +0 -9
  175. package/dist/string/random.d.ts +0 -15
  176. package/dist/string/random.js +0 -56
  177. package/dist/string/random.mjs +0 -19
  178. package/dist/string/trimNull.d.ts +0 -3
  179. package/dist/string/trimNull.js +0 -49
  180. package/dist/string/trimNull.mjs +0 -9
  181. package/dist/string/url.d.ts +0 -1
  182. package/dist/string/url.js +0 -126
  183. package/dist/string/url.mjs +0 -22
  184. package/dist/url-60657387.d.ts +0 -57
@@ -1,15 +0,0 @@
1
- import {
2
- requestDeviceOrientationControl
3
- } from "../chunk-7ZCEZM7K.mjs";
4
- import "../chunk-RDGP2CKM.mjs";
5
- import {
6
- requestCamera
7
- } from "../chunk-NUTQDHLQ.mjs";
8
- import "../chunk-ZHNGZMRD.mjs";
9
-
10
- // src/permission/index.ts
11
- var permission = { requestCamera, requestDeviceOrientationControl };
12
- var permission_default = permission;
13
- export {
14
- permission_default as default
15
- };
@@ -1 +0,0 @@
1
- export { a as default, a as requestCamera } from '../requestCamera-32b7dfc7.js';
@@ -1,54 +0,0 @@
1
- "use strict";
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 });
9
- };
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;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/permission/requestCamera.ts
21
- var requestCamera_exports = {};
22
- __export(requestCamera_exports, {
23
- default: () => requestCamera_default,
24
- requestCamera: () => requestCamera
25
- });
26
- module.exports = __toCommonJS(requestCamera_exports);
27
- var requestCamera = ({ audio = true, video = true }) => {
28
- if (typeof window == "undefined")
29
- return false;
30
- return new Promise((resolve, reject) => {
31
- if (navigator.mediaDevices.getUserMedia === void 0) {
32
- navigator.mediaDevices.getUserMedia = function(constraints) {
33
- var getUserMedia = navigator.webkitGetUserMedia || navigator.mozGetUserMedia;
34
- if (!getUserMedia) {
35
- return Promise.reject(new Error("getUserMedia is not implemented in this browser"));
36
- }
37
- return new Promise(function(resolve2, reject2) {
38
- getUserMedia.call(navigator, constraints, resolve2, reject2);
39
- });
40
- };
41
- }
42
- navigator.mediaDevices.getUserMedia({ audio, video }).then(function(stream) {
43
- resolve(true);
44
- }).catch(function(err) {
45
- console.log(err.name + ": " + err.message);
46
- resolve(false);
47
- });
48
- });
49
- };
50
- var requestCamera_default = requestCamera;
51
- // Annotate the CommonJS export names for ESM import in node:
52
- 0 && (module.exports = {
53
- requestCamera
54
- });
@@ -1,9 +0,0 @@
1
- import {
2
- requestCamera,
3
- requestCamera_default
4
- } from "../chunk-NUTQDHLQ.mjs";
5
- import "../chunk-ZHNGZMRD.mjs";
6
- export {
7
- requestCamera_default as default,
8
- requestCamera
9
- };
@@ -1 +0,0 @@
1
- export { a as default, a as requestDeviceOrientationControl } from '../requestDeviceOrientationControl-b6458660.js';
@@ -1,206 +0,0 @@
1
- "use strict";
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 });
9
- };
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;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/permission/requestDeviceOrientationControl.ts
21
- var requestDeviceOrientationControl_exports = {};
22
- __export(requestDeviceOrientationControl_exports, {
23
- default: () => requestDeviceOrientationControl_default,
24
- requestDeviceOrientationControl: () => requestDeviceOrientationControl
25
- });
26
- module.exports = __toCommonJS(requestDeviceOrientationControl_exports);
27
-
28
- // src/device/index.ts
29
- var isAndroid = () => {
30
- const deviceInfo2 = checkOS();
31
- if (deviceInfo2)
32
- return deviceInfo2.os.toLowerCase() == "android";
33
- console.log("Can't check OS");
34
- return null;
35
- };
36
- var deviceInfo;
37
- var checkOS = () => {
38
- var _a;
39
- if (typeof window == "undefined")
40
- return {};
41
- if (typeof deviceInfo == "undefined") {
42
- var unknown = "-";
43
- var screenSize = "";
44
- if (screen.width) {
45
- var width = screen.width ? screen.width : "";
46
- var height = screen.height ? screen.height : "";
47
- screenSize += "" + width + " x " + height;
48
- }
49
- var nVer = navigator.appVersion;
50
- var nAgt = navigator.userAgent;
51
- var browser = navigator.appName;
52
- var version = "" + parseFloat(navigator.appVersion);
53
- var majorVersion = parseInt(navigator.appVersion, 10);
54
- var nameOffset, verOffset, ix;
55
- if ((verOffset = nAgt.indexOf("Opera")) != -1) {
56
- browser = "Opera";
57
- version = nAgt.substring(verOffset + 6);
58
- if ((verOffset = nAgt.indexOf("Version")) != -1) {
59
- version = nAgt.substring(verOffset + 8);
60
- }
61
- }
62
- if ((verOffset = nAgt.indexOf("OPR")) != -1) {
63
- browser = "Opera";
64
- version = nAgt.substring(verOffset + 4);
65
- } else if ((verOffset = nAgt.indexOf("Edge")) != -1) {
66
- browser = "Microsoft Edge";
67
- version = nAgt.substring(verOffset + 5);
68
- } else if ((verOffset = nAgt.indexOf("MSIE")) != -1) {
69
- browser = "Microsoft Internet Explorer";
70
- version = nAgt.substring(verOffset + 5);
71
- } else if ((verOffset = nAgt.indexOf("Chrome")) != -1) {
72
- browser = "Chrome";
73
- version = nAgt.substring(verOffset + 7);
74
- } else if ((verOffset = nAgt.indexOf("Safari")) != -1) {
75
- browser = "Safari";
76
- version = nAgt.substring(verOffset + 7);
77
- if ((verOffset = nAgt.indexOf("Version")) != -1) {
78
- version = nAgt.substring(verOffset + 8);
79
- }
80
- } else if ((verOffset = nAgt.indexOf("Firefox")) != -1) {
81
- browser = "Firefox";
82
- version = nAgt.substring(verOffset + 8);
83
- } else if (nAgt.indexOf("Trident/") != -1) {
84
- browser = "Microsoft Internet Explorer";
85
- version = nAgt.substring(nAgt.indexOf("rv:") + 3);
86
- } else if ((nameOffset = nAgt.lastIndexOf(" ") + 1) < (verOffset = nAgt.lastIndexOf("/"))) {
87
- browser = nAgt.substring(nameOffset, verOffset);
88
- version = nAgt.substring(verOffset + 1);
89
- if (browser.toLowerCase() == browser.toUpperCase()) {
90
- browser = navigator.appName;
91
- }
92
- }
93
- if ((ix = version.indexOf(";")) != -1)
94
- version = version.substring(0, ix);
95
- if ((ix = version.indexOf(" ")) != -1)
96
- version = version.substring(0, ix);
97
- if ((ix = version.indexOf(")")) != -1)
98
- version = version.substring(0, ix);
99
- majorVersion = parseInt("" + version, 10);
100
- if (isNaN(majorVersion)) {
101
- version = "" + parseFloat(navigator.appVersion);
102
- majorVersion = parseInt(navigator.appVersion, 10);
103
- }
104
- var mobile = /Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(nVer);
105
- var cookieEnabled = navigator.cookieEnabled ? true : false;
106
- if (typeof navigator.cookieEnabled == "undefined" && !cookieEnabled) {
107
- document.cookie = "testcookie";
108
- cookieEnabled = document.cookie.indexOf("testcookie") != -1 ? true : false;
109
- }
110
- var os = unknown;
111
- var clientStrings = [
112
- { s: "Windows 10", r: /(Windows 10.0|Windows NT 10.0)/ },
113
- { s: "Windows 8.1", r: /(Windows 8.1|Windows NT 6.3)/ },
114
- { s: "Windows 8", r: /(Windows 8|Windows NT 6.2)/ },
115
- { s: "Windows 7", r: /(Windows 7|Windows NT 6.1)/ },
116
- { s: "Windows Vista", r: /Windows NT 6.0/ },
117
- { s: "Windows Server 2003", r: /Windows NT 5.2/ },
118
- { s: "Windows XP", r: /(Windows NT 5.1|Windows XP)/ },
119
- { s: "Windows 2000", r: /(Windows NT 5.0|Windows 2000)/ },
120
- { s: "Windows ME", r: /(Win 9x 4.90|Windows ME)/ },
121
- { s: "Windows 98", r: /(Windows 98|Win98)/ },
122
- { s: "Windows 95", r: /(Windows 95|Win95|Windows_95)/ },
123
- { s: "Windows NT 4.0", r: /(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/ },
124
- { s: "Windows CE", r: /Windows CE/ },
125
- { s: "Windows 3.11", r: /Win16/ },
126
- { s: "Android", r: /Android/ },
127
- { s: "Open BSD", r: /OpenBSD/ },
128
- { s: "Sun OS", r: /SunOS/ },
129
- { s: "Linux", r: /(Linux|X11)/ },
130
- { s: "iOS", r: /(iPhone|iPad|iPod)/ },
131
- { s: "Mac OS X", r: /Mac OS X/ },
132
- { s: "Mac OS", r: /(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/ },
133
- { s: "QNX", r: /QNX/ },
134
- { s: "UNIX", r: /UNIX/ },
135
- { s: "BeOS", r: /BeOS/ },
136
- { s: "OS/2", r: /OS\/2/ },
137
- { s: "Search Bot", r: /(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/ }
138
- ];
139
- for (var id in clientStrings) {
140
- var cs = clientStrings[id];
141
- if (cs.r.test(nAgt)) {
142
- os = cs.s;
143
- break;
144
- }
145
- }
146
- var osVersion = unknown;
147
- if (/Windows/.test(os)) {
148
- const _osv = /Windows (.*)/.exec(os) || [];
149
- osVersion = _osv[1] || "unknown";
150
- os = "Windows";
151
- }
152
- switch (os) {
153
- case "Mac OS X":
154
- const _osvx = /Mac OS X (10[\.\_\d]+)/.exec(nAgt);
155
- osVersion = (_osvx == null ? void 0 : _osvx[1]) || "unknown";
156
- break;
157
- case "Android":
158
- osVersion = ((_a = /Android ([\.\_\d]+)/.exec(nAgt)) == null ? void 0 : _a[1]) || "unknown";
159
- break;
160
- case "iOS":
161
- const _osVersion = /OS (\d+)_(\d+)_?(\d+)?/.exec(nVer) || [0, 0, 0];
162
- osVersion = (_osVersion[1] || 0) + "." + (_osVersion[2] || 0) + "." + (_osVersion[3] || 0);
163
- break;
164
- }
165
- const _deviceInfo = {
166
- screen: screenSize,
167
- browser,
168
- browserVersion: version,
169
- browserMajorVersion: majorVersion,
170
- mobile,
171
- os,
172
- osVersion,
173
- cookies: cookieEnabled
174
- };
175
- deviceInfo = _deviceInfo;
176
- }
177
- return deviceInfo;
178
- };
179
-
180
- // src/permission/requestDeviceOrientationControl.ts
181
- var requestDeviceOrientationControl = () => {
182
- if (typeof window == "undefined")
183
- return false;
184
- return new Promise((resolve, reject) => {
185
- if (isAndroid())
186
- resolve(true);
187
- if (typeof DeviceMotionEvent != "undefined" && DeviceMotionEvent.requestPermission) {
188
- DeviceMotionEvent.requestPermission().then((response) => {
189
- if (response == "granted") {
190
- resolve(true);
191
- } else {
192
- resolve(false);
193
- }
194
- }).catch((response) => {
195
- resolve(false);
196
- });
197
- } else {
198
- resolve(false);
199
- }
200
- });
201
- };
202
- var requestDeviceOrientationControl_default = requestDeviceOrientationControl;
203
- // Annotate the CommonJS export names for ESM import in node:
204
- 0 && (module.exports = {
205
- requestDeviceOrientationControl
206
- });
@@ -1,10 +0,0 @@
1
- import {
2
- requestDeviceOrientationControl,
3
- requestDeviceOrientationControl_default
4
- } from "../chunk-7ZCEZM7K.mjs";
5
- import "../chunk-RDGP2CKM.mjs";
6
- import "../chunk-ZHNGZMRD.mjs";
7
- export {
8
- requestDeviceOrientationControl_default as default,
9
- requestDeviceOrientationControl
10
- };
@@ -1,14 +0,0 @@
1
- declare const requestCamera: ({ audio, video }: {
2
- audio?: boolean | undefined;
3
- video?: boolean | undefined;
4
- }) => false | Promise<unknown>;
5
-
6
- declare const requestCamera$1_requestCamera: typeof requestCamera;
7
- declare namespace requestCamera$1 {
8
- export {
9
- requestCamera as default,
10
- requestCamera$1_requestCamera as requestCamera,
11
- };
12
- }
13
-
14
- export { requestCamera as a, requestCamera$1 as r };
@@ -1,11 +0,0 @@
1
- declare const requestDeviceOrientationControl: () => false | Promise<unknown>;
2
-
3
- declare const requestDeviceOrientationControl$1_requestDeviceOrientationControl: typeof requestDeviceOrientationControl;
4
- declare namespace requestDeviceOrientationControl$1 {
5
- export {
6
- requestDeviceOrientationControl as default,
7
- requestDeviceOrientationControl$1_requestDeviceOrientationControl as requestDeviceOrientationControl,
8
- };
9
- }
10
-
11
- export { requestDeviceOrientationControl as a, requestDeviceOrientationControl$1 as r };
@@ -1,50 +0,0 @@
1
- declare const getResponse: () => {
2
- status: number;
3
- messages: never[];
4
- data: {};
5
- };
6
- declare const getSuccessResponse: (data: any, message?: string) => {
7
- status: number;
8
- messages: string[];
9
- data: any;
10
- };
11
- declare const getFailedResponse: (...messages: any[]) => {
12
- status: number;
13
- error: boolean;
14
- messages: any[];
15
- data: {};
16
- };
17
- declare const Response: {
18
- send: (res: any, data?: any) => any;
19
- succeed: (res: any, data?: any) => any;
20
- failed: (res: any, ...messages: string[]) => any;
21
- rejected: (res: any, message?: string) => any;
22
- ignore: (res: any, message?: string) => any;
23
- };
24
- declare const response: {
25
- getResponse: () => {
26
- status: number;
27
- messages: never[];
28
- data: {};
29
- };
30
- getSuccessResponse: (data: any, message?: string) => {
31
- status: number;
32
- messages: string[];
33
- data: any;
34
- };
35
- getFailedResponse: (...messages: any[]) => {
36
- status: number;
37
- error: boolean;
38
- messages: any[];
39
- data: {};
40
- };
41
- Response: {
42
- send: (res: any, data?: any) => any;
43
- succeed: (res: any, data?: any) => any;
44
- failed: (res: any, ...messages: string[]) => any;
45
- rejected: (res: any, message?: string) => any;
46
- ignore: (res: any, message?: string) => any;
47
- };
48
- };
49
-
50
- export { Response, response as default, getFailedResponse, getResponse, getSuccessResponse };
@@ -1,97 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
- mod
23
- ));
24
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
-
26
- // src/response/index.ts
27
- var response_exports = {};
28
- __export(response_exports, {
29
- Response: () => Response,
30
- default: () => response_default,
31
- getFailedResponse: () => getFailedResponse,
32
- getResponse: () => getResponse,
33
- getSuccessResponse: () => getSuccessResponse
34
- });
35
- module.exports = __toCommonJS(response_exports);
36
-
37
- // src/console/log.ts
38
- var import_chalk = __toESM(require("chalk"));
39
- var import_dayjs = __toESM(require("dayjs"));
40
- var logRes = (res, ...msg) => {
41
- var _a, _b;
42
- console.warn(import_chalk.default.blue(`[${res.statusCode}] ${((_a = res.locals.req) == null ? void 0 : _a.originalUrl) || "UNKNOWN_PATH"} >> ${(_b = res.locals.req) == null ? void 0 : _b.method} >>`), ...msg);
43
- return msg;
44
- };
45
-
46
- // src/response/index.ts
47
- var getResponse = () => {
48
- return { status: 0, messages: [], data: {} };
49
- };
50
- var getSuccessResponse = (data, message) => {
51
- return { status: 1, messages: message ? [message] : [], data };
52
- };
53
- var getFailedResponse = (...messages) => {
54
- if (!messages)
55
- messages = ["What's do you want?"];
56
- return { status: 0, error: true, messages: [...messages], data: {} };
57
- };
58
- var Response = {
59
- send: (res, data = {}) => {
60
- if (res.locals.logEnabled)
61
- logRes(res, data);
62
- if (data.error)
63
- return Response.failed(res, data.error);
64
- return Response.succeed(res, data);
65
- },
66
- succeed: (res, data = {}) => {
67
- if (res.locals.logEnabled)
68
- logRes(res, data);
69
- return res.status(200).json(getSuccessResponse(data));
70
- },
71
- failed: (res, ...messages) => {
72
- if (res.locals.logEnabled)
73
- logRes(res, ...messages);
74
- return res.status(200).json(getFailedResponse(...messages));
75
- },
76
- rejected: (res, message) => {
77
- const msg = message ? message : "Permissions denied.";
78
- if (res.locals.logEnabled)
79
- logRes(res, { message: msg });
80
- return res.status(403).json(getFailedResponse(msg));
81
- },
82
- ignore: (res, message) => {
83
- const msg = message ? message : "What do you want?";
84
- if (res.locals.logEnabled)
85
- logRes(res, { statusCode: 404, message: msg });
86
- return res.status(200).json(getFailedResponse(msg));
87
- }
88
- };
89
- var response = { getResponse, getSuccessResponse, getFailedResponse, Response };
90
- var response_default = response;
91
- // Annotate the CommonJS export names for ESM import in node:
92
- 0 && (module.exports = {
93
- Response,
94
- getFailedResponse,
95
- getResponse,
96
- getSuccessResponse
97
- });
@@ -1,16 +0,0 @@
1
- import {
2
- Response,
3
- getFailedResponse,
4
- getResponse,
5
- getSuccessResponse,
6
- response_default
7
- } from "../chunk-5NTK5JAI.mjs";
8
- import "../chunk-GNJDIUYM.mjs";
9
- import "../chunk-ZHNGZMRD.mjs";
10
- export {
11
- Response,
12
- response_default as default,
13
- getFailedResponse,
14
- getResponse,
15
- getSuccessResponse
16
- };
@@ -1,7 +0,0 @@
1
- /**
2
- * Format the input number with commas
3
- * @example 1000000 -> 1,000,000
4
- */
5
- declare function formatNumber(num: number, prefix?: string): string;
6
-
7
- export { formatNumber as default, formatNumber };
@@ -1,56 +0,0 @@
1
- "use strict";
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 });
9
- };
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;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/string/formatNumber.ts
21
- var formatNumber_exports = {};
22
- __export(formatNumber_exports, {
23
- default: () => formatNumber_default,
24
- formatNumber: () => formatNumber
25
- });
26
- module.exports = __toCommonJS(formatNumber_exports);
27
-
28
- // src/object.ts
29
- var isNull = (object) => {
30
- if (typeof object == "undefined")
31
- return true;
32
- if (object == "")
33
- return true;
34
- if (Array.isArray(object))
35
- return object.length == 0;
36
- if (JSON.stringify(object) == "{}")
37
- return true;
38
- return object == null;
39
- };
40
- var toInt = (object) => {
41
- if (isNull(object || ""))
42
- return 0;
43
- object = (object || "").toString();
44
- return parseInt(object, 10);
45
- };
46
-
47
- // src/string/formatNumber.ts
48
- function formatNumber(num, prefix = "$") {
49
- const numRound = Math.round((toInt(num) + Number.EPSILON) * 100) / 100;
50
- return Number.isNaN(numRound) ? "0" : "" + numRound.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, prefix + "1,");
51
- }
52
- var formatNumber_default = formatNumber;
53
- // Annotate the CommonJS export names for ESM import in node:
54
- 0 && (module.exports = {
55
- formatNumber
56
- });
@@ -1,10 +0,0 @@
1
- import {
2
- formatNumber,
3
- formatNumber_default
4
- } from "../chunk-C7S43KGB.mjs";
5
- import "../chunk-5UEMANWE.mjs";
6
- import "../chunk-ZHNGZMRD.mjs";
7
- export {
8
- formatNumber_default as default,
9
- formatNumber
10
- };
@@ -1,10 +0,0 @@
1
- /**
2
- * random password
3
- * - if hard = true -> random punctuation inside
4
- * @param {*} length
5
- * @param {Boolean} hard
6
- * @returns
7
- */
8
- declare function generatePassword(length?: number, hard?: boolean): string;
9
-
10
- export { generatePassword as default, generatePassword };
@@ -1,55 +0,0 @@
1
- "use strict";
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 });
9
- };
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;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/string/generatePassword.ts
21
- var generatePassword_exports = {};
22
- __export(generatePassword_exports, {
23
- default: () => generatePassword_default,
24
- generatePassword: () => generatePassword
25
- });
26
- module.exports = __toCommonJS(generatePassword_exports);
27
-
28
- // src/string/random.ts
29
- var textLowCase = "abcdefghijklmnopqrstuvwxyz";
30
- var numeric = "0123456789";
31
- var punctuation = "!@#$%^&*()_+~|}{[];?><,./-=";
32
- var randomStringByLength = (length, str = textLowCase) => {
33
- let result = "";
34
- for (let i = 0; i < length; i++) {
35
- result += str.charAt(Math.floor(Math.random() * str.length));
36
- }
37
- return result;
38
- };
39
-
40
- // src/string/generatePassword.ts
41
- function generatePassword(length = 6, hard = true) {
42
- if (!Number.isFinite(length))
43
- length = 6;
44
- if (length <= 0)
45
- length = 6;
46
- let pass = randomStringByLength(length, textLowCase + textLowCase.toUpperCase() + numeric);
47
- if (hard)
48
- pass = pass.replace(pass[Math.floor(pass.length / 2)], randomStringByLength(1, punctuation));
49
- return pass;
50
- }
51
- var generatePassword_default = generatePassword;
52
- // Annotate the CommonJS export names for ESM import in node:
53
- 0 && (module.exports = {
54
- generatePassword
55
- });
@@ -1,10 +0,0 @@
1
- import {
2
- generatePassword,
3
- generatePassword_default
4
- } from "../chunk-QZYX26HT.mjs";
5
- import "../chunk-KPO3RH5G.mjs";
6
- import "../chunk-ZHNGZMRD.mjs";
7
- export {
8
- generatePassword_default as default,
9
- generatePassword
10
- };
@@ -1,3 +0,0 @@
1
- declare function generateUUID(): string;
2
-
3
- export { generateUUID as default, generateUUID };