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,9 +0,0 @@
1
- import {
2
- trimNull,
3
- trimNull_default
4
- } from "../chunk-7MK72U4O.mjs";
5
- import "../chunk-ZHNGZMRD.mjs";
6
- export {
7
- trimNull_default as default,
8
- trimNull
9
- };
@@ -1 +0,0 @@
1
- export { a as addQueryParam, x as default, d as getFileExtension, c as getFileNameWithExtension, b as getFileNameWithoutExtension, g as getUrlParams, e as isImage, i as isLink } from '../url-60657387.js';
@@ -1,126 +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/url.ts
21
- var url_exports = {};
22
- __export(url_exports, {
23
- addQueryParam: () => addQueryParam,
24
- default: () => url_default,
25
- getFileExtension: () => getFileExtension,
26
- getFileNameWithExtension: () => getFileNameWithExtension,
27
- getFileNameWithoutExtension: () => getFileNameWithoutExtension,
28
- getUrlParams: () => getUrlParams,
29
- isImage: () => isImage,
30
- isLink: () => isLink
31
- });
32
- module.exports = __toCommonJS(url_exports);
33
-
34
- // src/object.ts
35
- var isNull = (object) => {
36
- if (typeof object == "undefined")
37
- return true;
38
- if (object == "")
39
- return true;
40
- if (Array.isArray(object))
41
- return object.length == 0;
42
- if (JSON.stringify(object) == "{}")
43
- return true;
44
- return object == null;
45
- };
46
-
47
- // src/string/url.ts
48
- var urlRegex = /(https?:\/\/[^\s]+)/g;
49
- var addQueryParam = (_url, key, value) => {
50
- _url += (_url.split("?")[1] ? "&" : "?") + `${key}=${value}`;
51
- return _url;
52
- };
53
- var getUrlParams = (parameter, staticURL, decode = true) => {
54
- if (typeof window == "undefined")
55
- return "";
56
- staticURL = staticURL == void 0 ? window.location.host : staticURL;
57
- var currLocation = staticURL.length > 0 ? staticURL : window.location.search;
58
- if (currLocation.split("?").length < 2)
59
- return "";
60
- var parArr = currLocation.split("?")[1].split("&"), returnBool = true;
61
- for (var i = 0; i < parArr.length; i++) {
62
- var parr = parArr[i].split("=");
63
- if (parr[0] == parameter) {
64
- return decode ? decodeURIComponent(parr[1]) : parr[1];
65
- returnBool = true;
66
- } else {
67
- returnBool = false;
68
- }
69
- }
70
- if (!returnBool)
71
- return false;
72
- };
73
- var isLink = (str) => {
74
- return urlRegex.test(str);
75
- };
76
- var getFileNameWithoutExtension = (url) => {
77
- url = decodeURIComponent(url);
78
- if (url) {
79
- const m = url.toString().match(/.*\/(.+?)\./);
80
- if (m && m.length > 1) {
81
- return m[1];
82
- }
83
- if (!isNull(url)) {
84
- return url.split(".").shift();
85
- }
86
- }
87
- return "";
88
- };
89
- var getFileNameWithExtension = (url) => {
90
- var _a, _b;
91
- const _url = decodeURIComponent(url);
92
- const m = _url.toString().match(/.*\/(.*)$/) || [];
93
- if (typeof m != "undefined" && (m == null ? void 0 : m.length) > 1) {
94
- const a = ((_a = m == null ? void 0 : m[1].split("/")) == null ? void 0 : _a.pop()) || "";
95
- const b = (_b = a.split("?")) == null ? void 0 : _b.shift();
96
- return b || (m == null ? void 0 : m[1]) || "";
97
- }
98
- if (!isNull(_url))
99
- return url;
100
- return "";
101
- };
102
- var getFileExtension = (url) => {
103
- return getFileNameWithExtension(url).split(".").pop();
104
- };
105
- var isImage = (url) => {
106
- if (!url)
107
- return false;
108
- const arr = ["png", "jpg", "jpeg", "jpe", "jif", "jfif", "gif", "svg"];
109
- const index = arr.findIndex((item) => {
110
- var _a;
111
- return ((_a = getFileExtension(url)) == null ? void 0 : _a.toLowerCase()) == item;
112
- });
113
- return index >= 0;
114
- };
115
- var xurl = { addQueryParam, getUrlParams, isLink, getFileNameWithoutExtension, getFileNameWithExtension, getFileExtension, isImage };
116
- var url_default = xurl;
117
- // Annotate the CommonJS export names for ESM import in node:
118
- 0 && (module.exports = {
119
- addQueryParam,
120
- getFileExtension,
121
- getFileNameWithExtension,
122
- getFileNameWithoutExtension,
123
- getUrlParams,
124
- isImage,
125
- isLink
126
- });
@@ -1,22 +0,0 @@
1
- import {
2
- addQueryParam,
3
- getFileExtension,
4
- getFileNameWithExtension,
5
- getFileNameWithoutExtension,
6
- getUrlParams,
7
- isImage,
8
- isLink,
9
- url_default
10
- } from "../chunk-KWG5LYNK.mjs";
11
- import "../chunk-5UEMANWE.mjs";
12
- import "../chunk-ZHNGZMRD.mjs";
13
- export {
14
- addQueryParam,
15
- url_default as default,
16
- getFileExtension,
17
- getFileNameWithExtension,
18
- getFileNameWithoutExtension,
19
- getUrlParams,
20
- isImage,
21
- isLink
22
- };
@@ -1,57 +0,0 @@
1
- declare const addQueryParam: (_url: string, key: string, value: any) => string;
2
- declare const getUrlParams: (parameter: string, staticURL?: string, decode?: boolean) => string | false | undefined;
3
- /**
4
- *
5
- * @return {boolean}
6
- */
7
- declare const isLink: (str: string) => boolean;
8
- /**
9
- *
10
- * @param {string} url
11
- * @return {string}
12
- */
13
- declare const getFileNameWithoutExtension: (url: string) => string | undefined;
14
- declare const getFileNameWithExtension: (url: string) => string;
15
- /**
16
- *
17
- * @param {string} url
18
- * @return {string}
19
- */
20
- declare const getFileExtension: (url: string) => string | undefined;
21
- /**
22
- *
23
- * @param {string} url
24
- * @returns
25
- */
26
- declare const isImage: (url: string) => boolean;
27
- declare const xurl: {
28
- addQueryParam: (_url: string, key: string, value: any) => string;
29
- getUrlParams: (parameter: string, staticURL?: string, decode?: boolean) => string | false | undefined;
30
- isLink: (str: string) => boolean;
31
- getFileNameWithoutExtension: (url: string) => string | undefined;
32
- getFileNameWithExtension: (url: string) => string;
33
- getFileExtension: (url: string) => string | undefined;
34
- isImage: (url: string) => boolean;
35
- };
36
-
37
- declare const url_addQueryParam: typeof addQueryParam;
38
- declare const url_getFileExtension: typeof getFileExtension;
39
- declare const url_getFileNameWithExtension: typeof getFileNameWithExtension;
40
- declare const url_getFileNameWithoutExtension: typeof getFileNameWithoutExtension;
41
- declare const url_getUrlParams: typeof getUrlParams;
42
- declare const url_isImage: typeof isImage;
43
- declare const url_isLink: typeof isLink;
44
- declare namespace url {
45
- export {
46
- url_addQueryParam as addQueryParam,
47
- xurl as default,
48
- url_getFileExtension as getFileExtension,
49
- url_getFileNameWithExtension as getFileNameWithExtension,
50
- url_getFileNameWithoutExtension as getFileNameWithoutExtension,
51
- url_getUrlParams as getUrlParams,
52
- url_isImage as isImage,
53
- url_isLink as isLink,
54
- };
55
- }
56
-
57
- export { addQueryParam as a, getFileNameWithoutExtension as b, getFileNameWithExtension as c, getFileExtension as d, isImage as e, getUrlParams as g, isLink as i, url as u, xurl as x };