diginext-utils 3.0.4 → 3.0.5
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/dist/Checker.d.ts +4 -3
- package/dist/EventDispatcher.d.ts +3 -3
- package/dist/FileUpload.d.ts +3 -3
- package/dist/Slug.d.ts +4 -3
- package/dist/Timer-7b0c4e7c.d.ts +11 -0
- package/dist/Timer.d.ts +1 -4
- package/dist/Validation.d.ts +3 -2
- package/dist/array-c38eff4c.d.ts +158 -0
- package/dist/array.d.ts +1 -113
- package/dist/browser-8d042ffe.d.ts +22 -0
- package/dist/camera-1a859d72.d.ts +15 -0
- package/dist/color.d.ts +10 -9
- package/dist/createDir-220e0081.d.ts +13 -0
- package/dist/device/browser.d.ts +1 -5
- package/dist/device/camera.d.ts +1 -7
- package/dist/device/index.d.ts +1 -5
- package/dist/device/os.d.ts +7 -6
- package/dist/enableConsole-ddc24282.d.ts +11 -0
- package/dist/file/createDir.d.ts +1 -5
- package/dist/file/detectPrivateKey.d.ts +4 -3
- package/dist/file/detectPrivateKeyByFilePath.d.ts +3 -2
- package/dist/file/detectPrivateKeyByFilePath.js +2 -2
- package/dist/file/detectPrivateKeyByFilePath.js.map +1 -1
- package/dist/file/fileMove.d.ts +1 -4
- package/dist/file/findFilesByExt.d.ts +1 -13
- package/dist/file/getAllFiles.d.ts +3 -1
- package/dist/file/index.d.ts +6 -4
- package/dist/fileMove-3a09e429.d.ts +13 -0
- package/dist/findFilesByExt-753e91d7.d.ts +24 -0
- package/dist/gameboi/index.d.ts +6 -4
- package/dist/html/transform3dToObject.d.ts +4 -2
- package/dist/images/downloadByUrl.d.ts +3 -1
- package/dist/images/index.d.ts +2 -2
- package/dist/images/loadImage.d.ts +3 -1
- package/dist/images/resize.d.ts +3 -2
- package/dist/images/upload.d.ts +4 -3
- package/dist/index-11ec3903.d.ts +26 -0
- package/dist/index-1f738e52.d.ts +22 -0
- package/dist/index-22309f0c.d.ts +23 -0
- package/dist/index-3eeb7834.d.ts +90 -0
- package/dist/index-6ae3c86b.d.ts +63 -0
- package/dist/index.d.ts +30 -19
- package/dist/json.d.ts +4 -3
- package/dist/math/diffDate.d.ts +3 -2
- package/dist/math/index.d.ts +3 -30
- package/dist/math/positiveNumber.d.ts +3 -2
- package/dist/name/en.d.ts +4 -3
- package/dist/name/index.d.ts +3 -12
- package/dist/name/vi.d.ts +4 -3
- package/dist/object-210cae96.d.ts +52 -0
- package/dist/object.d.ts +1 -31
- package/dist/permission/index.d.ts +3 -2
- package/dist/permission/requestCamera.d.ts +1 -5
- package/dist/permission/requestDeviceOrientationControl.d.ts +1 -2
- package/dist/requestCamera-32b7dfc7.d.ts +14 -0
- package/dist/requestDeviceOrientationControl-b6458660.d.ts +11 -0
- package/dist/response/index.d.ts +7 -6
- package/dist/string/convertPathnameAndQuery.d.ts +4 -2
- package/dist/string/formatNumber.d.ts +3 -2
- package/dist/string/generatePassword.d.ts +3 -2
- package/dist/string/generateUUID.d.ts +3 -2
- package/dist/string/getTextBetweenCharByIndex.d.ts +3 -1
- package/dist/string/index.d.ts +6 -65
- package/dist/string/indexesOf.d.ts +3 -1
- package/dist/string/makeDaySlug.d.ts +4 -3
- package/dist/string/random.d.ts +11 -10
- package/dist/string/trimNull.d.ts +3 -2
- package/dist/string/url.d.ts +1 -22
- package/dist/url-0da0be84.d.ts +43 -0
- package/dist/xconsole/enableConsole.d.ts +1 -2
- package/dist/xconsole/index.d.ts +2 -11
- package/dist/xconsole/log.d.ts +9 -8
- package/esm/file/detectPrivateKeyByFilePath.js +2 -2
- package/esm/file/detectPrivateKeyByFilePath.js.map +1 -1
- package/package.json +1 -1
package/dist/images/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { upload } from
|
|
2
|
-
export { resize } from
|
|
1
|
+
export { default as upload } from './upload.js';
|
|
2
|
+
export { default as resize } from './resize.js';
|
package/dist/images/resize.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const resize: (file: File) => Promise<{} | undefined>;
|
|
2
|
+
|
|
3
|
+
export { resize as default, resize };
|
package/dist/images/upload.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
declare const upload: (file: File) => Promise<{
|
|
2
2
|
status: number;
|
|
3
3
|
error: boolean;
|
|
4
4
|
messages: any[];
|
|
@@ -6,5 +6,6 @@ export declare const upload: (file: File) => Promise<{
|
|
|
6
6
|
} | {
|
|
7
7
|
blob: any;
|
|
8
8
|
url: string;
|
|
9
|
-
}>;
|
|
10
|
-
|
|
9
|
+
}>;
|
|
10
|
+
|
|
11
|
+
export { upload as default, upload };
|
|
@@ -0,0 +1,26 @@
|
|
|
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 };
|
|
@@ -0,0 +1,22 @@
|
|
|
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 };
|
|
@@ -0,0 +1,23 @@
|
|
|
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 };
|
|
@@ -0,0 +1,90 @@
|
|
|
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 };
|
|
@@ -0,0 +1,63 @@
|
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
1
|
+
import { a as array } from './array-c38eff4c.js';
|
|
2
|
+
import { d as device } from './index-1f738e52.js';
|
|
3
|
+
import { c as console } from './index-11ec3903.js';
|
|
4
|
+
import { b as browser } from './browser-8d042ffe.js';
|
|
5
|
+
import { c as camera } from './camera-1a859d72.js';
|
|
6
|
+
import { m as math } from './index-6ae3c86b.js';
|
|
7
|
+
import { x as xname } from './index-22309f0c.js';
|
|
8
|
+
import { o as object } from './object-210cae96.js';
|
|
9
|
+
import { s as string } from './index-3eeb7834.js';
|
|
10
|
+
import { u as url } from './url-0da0be84.js';
|
|
11
|
+
import { c as createDir } from './createDir-220e0081.js';
|
|
12
|
+
import { f as fileMove } from './fileMove-3a09e429.js';
|
|
13
|
+
import { f as findFilesByExt } from './findFilesByExt-753e91d7.js';
|
|
14
|
+
import { T as Timer } from './Timer-7b0c4e7c.js';
|
|
15
|
+
import { r as requestCamera } from './requestCamera-32b7dfc7.js';
|
|
16
|
+
import { r as requestDeviceOrientationControl } from './requestDeviceOrientationControl-b6458660.js';
|
|
17
|
+
import { e as enableConsole } from './enableConsole-ddc24282.js';
|
|
18
|
+
import './math/diffDate.js';
|
|
19
|
+
import './math/positiveNumber.js';
|
|
20
|
+
import './name/en.js';
|
|
21
|
+
import './name/vi.js';
|
|
22
|
+
import './string/makeDaySlug.js';
|
|
23
|
+
import './string/generateUUID.js';
|
|
24
|
+
import './string/formatNumber.js';
|
|
25
|
+
import './string/generatePassword.js';
|
|
26
|
+
import './string/trimNull.js';
|
|
27
|
+
|
|
18
28
|
declare const utils: {
|
|
19
29
|
xname: typeof xname;
|
|
20
30
|
array: typeof array;
|
|
@@ -33,5 +43,6 @@ declare const utils: {
|
|
|
33
43
|
requestCamera: typeof requestCamera;
|
|
34
44
|
requestDeviceOrientationControl: typeof requestDeviceOrientationControl;
|
|
35
45
|
enableConsole: typeof enableConsole;
|
|
36
|
-
};
|
|
37
|
-
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { utils as default };
|
package/dist/json.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Check if the object or string is in JSON format
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
declare const isValid: (content: object | string) => boolean;
|
|
5
5
|
declare const xjson: {
|
|
6
6
|
isValid: (content: object | string) => boolean;
|
|
7
|
-
};
|
|
8
|
-
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export { xjson as default, isValid };
|
package/dist/math/diffDate.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns amount of different days between 2 dates
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
declare function diffDate(date1: string, date2: string): number;
|
|
5
|
+
|
|
6
|
+
export { diffDate as default, diffDate };
|
package/dist/math/index.d.ts
CHANGED
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export declare const randInt: (low: number, high: number) => number;
|
|
5
|
-
export declare const randFloat: (low: number, high: number) => number;
|
|
6
|
-
export declare const degToRad: (degrees: number) => number;
|
|
7
|
-
export declare const radToDeg: (radians: number) => number;
|
|
8
|
-
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
9
|
-
export declare const degBetweenPoints360: (cx: number, cy: number, ex: number, ey: number) => number;
|
|
10
|
-
export declare const degBetweenPoints: (cx: number, cy: number, ex: number, ey: number) => number;
|
|
11
|
-
export declare const angleBetweenPoints: (cx: number, cy: number, ex: number, ey: number) => number;
|
|
12
|
-
export declare const distance2Point: (x1: number, y1: number, x2: number, y2: number) => number;
|
|
13
|
-
import { diffDate } from "./diffDate";
|
|
14
|
-
import { positiveNumber } from "./positiveNumber";
|
|
15
|
-
declare const xmath: {
|
|
16
|
-
rand: (number: number) => number;
|
|
17
|
-
randRound: (number: number) => number;
|
|
18
|
-
randHalt: (number: number) => number;
|
|
19
|
-
randInt: (low: number, high: number) => number;
|
|
20
|
-
randFloat: (low: number, high: number) => number;
|
|
21
|
-
degToRad: (degrees: number) => number;
|
|
22
|
-
radToDeg: (radians: number) => number;
|
|
23
|
-
degBetweenPoints360: (cx: number, cy: number, ex: number, ey: number) => number;
|
|
24
|
-
degBetweenPoints: (cx: number, cy: number, ex: number, ey: number) => number;
|
|
25
|
-
angleBetweenPoints: (cx: number, cy: number, ex: number, ey: number) => number;
|
|
26
|
-
distance2Point: (x1: number, y1: number, x2: number, y2: number) => number;
|
|
27
|
-
diffDate: typeof diffDate;
|
|
28
|
-
positiveNumber: typeof positiveNumber;
|
|
29
|
-
};
|
|
30
|
-
export default xmath;
|
|
1
|
+
import './diffDate.js';
|
|
2
|
+
import './positiveNumber.js';
|
|
3
|
+
export { j as angleBetweenPoints, g as clamp, x as default, i as degBetweenPoints, h as degBetweenPoints360, e as degToRad, k as distance2Point, f as radToDeg, a as rand, d as randFloat, b as randHalt, c as randInt, r as randRound } from '../index-6ae3c86b.js';
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare function positiveNumber(number: number): number;
|
|
2
|
+
|
|
3
|
+
export { positiveNumber as default, positiveNumber };
|
package/dist/name/en.d.ts
CHANGED
package/dist/name/index.d.ts
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
declare const xname: {
|
|
5
|
-
NameEN: {
|
|
6
|
-
generateName: typeof import("./en").generateName;
|
|
7
|
-
};
|
|
8
|
-
NameVI: {
|
|
9
|
-
generateName: (useGender?: boolean, male?: boolean) => any;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export default xname;
|
|
1
|
+
export { default as NameEN } from './en.js';
|
|
2
|
+
export { default as NameVI } from './vi.js';
|
|
3
|
+
export { a as default } from '../index-22309f0c.js';
|
package/dist/name/vi.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
declare const generateName: (useGender?: boolean, male?: boolean) => any;
|
|
2
2
|
declare const NameVI: {
|
|
3
3
|
generateName: (useGender?: boolean, male?: boolean) => any;
|
|
4
|
-
};
|
|
5
|
-
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
export { NameVI as default, generateName };
|
|
@@ -0,0 +1,52 @@
|
|
|
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 };
|
package/dist/object.d.ts
CHANGED
|
@@ -1,31 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare const toBool: (object: any) => boolean;
|
|
3
|
-
export declare const toInt: (object: any) => number;
|
|
4
|
-
export declare const toFloat: (object: any) => number;
|
|
5
|
-
export declare const toArray: (object: any) => any;
|
|
6
|
-
/**
|
|
7
|
-
* Convert value in object to array
|
|
8
|
-
*/
|
|
9
|
-
export declare const objectToArray: (object: any) => any[];
|
|
10
|
-
/**
|
|
11
|
-
* Iterate through every keys & values of the object
|
|
12
|
-
*/
|
|
13
|
-
export 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
|
-
export default xobject;
|
|
1
|
+
export { x as default, i as isNull, e as iterate, d as objectToArray, c as toArray, t as toBool, b as toFloat, a as toInt } from './object-210cae96.js';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export default requestDeviceOrientationControl;
|
|
1
|
+
export { a as default, a as requestDeviceOrientationControl } from '../requestDeviceOrientationControl-b6458660.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
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 };
|
|
@@ -0,0 +1,11 @@
|
|
|
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 };
|
package/dist/response/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
declare const getResponse: () => {
|
|
2
2
|
status: number;
|
|
3
3
|
messages: never[];
|
|
4
4
|
data: null;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
declare const getSuccessResponse: (data: any, message?: string) => {
|
|
7
7
|
status: number;
|
|
8
8
|
messages: string[];
|
|
9
9
|
data: any;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
declare const getFailedResponse: (...messages: any[]) => {
|
|
12
12
|
status: number;
|
|
13
13
|
error: boolean;
|
|
14
14
|
messages: any[];
|
|
15
15
|
data: null;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
declare const Response: {
|
|
18
18
|
send: (res: any, data?: any) => any;
|
|
19
19
|
succeed: (res: any, data?: any) => any;
|
|
20
20
|
failed: (res: any, ...messages: string[]) => any;
|
|
@@ -45,5 +45,6 @@ declare const response: {
|
|
|
45
45
|
rejected: (res: any, message?: string) => any;
|
|
46
46
|
ignore: (res: any, message?: string) => any;
|
|
47
47
|
};
|
|
48
|
-
};
|
|
49
|
-
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export { Response, response as default, getFailedResponse, getResponse, getSuccessResponse };
|
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
* Format the input number with commas
|
|
3
3
|
* @example 1000000 -> 1,000,000
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
declare function formatNumber(num: number, prefix?: string): string;
|
|
6
|
+
|
|
7
|
+
export { formatNumber as default, formatNumber };
|
|
@@ -5,5 +5,6 @@
|
|
|
5
5
|
* @param {Boolean} hard
|
|
6
6
|
* @returns
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
declare function generatePassword(length?: number, hard?: boolean): string;
|
|
9
|
+
|
|
10
|
+
export { generatePassword as default, generatePassword };
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare function generateUUID(): string;
|
|
2
|
+
|
|
3
|
+
export { generateUUID as default, generateUUID };
|