diginext-utils 2.1.2 → 2.1.3
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 +3 -4
- package/dist/EventDispatcher.d.ts +3 -3
- package/dist/FileUpload.d.ts +3 -3
- package/dist/Slug.d.ts +3 -4
- package/dist/Timer.d.ts +4 -1
- package/dist/Validation.d.ts +2 -3
- package/dist/array.d.ts +113 -1
- package/dist/color.d.ts +8 -9
- package/dist/console/enableConsole.d.ts +2 -1
- package/dist/console/index.d.ts +11 -2
- package/dist/console/log.d.ts +8 -9
- package/dist/device/browser.d.ts +5 -1
- package/dist/device/camera.d.ts +7 -1
- package/dist/device/index.d.ts +5 -1
- package/dist/device/os.d.ts +6 -7
- package/dist/file/createDir.d.ts +5 -1
- package/dist/file/fileMove.d.ts +4 -1
- package/dist/file/findFilesByExt.d.ts +13 -1
- package/dist/file/index.d.ts +4 -6
- package/dist/gameboi/index.d.ts +4 -6
- package/dist/images/index.d.ts +2 -2
- package/dist/images/loadImage.d.ts +1 -3
- package/dist/images/resize.d.ts +2 -3
- package/dist/images/upload.d.ts +3 -4
- package/dist/index.d.ts +19 -30
- package/dist/json.d.ts +3 -4
- package/dist/math/diffDate.d.ts +2 -3
- package/dist/math/index.d.ts +30 -3
- package/dist/math/positiveNumber.d.ts +2 -3
- package/dist/name/en.d.ts +3 -4
- package/dist/name/index.d.ts +12 -3
- package/dist/name/vi.d.ts +3 -4
- package/dist/object.d.ts +59 -1
- package/dist/permission/index.d.ts +2 -3
- package/dist/permission/requestCamera.d.ts +5 -1
- package/dist/permission/requestDeviceOrientationControl.d.ts +2 -1
- package/dist/response/index.d.ts +6 -7
- package/dist/string/convertPathnameAndQuery.d.ts +2 -4
- package/dist/string/convertPathnameAndQuery.js +4 -0
- package/dist/string/convertPathnameAndQuery.js.map +1 -1
- package/dist/string/formatNumber.d.ts +2 -3
- package/dist/string/generatePassword.d.ts +2 -3
- package/dist/string/generateUUID.d.ts +2 -3
- package/dist/string/getTextBetweenCharByIndex.d.ts +1 -3
- package/dist/string/index.d.ts +65 -6
- package/dist/string/indexesOf.d.ts +1 -3
- package/dist/string/makeDaySlug.d.ts +3 -4
- package/dist/string/random.d.ts +9 -10
- package/dist/string/trimNull.d.ts +2 -3
- package/dist/string/url.d.ts +27 -1
- package/esm/string/convertPathnameAndQuery.d.ts +1 -1
- package/esm/string/convertPathnameAndQuery.js +4 -0
- package/esm/string/convertPathnameAndQuery.js.map +1 -1
- package/package.json +1 -1
- package/src/string/convertPathnameAndQuery.ts +3 -0
package/dist/Checker.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Check if the object or string is in JSON format
|
|
3
3
|
*/
|
|
4
|
-
declare const isJSON: (content: object | string) => boolean;
|
|
4
|
+
export declare const isJSON: (content: object | string) => boolean;
|
|
5
5
|
declare const Checker: {
|
|
6
6
|
isJSON: (content: object | string) => boolean;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export { Checker as default, isJSON };
|
|
7
|
+
};
|
|
8
|
+
export default Checker;
|
package/dist/FileUpload.d.ts
CHANGED
package/dist/Slug.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
declare const makeSlug: (s: string, opt?: {
|
|
1
|
+
export 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
|
-
|
|
10
|
-
export { slug as default, makeSlug };
|
|
8
|
+
};
|
|
9
|
+
export default slug;
|
package/dist/Timer.d.ts
CHANGED
package/dist/Validation.d.ts
CHANGED
package/dist/array.d.ts
CHANGED
|
@@ -1 +1,113 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const sumArray: (array: [], key: string) => number;
|
|
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;
|
package/dist/color.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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) => {
|
|
1
|
+
export declare const random: (hex?: boolean) => string;
|
|
2
|
+
export declare const pSBC: (p: any, c0: any, c1?: any, l?: any) => string | null;
|
|
3
|
+
export declare const hexToRgb: (hex: string) => {
|
|
4
4
|
r: number;
|
|
5
5
|
g: number;
|
|
6
6
|
b: number;
|
|
7
7
|
} | null;
|
|
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;
|
|
8
|
+
export declare const hexDarken: (hex: string, amount: number) => string | null;
|
|
9
|
+
export declare const hexLighten: (hex: string, amount: number) => string | null;
|
|
10
|
+
export 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,6 +19,5 @@ 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
|
-
|
|
24
|
-
export { RGBToHex, color as default, hexDarken, hexLighten, hexToRgb, pSBC, random };
|
|
22
|
+
};
|
|
23
|
+
export default color;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function enableConsole(): Console;
|
|
2
|
+
export default enableConsole;
|
package/dist/console/index.d.ts
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
export declare const disableConsole: () => void;
|
|
2
|
+
export declare const removeConsole: () => void;
|
|
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;
|
package/dist/console/log.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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[];
|
|
1
|
+
export declare const log: (...msg: any) => any;
|
|
2
|
+
export declare const logFull: (data?: {}) => {};
|
|
3
|
+
export declare const logRes: (res: any, ...msg: any[]) => any[];
|
|
4
|
+
export declare const logError: (...msg: any[]) => any[];
|
|
5
|
+
export declare const logWarn: (...msg: any[]) => any[];
|
|
6
|
+
export declare const logSuccess: (...msg: any[]) => any[];
|
|
7
7
|
declare const xlog: {
|
|
8
8
|
log: (...msg: any) => any;
|
|
9
9
|
logFull: (data?: {}) => {};
|
|
@@ -11,6 +11,5 @@ declare const xlog: {
|
|
|
11
11
|
logError: (...msg: any[]) => any[];
|
|
12
12
|
logWarn: (...msg: any[]) => any[];
|
|
13
13
|
logSuccess: (...msg: any[]) => any[];
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export { xlog as default, log, logError, logFull, logRes, logSuccess, logWarn };
|
|
14
|
+
};
|
|
15
|
+
export default xlog;
|
package/dist/device/browser.d.ts
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const isPotrait: () => boolean;
|
|
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;
|
package/dist/device/camera.d.ts
CHANGED
package/dist/device/index.d.ts
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const isIos: () => boolean | null;
|
|
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;
|
package/dist/device/os.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
declare function getOS(): "
|
|
2
|
-
declare function isWin(): boolean;
|
|
3
|
-
declare function isMac(): boolean;
|
|
4
|
-
declare function isLinux(): boolean;
|
|
1
|
+
export declare function getOS(): "android" | "win" | "aix" | "freebsd" | "haiku" | "linux" | "openbsd" | "sunos" | "cygwin" | "netbsd" | "mac";
|
|
2
|
+
export declare function isWin(): boolean;
|
|
3
|
+
export declare function isMac(): boolean;
|
|
4
|
+
export 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
|
-
|
|
12
|
-
export { _default as default, getOS, isLinux, isMac, isWin };
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
package/dist/file/createDir.d.ts
CHANGED
package/dist/file/fileMove.d.ts
CHANGED
|
@@ -1 +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;
|
package/dist/file/index.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { createDir } from "./createDir";
|
|
2
|
+
import { fileMove } from "./fileMove";
|
|
4
3
|
declare const xfile: {
|
|
5
4
|
findFileByExt: (base: string, ext: string, cb: (path: string) => {}) => void;
|
|
6
5
|
forEachFileByExt: (base: string, ext: string, cb: (path: string) => {}) => void;
|
|
7
6
|
createDir: typeof createDir;
|
|
8
7
|
fileMove: typeof fileMove;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export { xfile as default };
|
|
8
|
+
};
|
|
9
|
+
export default xfile;
|
package/dist/gameboi/index.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import EventEmitter from "events";
|
|
3
|
+
export default 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
|
-
}
|
|
11
|
-
|
|
12
|
-
export { GameBoi as default };
|
|
10
|
+
}
|
package/dist/images/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { upload } from "./upload";
|
|
2
|
+
export { resize } from "./resize";
|
package/dist/images/resize.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
declare const resize: (file: File) => Promise<{} | undefined>;
|
|
2
|
-
|
|
3
|
-
export { resize as default, resize };
|
|
1
|
+
export declare const resize: (file: File) => Promise<{} | undefined>;
|
|
2
|
+
export default resize;
|
package/dist/images/upload.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const upload: (file: File) => Promise<{
|
|
1
|
+
export declare const upload: (file: File) => Promise<{
|
|
2
2
|
status: number;
|
|
3
3
|
error: boolean;
|
|
4
4
|
messages: any[];
|
|
@@ -6,6 +6,5 @@ declare const upload: (file: File) => Promise<{
|
|
|
6
6
|
} | {
|
|
7
7
|
blob: any;
|
|
8
8
|
url: string;
|
|
9
|
-
}>;
|
|
10
|
-
|
|
11
|
-
export { upload as default, upload };
|
|
9
|
+
}>;
|
|
10
|
+
export default upload;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,30 +1,20 @@
|
|
|
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
|
|
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
|
-
|
|
1
|
+
import * as array from "./array";
|
|
2
|
+
import * as device from "./device";
|
|
3
|
+
import * as console from "./console";
|
|
4
|
+
import * as browser from "./device/browser";
|
|
5
|
+
import * as camera from "./device/camera";
|
|
6
|
+
import * as math from "./math";
|
|
7
|
+
import * as xname from "./name";
|
|
8
|
+
import * as object from "./object";
|
|
9
|
+
import * as string from "./string";
|
|
10
|
+
import * as url from "./string/url";
|
|
11
|
+
import * as createDir from "./file/createDir";
|
|
12
|
+
import * as fileMove from "./file/fileMove";
|
|
13
|
+
import * as findFilesByExt from "./file/findFilesByExt";
|
|
14
|
+
import * as Timer from "./Timer";
|
|
15
|
+
import * as requestCamera from "./permission/requestCamera";
|
|
16
|
+
import * as requestDeviceOrientationControl from "./permission/requestDeviceOrientationControl";
|
|
17
|
+
import * as enableConsole from "./console/enableConsole";
|
|
28
18
|
declare const utils: {
|
|
29
19
|
xname: typeof xname;
|
|
30
20
|
array: typeof array;
|
|
@@ -43,6 +33,5 @@ declare const utils: {
|
|
|
43
33
|
requestCamera: typeof requestCamera;
|
|
44
34
|
requestDeviceOrientationControl: typeof requestDeviceOrientationControl;
|
|
45
35
|
enableConsole: typeof enableConsole;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export { utils as default };
|
|
36
|
+
};
|
|
37
|
+
export default utils;
|
package/dist/json.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Check if the object or string is in JSON format
|
|
3
3
|
*/
|
|
4
|
-
declare const isValid: (content: object | string) => boolean;
|
|
4
|
+
export declare const isValid: (content: object | string) => boolean;
|
|
5
5
|
declare const xjson: {
|
|
6
6
|
isValid: (content: object | string) => boolean;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export { xjson as default, isValid };
|
|
7
|
+
};
|
|
8
|
+
export default xjson;
|
package/dist/math/diffDate.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns amount of different days between 2 dates
|
|
3
3
|
*/
|
|
4
|
-
declare function diffDate(date1: string, date2: string): number;
|
|
5
|
-
|
|
6
|
-
export { diffDate as default, diffDate };
|
|
4
|
+
export declare function diffDate(date1: string, date2: string): number;
|
|
5
|
+
export default diffDate;
|
package/dist/math/index.d.ts
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
1
|
+
export declare const randRound: (number: number) => number;
|
|
2
|
+
export declare const rand: (number: number) => number;
|
|
3
|
+
export declare const randHalt: (number: number) => number;
|
|
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,3 +1,2 @@
|
|
|
1
|
-
declare function positiveNumber(number: number): number;
|
|
2
|
-
|
|
3
|
-
export { positiveNumber as default, positiveNumber };
|
|
1
|
+
export declare function positiveNumber(number: number): number;
|
|
2
|
+
export default positiveNumber;
|
package/dist/name/en.d.ts
CHANGED
package/dist/name/index.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export {
|
|
1
|
+
import NameEN from "./en";
|
|
2
|
+
import NameVI from "./vi";
|
|
3
|
+
export { NameEN, NameVI };
|
|
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;
|
package/dist/name/vi.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
declare const generateName: (useGender?: boolean, male?: boolean) => any;
|
|
1
|
+
export declare const generateName: (useGender?: boolean, male?: boolean) => any;
|
|
2
2
|
declare const NameVI: {
|
|
3
3
|
generateName: (useGender?: boolean, male?: boolean) => any;
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
export { NameVI as default, generateName };
|
|
4
|
+
};
|
|
5
|
+
export default NameVI;
|
package/dist/object.d.ts
CHANGED
|
@@ -1 +1,59 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const isNull: (object: string | number | {
|
|
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 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const requestDeviceOrientationControl: () => false | Promise<unknown>;
|
|
2
|
+
export default requestDeviceOrientationControl;
|
package/dist/response/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
declare const getResponse: () => {
|
|
1
|
+
export declare const getResponse: () => {
|
|
2
2
|
status: number;
|
|
3
3
|
messages: never[];
|
|
4
4
|
data: {};
|
|
5
5
|
};
|
|
6
|
-
declare const getSuccessResponse: (data: any, message?: string) => {
|
|
6
|
+
export declare const getSuccessResponse: (data: any, message?: string) => {
|
|
7
7
|
status: number;
|
|
8
8
|
messages: string[];
|
|
9
9
|
data: any;
|
|
10
10
|
};
|
|
11
|
-
declare const getFailedResponse: (...messages: any[]) => {
|
|
11
|
+
export declare const getFailedResponse: (...messages: any[]) => {
|
|
12
12
|
status: number;
|
|
13
13
|
error: boolean;
|
|
14
14
|
messages: any[];
|
|
15
15
|
data: {};
|
|
16
16
|
};
|
|
17
|
-
declare const Response: {
|
|
17
|
+
export 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,6 +45,5 @@ declare const response: {
|
|
|
45
45
|
rejected: (res: any, message?: string) => any;
|
|
46
46
|
ignore: (res: any, message?: string) => any;
|
|
47
47
|
};
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export { Response, response as default, getFailedResponse, getResponse, getSuccessResponse };
|
|
48
|
+
};
|
|
49
|
+
export default response;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const object_1 = require("../object");
|
|
3
4
|
function convertPathnameAndQuery(url) {
|
|
4
5
|
//
|
|
6
|
+
if ((0, object_1.isNull)(url))
|
|
7
|
+
return null;
|
|
8
|
+
url = url.toString();
|
|
5
9
|
const arr = url.split("?");
|
|
6
10
|
const pathname = arr[0];
|
|
7
11
|
const query = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertPathnameAndQuery.js","sourceRoot":"","sources":["../../src/string/convertPathnameAndQuery.ts"],"names":[],"mappings":";;AAAA,SAAwB,uBAAuB,CAAC,GAAW;IAC1D,EAAE;
|
|
1
|
+
{"version":3,"file":"convertPathnameAndQuery.js","sourceRoot":"","sources":["../../src/string/convertPathnameAndQuery.ts"],"names":[],"mappings":";;AAAA,sCAAmC;AACnC,SAAwB,uBAAuB,CAAC,GAAW;IAC1D,EAAE;IACF,IAAI,IAAA,eAAM,EAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAC7B,GAAG,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC;IAErB,MAAM,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE3B,MAAM,QAAQ,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IACxB,MAAM,KAAK,GAAG,EAAS,CAAC;IAExB,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE;QACX,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACjC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YACnB,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC/B,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAC;KACH;IAED,OAAO;QACN,QAAQ;QACR,KAAK;KACL,CAAC;AACH,CAAC;AAtBD,0CAsBC"}
|
|
@@ -2,6 +2,5 @@
|
|
|
2
2
|
* Format the input number with commas
|
|
3
3
|
* @example 1000000 -> 1,000,000
|
|
4
4
|
*/
|
|
5
|
-
declare function formatNumber(num: number, prefix?: string): string;
|
|
6
|
-
|
|
7
|
-
export { formatNumber as default, formatNumber };
|
|
5
|
+
export declare function formatNumber(num: number, prefix?: string): string;
|
|
6
|
+
export default formatNumber;
|
|
@@ -5,6 +5,5 @@
|
|
|
5
5
|
* @param {Boolean} hard
|
|
6
6
|
* @returns
|
|
7
7
|
*/
|
|
8
|
-
declare function generatePassword(length?: number, hard?: boolean): string;
|
|
9
|
-
|
|
10
|
-
export { generatePassword as default, generatePassword };
|
|
8
|
+
export declare function generatePassword(length?: number, hard?: boolean): string;
|
|
9
|
+
export default generatePassword;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
declare function generateUUID(): string;
|
|
2
|
-
|
|
3
|
-
export { generateUUID as default, generateUUID };
|
|
1
|
+
export declare function generateUUID(): string;
|
|
2
|
+
export default generateUUID;
|
package/dist/string/index.d.ts
CHANGED
|
@@ -1,6 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Get string between str1 and str2 from text
|
|
3
|
+
*/
|
|
4
|
+
export declare const getBetween: (text: string, str1: string, str2?: string) => string;
|
|
5
|
+
/**
|
|
6
|
+
* Convert object to string
|
|
7
|
+
*/
|
|
8
|
+
export declare const makeString: (object?: any) => string;
|
|
9
|
+
/**
|
|
10
|
+
* toUpperCase
|
|
11
|
+
*/
|
|
12
|
+
export declare const toUpperCase: (str?: string) => string;
|
|
13
|
+
/**
|
|
14
|
+
* toLowerCase
|
|
15
|
+
*/
|
|
16
|
+
export declare const toLowerCase: (str?: string) => string;
|
|
17
|
+
/**
|
|
18
|
+
* toLowerCase
|
|
19
|
+
* @param {*} str
|
|
20
|
+
* @return {string}
|
|
21
|
+
*/
|
|
22
|
+
export declare const titleize: (str?: string) => string;
|
|
23
|
+
/**
|
|
24
|
+
* Convert only first charater to UpperCase
|
|
25
|
+
*/
|
|
26
|
+
export declare const capitalize: (str: string | any, lowercaseRest?: number) => any;
|
|
27
|
+
/**
|
|
28
|
+
* Convert first character from every single words to UpperCase
|
|
29
|
+
*/
|
|
30
|
+
export declare const capitalizeName: (str: string) => string;
|
|
31
|
+
export declare const clearUnicodeCharacters: (s: string, opt?: {
|
|
32
|
+
[key: string]: any;
|
|
33
|
+
}) => string;
|
|
34
|
+
import { makeDaySlug } from "./makeDaySlug";
|
|
35
|
+
import { generateUUID } from "./generateUUID";
|
|
36
|
+
import { formatNumber } from "./formatNumber";
|
|
37
|
+
import { generatePassword } from "./generatePassword";
|
|
38
|
+
import { trimNull } from "./trimNull";
|
|
39
|
+
declare const xstring: {
|
|
40
|
+
getBetween: (text: string, str1: string, str2?: string) => string;
|
|
41
|
+
makeString: (object?: any) => string;
|
|
42
|
+
makeDaySlug: typeof makeDaySlug;
|
|
43
|
+
toUpperCase: (str?: string) => string;
|
|
44
|
+
toLowerCase: (str?: string) => string;
|
|
45
|
+
titleize: (str?: string) => string;
|
|
46
|
+
capitalize: (str: string | any, lowercaseRest?: number) => any;
|
|
47
|
+
capitalizeName: (str: string) => string;
|
|
48
|
+
clearUnicodeCharacters: (s: string, opt?: {
|
|
49
|
+
[key: string]: any;
|
|
50
|
+
}) => string;
|
|
51
|
+
generateUUID: typeof generateUUID;
|
|
52
|
+
randAllCharacterByLength: (length?: number) => string;
|
|
53
|
+
randomStringByLength: (length: number, str?: string) => string;
|
|
54
|
+
formatNumber: typeof formatNumber;
|
|
55
|
+
generatePassword: typeof generatePassword;
|
|
56
|
+
trimNull: typeof trimNull;
|
|
57
|
+
addQueryParam: (_url: string, key: string, value: any) => string;
|
|
58
|
+
getUrlParams: (parameter: string, staticURL?: string | undefined, decode?: boolean) => string | false | undefined;
|
|
59
|
+
isLink: (str: string) => boolean;
|
|
60
|
+
getFileNameWithoutExtension: (url: string) => string;
|
|
61
|
+
getFileNameWithExtension: (url: string) => string;
|
|
62
|
+
getFileExtension: (url: string) => string | undefined;
|
|
63
|
+
isImage: (url: string) => boolean;
|
|
64
|
+
};
|
|
65
|
+
export default xstring;
|
|
@@ -24,9 +24,8 @@ type DaySlugOptions = {
|
|
|
24
24
|
* Format the input number with commas
|
|
25
25
|
* @example 1000000 -> 1,000,000
|
|
26
26
|
*/
|
|
27
|
-
declare function makeDaySlug(options?: DaySlugOptions): string;
|
|
27
|
+
export declare function makeDaySlug(options?: DaySlugOptions): string;
|
|
28
28
|
declare const _default: {
|
|
29
29
|
makeDaySlug: typeof makeDaySlug;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export { _default as default, makeDaySlug };
|
|
30
|
+
};
|
|
31
|
+
export default _default;
|
package/dist/string/random.d.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
declare const textLowCase = "abcdefghijklmnopqrstuvwxyz";
|
|
2
|
-
declare const numeric = "0123456789";
|
|
3
|
-
declare const punctuation = "!@#$%^&*()_+~|}{[];?><,./-=";
|
|
4
|
-
declare const allCharacter = "\u0111\u0110a\u00E1\u00E0\u1EA3\u00E3\u1EA1\u0103\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u00E2\u1EA5\u1EA7\u1EA9\u1EAB\u1EADe\u00E9\u00E8\u1EBB\u1EBD\u1EB9\u00EA\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7o\u00F3\u00F2\u1ECF\u00F5\u1ECD\u00F4\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u01A1\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3i\u00ED\u00EC\u1EC9\u0129\u1ECBu\u00FA\u00F9\u1EE7\u0169\u1EE5\u01B0\u1EE9\u1EEB\u1EED\u1EEF\u1EF1y\u00FD\u1EF3\u1EF7\u1EF9\u1EF5A\u00C1\u00C0\u1EA2\u00C3\u1EA0\u0102\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u00C2\u1EA4\u1EA6\u1EA8\u1EAA\u1EACE\u00C9\u00C8\u1EBA\u1EBC\u1EB8\u00CA\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6O\u00D3\u00D2\u1ECE\u00D5\u1ECC\u00D4\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u01A0\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2I\u00CD\u00CC\u1EC8\u0128\u1ECAU\u00DA\u00D9\u1EE6\u0168\u1EE4\u01AF\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0Y\u00DD\u1EF2 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}";
|
|
1
|
+
export declare const textLowCase = "abcdefghijklmnopqrstuvwxyz";
|
|
2
|
+
export declare const numeric = "0123456789";
|
|
3
|
+
export declare const punctuation = "!@#$%^&*()_+~|}{[];?><,./-=";
|
|
4
|
+
export declare const allCharacter = "\u0111\u0110a\u00E1\u00E0\u1EA3\u00E3\u1EA1\u0103\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u00E2\u1EA5\u1EA7\u1EA9\u1EAB\u1EADe\u00E9\u00E8\u1EBB\u1EBD\u1EB9\u00EA\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7o\u00F3\u00F2\u1ECF\u00F5\u1ECD\u00F4\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u01A1\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3i\u00ED\u00EC\u1EC9\u0129\u1ECBu\u00FA\u00F9\u1EE7\u0169\u1EE5\u01B0\u1EE9\u1EEB\u1EED\u1EEF\u1EF1y\u00FD\u1EF3\u1EF7\u1EF9\u1EF5A\u00C1\u00C0\u1EA2\u00C3\u1EA0\u0102\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u00C2\u1EA4\u1EA6\u1EA8\u1EAA\u1EACE\u00C9\u00C8\u1EBA\u1EBC\u1EB8\u00CA\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6O\u00D3\u00D2\u1ECE\u00D5\u1ECC\u00D4\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u01A0\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2I\u00CD\u00CC\u1EC8\u0128\u1ECAU\u00DA\u00D9\u1EE6\u0168\u1EE4\u01AF\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0Y\u00DD\u1EF2 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}";
|
|
5
5
|
/**
|
|
6
6
|
* allCharacter = `đĐaáàảãạăắằẳẵặâấầẩẫậeéèẻẽẹêếềểễệoóòỏõọôốồổỗộơớờởỡợiíìỉĩịuúùủũụưứừửữựyýỳỷỹỵAÁÀẢÃẠĂẮẰẲẴẶÂẤẦẨẪẬEÉÈẺẼẸÊẾỀỂỄỆOÓÒỎÕỌÔỐỒỔỖỘƠỚỜỞỠỢIÍÌỈĨỊUÚÙỦŨỤƯỨỪỬỮỰYÝỲ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_\`abcdefghijklmnopqrstuvwxyz{|}`;
|
|
7
7
|
*/
|
|
8
|
-
declare const randAllCharacterByLength: (length?: number) => string;
|
|
9
|
-
declare const randomStringByLength: (length: number, str?: string) => string;
|
|
10
|
-
declare const randomStringAndNumberByLength: (length: number, str?: string) => string;
|
|
8
|
+
export declare const randAllCharacterByLength: (length?: number) => string;
|
|
9
|
+
export declare const randomStringByLength: (length: number, str?: string) => string;
|
|
10
|
+
export declare const randomStringAndNumberByLength: (length: number, str?: string) => string;
|
|
11
11
|
declare const random: {
|
|
12
12
|
randAllCharacterByLength: (length?: number) => string;
|
|
13
13
|
randomStringByLength: (length: number, str?: string) => string;
|
|
14
14
|
randomStringAndNumberByLength: (length: number, str?: string) => string;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export { allCharacter, random as default, numeric, punctuation, randAllCharacterByLength, randomStringAndNumberByLength, randomStringByLength, textLowCase };
|
|
15
|
+
};
|
|
16
|
+
export default random;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
declare function trimNull(str: string): string;
|
|
2
|
-
|
|
3
|
-
export { trimNull as default, trimNull };
|
|
1
|
+
export declare function trimNull(str: string): string;
|
|
2
|
+
export default trimNull;
|
package/dist/string/url.d.ts
CHANGED
|
@@ -1 +1,27 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const addQueryParam: (_url: string, key: string, value: any) => string;
|
|
2
|
+
export declare const getUrlParams: (parameter: string, staticURL?: string, decode?: boolean) => string | false | undefined;
|
|
3
|
+
export declare const isLink: (str: string) => boolean;
|
|
4
|
+
export declare const getFileNameWithoutExtension: (url: string) => string;
|
|
5
|
+
export declare const getFileNameWithExtension: (url: string) => string;
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* @param {string} url
|
|
9
|
+
* @return {string}
|
|
10
|
+
*/
|
|
11
|
+
export declare const getFileExtension: (url: string) => string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @param {string} url
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
export declare const isImage: (url: string) => boolean;
|
|
18
|
+
declare const xurl: {
|
|
19
|
+
addQueryParam: (_url: string, key: string, value: any) => string;
|
|
20
|
+
getUrlParams: (parameter: string, staticURL?: string, decode?: boolean) => string | false | undefined;
|
|
21
|
+
isLink: (str: string) => boolean;
|
|
22
|
+
getFileNameWithoutExtension: (url: string) => string;
|
|
23
|
+
getFileNameWithExtension: (url: string) => string;
|
|
24
|
+
getFileExtension: (url: string) => string | undefined;
|
|
25
|
+
isImage: (url: string) => boolean;
|
|
26
|
+
};
|
|
27
|
+
export default xurl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertPathnameAndQuery.js","sourceRoot":"","sources":["../../src/string/convertPathnameAndQuery.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,GAAW;IAC1D,EAAE;
|
|
1
|
+
{"version":3,"file":"convertPathnameAndQuery.js","sourceRoot":"","sources":["../../src/string/convertPathnameAndQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,GAAW;IAC1D,EAAE;IACF,IAAI,MAAM,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAC7B,GAAG,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC;IAErB,MAAM,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE3B,MAAM,QAAQ,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IACxB,MAAM,KAAK,GAAG,EAAS,CAAC;IAExB,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE;QACX,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACjC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YACnB,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC/B,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAC;KACH;IAED,OAAO;QACN,QAAQ;QACR,KAAK;KACL,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED