diginext-utils 2.1.3 → 2.1.6
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.d.ts +1 -4
- package/dist/Validation.d.ts +3 -2
- package/dist/array.d.ts +1 -113
- package/dist/color.d.ts +9 -8
- package/dist/console/enableConsole.d.ts +1 -2
- package/dist/console/index.d.ts +2 -11
- package/dist/console/log.d.ts +9 -8
- 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/file/createDir.d.ts +1 -5
- package/dist/file/fileMove.d.ts +1 -4
- package/dist/file/findFilesByExt.d.ts +1 -13
- package/dist/file/index.d.ts +6 -4
- package/dist/gameboi/index.d.ts +6 -4
- 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-c52abc6d.d.ts → index-3eeb7834.d.ts} +1 -1
- 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.d.ts +1 -59
- 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/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/index.js +1 -0
- package/dist/string/index.js.map +1 -1
- package/dist/string/indexesOf.d.ts +3 -1
- package/dist/string/makeDaySlug.d.ts +4 -3
- package/dist/string/random.d.ts +10 -9
- package/dist/string/trimNull.d.ts +3 -2
- package/dist/string/url.d.ts +1 -27
- package/dist/string/url.js +5 -7
- package/dist/string/url.js.map +1 -1
- package/dist/{url-4f3cd108.d.ts → url-0da0be84.d.ts} +2 -7
- package/esm/string/index.d.ts +1 -1
- package/esm/string/index.js +1 -0
- package/esm/string/index.js.map +1 -1
- package/esm/string/url.d.ts +2 -7
- package/esm/string/url.js +5 -7
- package/esm/string/url.js.map +1 -1
- package/package.json +1 -1
- package/src/string/index.ts +1 -0
- package/src/string/url.ts +4 -8
package/dist/Checker.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 isJSON: (content: object | string) => boolean;
|
|
5
5
|
declare const Checker: {
|
|
6
6
|
isJSON: (content: object | string) => boolean;
|
|
7
|
-
};
|
|
8
|
-
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export { Checker as default, isJSON };
|
package/dist/FileUpload.d.ts
CHANGED
package/dist/Slug.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
declare const makeSlug: (s: string, opt?: {
|
|
2
2
|
[key: string]: any;
|
|
3
3
|
}) => string;
|
|
4
4
|
declare const slug: {
|
|
5
5
|
makeSlug: (s: string, opt?: {
|
|
6
6
|
[key: string]: any;
|
|
7
7
|
}) => string;
|
|
8
|
-
};
|
|
9
|
-
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export { slug as default, makeSlug };
|
package/dist/Timer.d.ts
CHANGED
package/dist/Validation.d.ts
CHANGED
package/dist/array.d.ts
CHANGED
|
@@ -1,113 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param {Array} array
|
|
5
|
-
* @param {string} key
|
|
6
|
-
* @returns {Number}
|
|
7
|
-
*/
|
|
8
|
-
export declare const averageArray: (array: [], key: string) => number;
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* @param {Array} array
|
|
12
|
-
* @param {string} key
|
|
13
|
-
* @returns {Number}
|
|
14
|
-
*/
|
|
15
|
-
export declare const minArray: (array: [], key: string) => number;
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @param {Array} array
|
|
19
|
-
* @param {string} key
|
|
20
|
-
* @returns {Number}
|
|
21
|
-
*/
|
|
22
|
-
export declare const maxArray: (array: [], key: string) => number;
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* @param {Array} array
|
|
26
|
-
* @param {string} key
|
|
27
|
-
* @returns {Array}
|
|
28
|
-
*/
|
|
29
|
-
export declare const sortElementByString: (array: any, key: string) => any[] | undefined;
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
* @param {Array} array
|
|
33
|
-
* @param {string} key
|
|
34
|
-
* @returns {Array}
|
|
35
|
-
*/
|
|
36
|
-
export declare const sortElementByNumber: (array: any, key: string) => any[] | undefined;
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
* @param {Array} array
|
|
40
|
-
* @returns {any}
|
|
41
|
-
*/
|
|
42
|
-
export declare const firstElement: (array: any[]) => any;
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @param {Array} array
|
|
46
|
-
* @returns {any}
|
|
47
|
-
*/
|
|
48
|
-
export declare const lastElement: (array: any[]) => any;
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* @param {Array} array
|
|
52
|
-
* @returns {any}
|
|
53
|
-
*/
|
|
54
|
-
export declare const randomIndex: (array: any[]) => number;
|
|
55
|
-
/**
|
|
56
|
-
*
|
|
57
|
-
* @param {Array} array
|
|
58
|
-
* @returns {any}
|
|
59
|
-
*/
|
|
60
|
-
export declare const randomElement: (array: any[]) => any;
|
|
61
|
-
/**
|
|
62
|
-
* Remove same elements from 2 arrays
|
|
63
|
-
*/
|
|
64
|
-
export declare const mergeAndMakeUniqueElement: (list1: any[], list2: any[], key: string) => any[] | undefined;
|
|
65
|
-
/**
|
|
66
|
-
* check target == toMatch
|
|
67
|
-
* @param {Array} target
|
|
68
|
-
* @param {Array} toMatch
|
|
69
|
-
* @returns {Boolean}
|
|
70
|
-
*/
|
|
71
|
-
export declare const allMatchInArray: (target: any[], toMatch: any[]) => boolean;
|
|
72
|
-
export declare const removeItem: (item: any, array: any[]) => any[];
|
|
73
|
-
export declare const removeItemByKey: (key: string, value: any, array: any[]) => any[];
|
|
74
|
-
export declare const getRandom: (array: any[], n: number) => any[];
|
|
75
|
-
/**
|
|
76
|
-
* Get an array with shuffle element
|
|
77
|
-
*/
|
|
78
|
-
export declare const getHalfRandom: (array: any[], n: number) => any[];
|
|
79
|
-
/**
|
|
80
|
-
* Make array shuffle itself
|
|
81
|
-
*/
|
|
82
|
-
export declare const shuffle: (array: any[]) => any[];
|
|
83
|
-
/**
|
|
84
|
-
*
|
|
85
|
-
* @param {Array} array
|
|
86
|
-
* @param {Number} oldIndex
|
|
87
|
-
* @param {Number} newIndex
|
|
88
|
-
* @returns {Array}
|
|
89
|
-
*/
|
|
90
|
-
export declare const moveIndex: (array: any[], oldIndex: number, newIndex: number) => any[];
|
|
91
|
-
export declare const moveArray: (array: any[], oldIndex: number, newIndex: number) => any[];
|
|
92
|
-
declare const xarray: {
|
|
93
|
-
sumArray: (array: [], key: string) => number;
|
|
94
|
-
averageArray: (array: [], key: string) => number;
|
|
95
|
-
minArray: (array: [], key: string) => number;
|
|
96
|
-
maxArray: (array: [], key: string) => number;
|
|
97
|
-
sortElementByString: (array: any, key: string) => any[] | undefined;
|
|
98
|
-
sortElementByNumber: (array: any, key: string) => any[] | undefined;
|
|
99
|
-
firstElement: (array: any[]) => any;
|
|
100
|
-
lastElement: (array: any[]) => any;
|
|
101
|
-
randomIndex: (array: any[]) => number;
|
|
102
|
-
randomElement: (array: any[]) => any;
|
|
103
|
-
mergeAndMakeUniqueElement: (list1: any[], list2: any[], key: string) => any[] | undefined;
|
|
104
|
-
allMatchInArray: (target: any[], toMatch: any[]) => boolean;
|
|
105
|
-
removeItem: (item: any, array: any[]) => any[];
|
|
106
|
-
removeItemByKey: (key: string, value: any, array: any[]) => any[];
|
|
107
|
-
getRandom: (array: any[], n: number) => any[];
|
|
108
|
-
getHalfRandom: (array: any[], n: number) => any[];
|
|
109
|
-
shuffle: (array: any[]) => any[];
|
|
110
|
-
moveIndex: (array: any[], oldIndex: number, newIndex: number) => any[];
|
|
111
|
-
moveArray: (array: any[], oldIndex: number, newIndex: number) => any[];
|
|
112
|
-
};
|
|
113
|
-
export default xarray;
|
|
1
|
+
export { i as allMatchInArray, b as averageArray, x as default, f as firstElement, o as getHalfRandom, n as getRandom, l as lastElement, c as maxArray, h as mergeAndMakeUniqueElement, m as minArray, t as moveArray, q as moveIndex, g as randomElement, r as randomIndex, j as removeItem, k as removeItemByKey, p as shuffle, e as sortElementByNumber, d as sortElementByString, s as sumArray } from './array-dc599632.js';
|
package/dist/color.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
declare const random: (hex?: boolean) => string;
|
|
2
|
+
declare const pSBC: (p: any, c0: any, c1?: any, l?: any) => string | null;
|
|
3
|
+
declare const hexToRgb: (hex: string) => {
|
|
4
4
|
r: number;
|
|
5
5
|
g: number;
|
|
6
6
|
b: number;
|
|
7
7
|
} | null;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
declare const hexDarken: (hex: string, amount: number) => string | null;
|
|
9
|
+
declare const hexLighten: (hex: string, amount: number) => string | null;
|
|
10
|
+
declare const RGBToHex: (rgb: string | any) => string | null;
|
|
11
11
|
declare const color: {
|
|
12
12
|
random: (hex?: boolean) => string;
|
|
13
13
|
pSBC: (p: any, c0: any, c1?: any, l?: any) => string | null;
|
|
@@ -19,5 +19,6 @@ declare const color: {
|
|
|
19
19
|
hexDarken: (hex: string, amount: number) => string | null;
|
|
20
20
|
hexLighten: (hex: string, amount: number) => string | null;
|
|
21
21
|
RGBToHex: (rgb: string | any) => string | null;
|
|
22
|
-
};
|
|
23
|
-
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { RGBToHex, color as default, hexDarken, hexLighten, hexToRgb, pSBC, random };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export default enableConsole;
|
|
1
|
+
export { a as default, a as enableConsole } from '../enableConsole-ddc24282.js';
|
package/dist/console/index.d.ts
CHANGED
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export declare const showCredit: () => void;
|
|
4
|
-
import { enableConsole } from "./enableConsole";
|
|
5
|
-
declare const xconsole: {
|
|
6
|
-
enableConsole: typeof enableConsole;
|
|
7
|
-
disableConsole: () => void;
|
|
8
|
-
removeConsole: () => void;
|
|
9
|
-
showCredit: () => void;
|
|
10
|
-
};
|
|
11
|
-
export default xconsole;
|
|
1
|
+
import '../enableConsole-ddc24282.js';
|
|
2
|
+
export { x as default, d as disableConsole, r as removeConsole, s as showCredit } from '../index-1e114d55.js';
|
package/dist/console/log.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
declare const log: (...msg: any) => any;
|
|
2
|
+
declare const logFull: (data?: {}) => {};
|
|
3
|
+
declare const logRes: (res: any, ...msg: any[]) => any[];
|
|
4
|
+
declare const logError: (...msg: any[]) => any[];
|
|
5
|
+
declare const logWarn: (...msg: any[]) => any[];
|
|
6
|
+
declare const logSuccess: (...msg: any[]) => any[];
|
|
7
7
|
declare const xlog: {
|
|
8
8
|
log: (...msg: any) => any;
|
|
9
9
|
logFull: (data?: {}) => {};
|
|
@@ -11,5 +11,6 @@ declare const xlog: {
|
|
|
11
11
|
logError: (...msg: any[]) => any[];
|
|
12
12
|
logWarn: (...msg: any[]) => any[];
|
|
13
13
|
logSuccess: (...msg: any[]) => any[];
|
|
14
|
-
};
|
|
15
|
-
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { xlog as default, log, logError, logFull, logRes, logSuccess, logWarn };
|
package/dist/device/browser.d.ts
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare const isLandscape: () => boolean;
|
|
3
|
-
export declare const ua: () => any;
|
|
4
|
-
export declare const isFacebookWebview: () => boolean | undefined;
|
|
5
|
-
export declare const isInAppWebview: () => boolean;
|
|
1
|
+
export { c as isFacebookWebview, d as isInAppWebview, a as isLandscape, i as isPotrait, u as ua } from '../browser-8d042ffe.js';
|
package/dist/device/camera.d.ts
CHANGED
package/dist/device/index.d.ts
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare const isAndroid: () => boolean | null;
|
|
3
|
-
export declare const isTablet: () => boolean | null;
|
|
4
|
-
export declare const isMobile: () => boolean | null;
|
|
5
|
-
export declare const checkOS: () => any;
|
|
1
|
+
export { e as checkOS, a as isAndroid, i as isIos, c as isMobile, b as isTablet } from '../index-1f738e52.js';
|
package/dist/device/os.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
declare function getOS(): "aix" | "android" | "freebsd" | "haiku" | "linux" | "openbsd" | "sunos" | "cygwin" | "netbsd" | "mac" | "win";
|
|
2
|
+
declare function isWin(): boolean;
|
|
3
|
+
declare function isMac(): boolean;
|
|
4
|
+
declare function isLinux(): boolean;
|
|
5
5
|
declare const _default: {
|
|
6
6
|
getOS: typeof getOS;
|
|
7
7
|
isWin: typeof isWin;
|
|
8
8
|
isMac: typeof isMac;
|
|
9
9
|
isLinux: typeof isLinux;
|
|
10
|
-
};
|
|
11
|
-
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { _default as default, getOS, isLinux, isMac, isWin };
|
package/dist/file/createDir.d.ts
CHANGED
package/dist/file/fileMove.d.ts
CHANGED
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* This is an alias of "findFileByExt()"
|
|
3
|
-
*/
|
|
4
|
-
export declare const forEachFileByExt: (base: string, ext: string, cb: (path: string) => {}) => void;
|
|
5
|
-
/**
|
|
6
|
-
* This is an alias of "forEachFileByExt()"
|
|
7
|
-
*/
|
|
8
|
-
export 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
|
-
export default fileExt;
|
|
1
|
+
export { a as default, c as findFileByExt, b as forEachFileByExt } from '../findFilesByExt-753e91d7.js';
|
package/dist/file/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { createDir } from
|
|
2
|
-
import { fileMove } from
|
|
1
|
+
import { a as createDir } from '../createDir-220e0081.js';
|
|
2
|
+
import { a as fileMove } from '../fileMove-3a09e429.js';
|
|
3
|
+
|
|
3
4
|
declare const xfile: {
|
|
4
5
|
findFileByExt: (base: string, ext: string, cb: (path: string) => {}) => void;
|
|
5
6
|
forEachFileByExt: (base: string, ext: string, cb: (path: string) => {}) => void;
|
|
6
7
|
createDir: typeof createDir;
|
|
7
8
|
fileMove: typeof fileMove;
|
|
8
|
-
};
|
|
9
|
-
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export { xfile as default };
|
package/dist/gameboi/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import EventEmitter from 'events';
|
|
2
|
+
|
|
3
|
+
declare class GameBoi extends EventEmitter {
|
|
4
4
|
#private;
|
|
5
5
|
constructor();
|
|
6
6
|
onConnect(e: GamepadEvent): void;
|
|
7
7
|
onDisconnect(): void;
|
|
8
8
|
gameLoop(): void;
|
|
9
9
|
dispose(): void;
|
|
10
|
-
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { GameBoi as default };
|
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 };
|
|
@@ -61,7 +61,7 @@ declare const xstring: {
|
|
|
61
61
|
isLink: (str: string) => boolean;
|
|
62
62
|
getFileNameWithoutExtension: (url: string) => string;
|
|
63
63
|
getFileNameWithExtension: (url: string) => string;
|
|
64
|
-
getFileExtension: (url: string) => string | undefined;
|
|
64
|
+
getFileExtension: (url: string) => string | null | undefined;
|
|
65
65
|
isImage: (url: string) => boolean;
|
|
66
66
|
};
|
|
67
67
|
|
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-dc599632.js';
|
|
2
|
+
import { d as device } from './index-1f738e52.js';
|
|
3
|
+
import { c as console } from './index-1e114d55.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-43aaaf92.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 };
|
package/dist/object.d.ts
CHANGED
|
@@ -1,59 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
[key: string]: any;
|
|
3
|
-
}) => boolean;
|
|
4
|
-
export declare const toBool: (object: string | {
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
} | null) => boolean;
|
|
7
|
-
export declare const toInt: (object: string | number | {
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
} | null) => number;
|
|
10
|
-
export declare const toFloat: (object: string | {
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
} | null) => number;
|
|
13
|
-
export declare const toArray: (obj: {
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
}) => {
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Convert value in object to array
|
|
20
|
-
*/
|
|
21
|
-
export declare const objectToArray: (obj: {
|
|
22
|
-
[key: string]: any;
|
|
23
|
-
}) => any[];
|
|
24
|
-
/**
|
|
25
|
-
* Iterate through every keys & values of the object
|
|
26
|
-
*/
|
|
27
|
-
export declare const iterate: (obj: {
|
|
28
|
-
[key: string]: any;
|
|
29
|
-
}, callbackFn: (obj: any, key?: string, value?: any) => any) => {
|
|
30
|
-
[key: string]: any;
|
|
31
|
-
};
|
|
32
|
-
declare const xobject: {
|
|
33
|
-
isNull: (object: string | number | {
|
|
34
|
-
[key: string]: any;
|
|
35
|
-
}) => boolean;
|
|
36
|
-
toBool: (object: string | {
|
|
37
|
-
[key: string]: any;
|
|
38
|
-
} | null) => boolean;
|
|
39
|
-
toInt: (object: string | number | {
|
|
40
|
-
[key: string]: any;
|
|
41
|
-
} | null) => number;
|
|
42
|
-
toFloat: (object: string | {
|
|
43
|
-
[key: string]: any;
|
|
44
|
-
} | null) => number;
|
|
45
|
-
toArray: (obj: {
|
|
46
|
-
[key: string]: any;
|
|
47
|
-
}) => {
|
|
48
|
-
[key: string]: any;
|
|
49
|
-
};
|
|
50
|
-
objectToArray: (obj: {
|
|
51
|
-
[key: string]: any;
|
|
52
|
-
}) => any[];
|
|
53
|
-
iterate: (obj: {
|
|
54
|
-
[key: string]: any;
|
|
55
|
-
}, callbackFn: (obj: any, key?: string, value?: any) => any) => {
|
|
56
|
-
[key: string]: any;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
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-43aaaf92.js';
|