diginext-utils 3.0.5 → 3.0.7

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 (79) hide show
  1. package/dist/Checker.d.ts +3 -4
  2. package/dist/EventDispatcher.d.ts +3 -3
  3. package/dist/FileUpload.d.ts +3 -3
  4. package/dist/Slug.d.ts +3 -4
  5. package/dist/Timer.d.ts +4 -1
  6. package/dist/Validation.d.ts +2 -3
  7. package/dist/array.d.ts +113 -1
  8. package/dist/color.d.ts +9 -10
  9. package/dist/device/browser.d.ts +5 -1
  10. package/dist/device/browser.js +3 -3
  11. package/dist/device/browser.js.map +1 -1
  12. package/dist/device/camera.d.ts +7 -1
  13. package/dist/device/index.d.ts +5 -1
  14. package/dist/device/os.d.ts +6 -7
  15. package/dist/file/createDir.d.ts +5 -1
  16. package/dist/file/detectPrivateKey.d.ts +3 -4
  17. package/dist/file/detectPrivateKeyByFilePath.d.ts +2 -3
  18. package/dist/file/detectPrivateKeyByFilePath.js +5 -2
  19. package/dist/file/detectPrivateKeyByFilePath.js.map +1 -1
  20. package/dist/file/fileMove.d.ts +4 -1
  21. package/dist/file/findFilesByExt.d.ts +13 -1
  22. package/dist/file/getAllFiles.d.ts +1 -3
  23. package/dist/file/index.d.ts +4 -6
  24. package/dist/gameboi/index.d.ts +4 -6
  25. package/dist/html/transform3dToObject.d.ts +2 -4
  26. package/dist/images/downloadByUrl.d.ts +1 -3
  27. package/dist/images/index.d.ts +2 -2
  28. package/dist/images/loadImage.d.ts +1 -3
  29. package/dist/images/resize.d.ts +2 -3
  30. package/dist/images/upload.d.ts +3 -4
  31. package/dist/index.d.ts +19 -30
  32. package/dist/json.d.ts +3 -4
  33. package/dist/math/diffDate.d.ts +2 -3
  34. package/dist/math/index.d.ts +30 -3
  35. package/dist/math/positiveNumber.d.ts +2 -3
  36. package/dist/name/en.d.ts +3 -4
  37. package/dist/name/index.d.ts +12 -3
  38. package/dist/name/vi.d.ts +3 -4
  39. package/dist/object.d.ts +31 -1
  40. package/dist/permission/index.d.ts +2 -3
  41. package/dist/permission/requestCamera.d.ts +5 -1
  42. package/dist/permission/requestDeviceOrientationControl.d.ts +2 -1
  43. package/dist/response/index.d.ts +6 -7
  44. package/dist/string/convertPathnameAndQuery.d.ts +2 -4
  45. package/dist/string/formatNumber.d.ts +2 -3
  46. package/dist/string/generatePassword.d.ts +2 -3
  47. package/dist/string/generateUUID.d.ts +2 -3
  48. package/dist/string/getTextBetweenCharByIndex.d.ts +1 -3
  49. package/dist/string/index.d.ts +65 -6
  50. package/dist/string/indexesOf.d.ts +1 -3
  51. package/dist/string/makeDaySlug.d.ts +3 -4
  52. package/dist/string/random.d.ts +10 -11
  53. package/dist/string/trimNull.d.ts +2 -3
  54. package/dist/string/url.d.ts +22 -1
  55. package/dist/xconsole/enableConsole.d.ts +2 -1
  56. package/dist/xconsole/index.d.ts +11 -2
  57. package/dist/xconsole/log.d.ts +8 -9
  58. package/esm/device/browser.js +3 -3
  59. package/esm/device/browser.js.map +1 -1
  60. package/esm/file/detectPrivateKeyByFilePath.js +5 -2
  61. package/esm/file/detectPrivateKeyByFilePath.js.map +1 -1
  62. package/package.json +31 -23
  63. package/dist/Timer-7b0c4e7c.d.ts +0 -11
  64. package/dist/array-c38eff4c.d.ts +0 -158
  65. package/dist/browser-8d042ffe.d.ts +0 -22
  66. package/dist/camera-1a859d72.d.ts +0 -15
  67. package/dist/createDir-220e0081.d.ts +0 -13
  68. package/dist/enableConsole-ddc24282.d.ts +0 -11
  69. package/dist/fileMove-3a09e429.d.ts +0 -13
  70. package/dist/findFilesByExt-753e91d7.d.ts +0 -24
  71. package/dist/index-11ec3903.d.ts +0 -26
  72. package/dist/index-1f738e52.d.ts +0 -22
  73. package/dist/index-22309f0c.d.ts +0 -23
  74. package/dist/index-3eeb7834.d.ts +0 -90
  75. package/dist/index-6ae3c86b.d.ts +0 -63
  76. package/dist/object-210cae96.d.ts +0 -52
  77. package/dist/requestCamera-32b7dfc7.d.ts +0 -14
  78. package/dist/requestDeviceOrientationControl-b6458660.d.ts +0 -11
  79. package/dist/url-0da0be84.d.ts +0 -43
@@ -1,22 +0,0 @@
1
- declare const isPotrait: () => boolean;
2
- declare const isLandscape: () => boolean;
3
- declare const ua: () => any;
4
- declare const isFacebookWebview: () => boolean | undefined;
5
- declare const isInAppWebview: () => boolean;
6
-
7
- declare const browser_isFacebookWebview: typeof isFacebookWebview;
8
- declare const browser_isInAppWebview: typeof isInAppWebview;
9
- declare const browser_isLandscape: typeof isLandscape;
10
- declare const browser_isPotrait: typeof isPotrait;
11
- declare const browser_ua: typeof ua;
12
- declare namespace browser {
13
- export {
14
- browser_isFacebookWebview as isFacebookWebview,
15
- browser_isInAppWebview as isInAppWebview,
16
- browser_isLandscape as isLandscape,
17
- browser_isPotrait as isPotrait,
18
- browser_ua as ua,
19
- };
20
- }
21
-
22
- export { isLandscape as a, browser as b, isFacebookWebview as c, isInAppWebview as d, isPotrait as i, ua as u };
@@ -1,15 +0,0 @@
1
- type GetWebcamParams = {
2
- container?: HTMLElement;
3
- facingMode: string;
4
- audio: boolean;
5
- };
6
- declare function getWebcam(params?: GetWebcamParams): Promise<unknown> | undefined;
7
-
8
- declare const camera_getWebcam: typeof getWebcam;
9
- declare namespace camera {
10
- export {
11
- camera_getWebcam as getWebcam,
12
- };
13
- }
14
-
15
- export { camera as c, getWebcam as g };
@@ -1,13 +0,0 @@
1
- /**
2
- * Create new directory
3
- */
4
- declare function createDir(path: string): true | undefined;
5
-
6
- declare const createDir$1_createDir: typeof createDir;
7
- declare namespace createDir$1 {
8
- export {
9
- createDir$1_createDir as createDir,
10
- };
11
- }
12
-
13
- export { createDir as a, createDir$1 as c };
@@ -1,11 +0,0 @@
1
- declare function enableConsole(): Console;
2
-
3
- declare const enableConsole$1_enableConsole: typeof enableConsole;
4
- declare namespace enableConsole$1 {
5
- export {
6
- enableConsole as default,
7
- enableConsole$1_enableConsole as enableConsole,
8
- };
9
- }
10
-
11
- export { enableConsole as a, enableConsole$1 as e };
@@ -1,13 +0,0 @@
1
- /**
2
- * Move file to another location.
3
- */
4
- declare function fileMove(oldPath: string, newPath: string, callback: any): void;
5
-
6
- declare const fileMove$1_fileMove: typeof fileMove;
7
- declare namespace fileMove$1 {
8
- export {
9
- fileMove$1_fileMove as fileMove,
10
- };
11
- }
12
-
13
- export { fileMove as a, fileMove$1 as f };
@@ -1,24 +0,0 @@
1
- /**
2
- * This is an alias of "findFileByExt()"
3
- */
4
- declare const forEachFileByExt: (base: string, ext: string, cb: (path: string) => {}) => void;
5
- /**
6
- * This is an alias of "forEachFileByExt()"
7
- */
8
- declare const findFileByExt: (base: string, ext: string, cb: (path: string) => {}) => void;
9
- declare const fileExt: {
10
- findFileByExt: (base: string, ext: string, cb: (path: string) => {}) => void;
11
- forEachFileByExt: (base: string, ext: string, cb: (path: string) => {}) => void;
12
- };
13
-
14
- declare const findFilesByExt_findFileByExt: typeof findFileByExt;
15
- declare const findFilesByExt_forEachFileByExt: typeof forEachFileByExt;
16
- declare namespace findFilesByExt {
17
- export {
18
- fileExt as default,
19
- findFilesByExt_findFileByExt as findFileByExt,
20
- findFilesByExt_forEachFileByExt as forEachFileByExt,
21
- };
22
- }
23
-
24
- export { fileExt as a, forEachFileByExt as b, findFileByExt as c, findFilesByExt as f };
@@ -1,26 +0,0 @@
1
- import { a as enableConsole } from './enableConsole-ddc24282.js';
2
-
3
- declare const disableConsole: () => void;
4
- declare const removeConsole: () => void;
5
- declare const showCredit: (version?: string | number) => void;
6
-
7
- declare const xconsole: {
8
- enableConsole: typeof enableConsole;
9
- disableConsole: () => void;
10
- removeConsole: () => void;
11
- showCredit: (version?: string | number) => void;
12
- };
13
-
14
- declare const console_disableConsole: typeof disableConsole;
15
- declare const console_removeConsole: typeof removeConsole;
16
- declare const console_showCredit: typeof showCredit;
17
- declare namespace console {
18
- export {
19
- xconsole as default,
20
- console_disableConsole as disableConsole,
21
- console_removeConsole as removeConsole,
22
- console_showCredit as showCredit,
23
- };
24
- }
25
-
26
- export { console as c, disableConsole as d, removeConsole as r, showCredit as s, xconsole as x };
@@ -1,22 +0,0 @@
1
- declare const isIos: () => boolean | null;
2
- declare const isAndroid: () => boolean | null;
3
- declare const isTablet: () => boolean | null;
4
- declare const isMobile: () => boolean | null;
5
- declare const checkOS: () => any;
6
-
7
- declare const device_checkOS: typeof checkOS;
8
- declare const device_isAndroid: typeof isAndroid;
9
- declare const device_isIos: typeof isIos;
10
- declare const device_isMobile: typeof isMobile;
11
- declare const device_isTablet: typeof isTablet;
12
- declare namespace device {
13
- export {
14
- device_checkOS as checkOS,
15
- device_isAndroid as isAndroid,
16
- device_isIos as isIos,
17
- device_isMobile as isMobile,
18
- device_isTablet as isTablet,
19
- };
20
- }
21
-
22
- export { isAndroid as a, isTablet as b, isMobile as c, device as d, checkOS as e, isIos as i };
@@ -1,23 +0,0 @@
1
- import NameEN, { generateName } from './name/en.js';
2
- import NameVI from './name/vi.js';
3
-
4
- declare const xname: {
5
- NameEN: {
6
- generateName: typeof generateName;
7
- };
8
- NameVI: {
9
- generateName: (useGender?: boolean, male?: boolean) => any;
10
- };
11
- };
12
-
13
- declare const xname$1_NameEN: typeof NameEN;
14
- declare const xname$1_NameVI: typeof NameVI;
15
- declare namespace xname$1 {
16
- export {
17
- xname$1_NameEN as NameEN,
18
- xname$1_NameVI as NameVI,
19
- xname as default,
20
- };
21
- }
22
-
23
- export { xname as a, xname$1 as x };
@@ -1,90 +0,0 @@
1
- import { makeDaySlug } from './string/makeDaySlug.js';
2
- import generateUUID from './string/generateUUID.js';
3
- import formatNumber from './string/formatNumber.js';
4
- import generatePassword from './string/generatePassword.js';
5
- import trimNull from './string/trimNull.js';
6
-
7
- /**
8
- * Get string between str1 and str2 from text
9
- */
10
- declare const getBetween: (text: string, str1: string, str2?: string) => string;
11
- /**
12
- * Convert object to string
13
- */
14
- declare const makeString: (object?: any) => string;
15
- /**
16
- * toUpperCase
17
- */
18
- declare const toUpperCase: (str?: string) => string;
19
- /**
20
- * toLowerCase
21
- */
22
- declare const toLowerCase: (str?: string) => string;
23
- /**
24
- * toLowerCase
25
- * @param {*} str
26
- * @return {string}
27
- */
28
- declare const titleize: (str?: string) => string;
29
- /**
30
- * Convert only first charater to UpperCase
31
- */
32
- declare const capitalize: (str: string | any, lowercaseRest?: number) => any;
33
- /**
34
- * Convert first character from every single words to UpperCase
35
- */
36
- declare const capitalizeName: (str: string) => string;
37
- declare const clearUnicodeCharacters: (s: string, opt?: {
38
- [key: string]: any;
39
- }) => string;
40
-
41
- declare const xstring: {
42
- getBetween: (text: string, str1: string, str2?: string) => string;
43
- makeString: (object?: any) => string;
44
- makeDaySlug: typeof makeDaySlug;
45
- toUpperCase: (str?: string) => string;
46
- toLowerCase: (str?: string) => string;
47
- titleize: (str?: string) => string;
48
- capitalize: (str: string | any, lowercaseRest?: number) => any;
49
- capitalizeName: (str: string) => string;
50
- clearUnicodeCharacters: (s: string, opt?: {
51
- [key: string]: any;
52
- }) => string;
53
- generateUUID: typeof generateUUID;
54
- randAllCharacterByLength: (length?: number) => string;
55
- randomStringByLength: (length: number, str?: string) => string;
56
- formatNumber: typeof formatNumber;
57
- generatePassword: typeof generatePassword;
58
- trimNull: typeof trimNull;
59
- addQueryParam: (_url: string, key: string, value: any) => string;
60
- getUrlParams: (parameter: string, staticURL?: string | undefined, decode?: boolean) => string | false | undefined;
61
- isLink: (str: string) => boolean;
62
- getFileNameWithoutExtension: (url: string) => string;
63
- getFileNameWithExtension: (url: string) => string;
64
- getFileExtension: (url: string) => string | null | undefined;
65
- isImage: (url: string) => boolean;
66
- };
67
-
68
- declare const string_capitalize: typeof capitalize;
69
- declare const string_capitalizeName: typeof capitalizeName;
70
- declare const string_clearUnicodeCharacters: typeof clearUnicodeCharacters;
71
- declare const string_getBetween: typeof getBetween;
72
- declare const string_makeString: typeof makeString;
73
- declare const string_titleize: typeof titleize;
74
- declare const string_toLowerCase: typeof toLowerCase;
75
- declare const string_toUpperCase: typeof toUpperCase;
76
- declare namespace string {
77
- export {
78
- string_capitalize as capitalize,
79
- string_capitalizeName as capitalizeName,
80
- string_clearUnicodeCharacters as clearUnicodeCharacters,
81
- xstring as default,
82
- string_getBetween as getBetween,
83
- string_makeString as makeString,
84
- string_titleize as titleize,
85
- string_toLowerCase as toLowerCase,
86
- string_toUpperCase as toUpperCase,
87
- };
88
- }
89
-
90
- export { toLowerCase as a, titleize as b, capitalize as c, capitalizeName as d, clearUnicodeCharacters as e, getBetween as g, makeString as m, string as s, toUpperCase as t, xstring as x };
@@ -1,63 +0,0 @@
1
- import diffDate from './math/diffDate.js';
2
- import positiveNumber from './math/positiveNumber.js';
3
-
4
- declare const randRound: (number: number) => number;
5
- declare const rand: (number: number) => number;
6
- declare const randHalt: (number: number) => number;
7
- declare const randInt: (low: number, high: number) => number;
8
- declare const randFloat: (low: number, high: number) => number;
9
- declare const degToRad: (degrees: number) => number;
10
- declare const radToDeg: (radians: number) => number;
11
- declare const clamp: (value: number, min: number, max: number) => number;
12
- declare const degBetweenPoints360: (cx: number, cy: number, ex: number, ey: number) => number;
13
- declare const degBetweenPoints: (cx: number, cy: number, ex: number, ey: number) => number;
14
- declare const angleBetweenPoints: (cx: number, cy: number, ex: number, ey: number) => number;
15
- declare const distance2Point: (x1: number, y1: number, x2: number, y2: number) => number;
16
-
17
- declare const xmath: {
18
- rand: (number: number) => number;
19
- randRound: (number: number) => number;
20
- randHalt: (number: number) => number;
21
- randInt: (low: number, high: number) => number;
22
- randFloat: (low: number, high: number) => number;
23
- degToRad: (degrees: number) => number;
24
- radToDeg: (radians: number) => number;
25
- degBetweenPoints360: (cx: number, cy: number, ex: number, ey: number) => number;
26
- degBetweenPoints: (cx: number, cy: number, ex: number, ey: number) => number;
27
- angleBetweenPoints: (cx: number, cy: number, ex: number, ey: number) => number;
28
- distance2Point: (x1: number, y1: number, x2: number, y2: number) => number;
29
- diffDate: typeof diffDate;
30
- positiveNumber: typeof positiveNumber;
31
- };
32
-
33
- declare const math_angleBetweenPoints: typeof angleBetweenPoints;
34
- declare const math_clamp: typeof clamp;
35
- declare const math_degBetweenPoints: typeof degBetweenPoints;
36
- declare const math_degBetweenPoints360: typeof degBetweenPoints360;
37
- declare const math_degToRad: typeof degToRad;
38
- declare const math_distance2Point: typeof distance2Point;
39
- declare const math_radToDeg: typeof radToDeg;
40
- declare const math_rand: typeof rand;
41
- declare const math_randFloat: typeof randFloat;
42
- declare const math_randHalt: typeof randHalt;
43
- declare const math_randInt: typeof randInt;
44
- declare const math_randRound: typeof randRound;
45
- declare namespace math {
46
- export {
47
- math_angleBetweenPoints as angleBetweenPoints,
48
- math_clamp as clamp,
49
- xmath as default,
50
- math_degBetweenPoints as degBetweenPoints,
51
- math_degBetweenPoints360 as degBetweenPoints360,
52
- math_degToRad as degToRad,
53
- math_distance2Point as distance2Point,
54
- math_radToDeg as radToDeg,
55
- math_rand as rand,
56
- math_randFloat as randFloat,
57
- math_randHalt as randHalt,
58
- math_randInt as randInt,
59
- math_randRound as randRound,
60
- };
61
- }
62
-
63
- export { rand as a, randHalt as b, randInt as c, randFloat as d, degToRad as e, radToDeg as f, clamp as g, degBetweenPoints360 as h, degBetweenPoints as i, angleBetweenPoints as j, distance2Point as k, math as m, randRound as r, xmath as x };
@@ -1,52 +0,0 @@
1
- declare const isNull: (object: any) => boolean;
2
- declare const toBool: (object: any) => boolean;
3
- declare const toInt: (object: any) => number;
4
- declare const toFloat: (object: any) => number;
5
- declare const toArray: (object: any) => any;
6
- /**
7
- * Convert value in object to array
8
- */
9
- declare const objectToArray: (object: any) => any[];
10
- /**
11
- * Iterate through every keys & values of the object
12
- */
13
- declare const iterate: (obj: {
14
- [key: string]: any;
15
- }, callbackFn: (obj: any, key?: string, value?: any) => any) => {
16
- [key: string]: any;
17
- };
18
- declare const xobject: {
19
- isNull: (object: any) => boolean;
20
- toBool: (object: any) => boolean;
21
- toInt: (object: any) => number;
22
- toFloat: (object: any) => number;
23
- toArray: (object: any) => any;
24
- objectToArray: (object: any) => any[];
25
- iterate: (obj: {
26
- [key: string]: any;
27
- }, callbackFn: (obj: any, key?: string, value?: any) => any) => {
28
- [key: string]: any;
29
- };
30
- };
31
-
32
- declare const object_isNull: typeof isNull;
33
- declare const object_iterate: typeof iterate;
34
- declare const object_objectToArray: typeof objectToArray;
35
- declare const object_toArray: typeof toArray;
36
- declare const object_toBool: typeof toBool;
37
- declare const object_toFloat: typeof toFloat;
38
- declare const object_toInt: typeof toInt;
39
- declare namespace object {
40
- export {
41
- xobject as default,
42
- object_isNull as isNull,
43
- object_iterate as iterate,
44
- object_objectToArray as objectToArray,
45
- object_toArray as toArray,
46
- object_toBool as toBool,
47
- object_toFloat as toFloat,
48
- object_toInt as toInt,
49
- };
50
- }
51
-
52
- export { toInt as a, toFloat as b, toArray as c, objectToArray as d, iterate as e, isNull as i, object as o, toBool as t, xobject as x };
@@ -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,43 +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
- declare const isLink: (str: string) => boolean;
4
- declare const getFileNameWithoutExtension: (url: string) => string;
5
- declare const getFileNameWithExtension: (url: string) => string;
6
- declare const getFileExtension: (url: string) => string | null | undefined;
7
- /**
8
- *
9
- * @param {string} url
10
- * @returns
11
- */
12
- declare const isImage: (url: string) => boolean;
13
- declare const xurl: {
14
- addQueryParam: (_url: string, key: string, value: any) => string;
15
- getUrlParams: (parameter: string, staticURL?: string, decode?: boolean) => string | false | undefined;
16
- isLink: (str: string) => boolean;
17
- getFileNameWithoutExtension: (url: string) => string;
18
- getFileNameWithExtension: (url: string) => string;
19
- getFileExtension: (url: string) => string | null | undefined;
20
- isImage: (url: string) => boolean;
21
- };
22
-
23
- declare const url_addQueryParam: typeof addQueryParam;
24
- declare const url_getFileExtension: typeof getFileExtension;
25
- declare const url_getFileNameWithExtension: typeof getFileNameWithExtension;
26
- declare const url_getFileNameWithoutExtension: typeof getFileNameWithoutExtension;
27
- declare const url_getUrlParams: typeof getUrlParams;
28
- declare const url_isImage: typeof isImage;
29
- declare const url_isLink: typeof isLink;
30
- declare namespace url {
31
- export {
32
- url_addQueryParam as addQueryParam,
33
- xurl as default,
34
- url_getFileExtension as getFileExtension,
35
- url_getFileNameWithExtension as getFileNameWithExtension,
36
- url_getFileNameWithoutExtension as getFileNameWithoutExtension,
37
- url_getUrlParams as getUrlParams,
38
- url_isImage as isImage,
39
- url_isLink as isLink,
40
- };
41
- }
42
-
43
- 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 };