diginext-utils 3.0.3 → 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 +3 -3
- 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 +3 -3
- package/esm/file/detectPrivateKeyByFilePath.js.map +1 -1
- package/package.json +1 -1
package/dist/string/index.d.ts
CHANGED
|
@@ -1,65 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 | null | undefined;
|
|
63
|
-
isImage: (url: string) => boolean;
|
|
64
|
-
};
|
|
65
|
-
export default xstring;
|
|
1
|
+
import './makeDaySlug.js';
|
|
2
|
+
import './generateUUID.js';
|
|
3
|
+
import './formatNumber.js';
|
|
4
|
+
import './generatePassword.js';
|
|
5
|
+
import './trimNull.js';
|
|
6
|
+
export { c as capitalize, d as capitalizeName, e as clearUnicodeCharacters, x as default, g as getBetween, m as makeString, b as titleize, a as toLowerCase, t as toUpperCase } from '../index-3eeb7834.js';
|
|
@@ -24,8 +24,9 @@ type DaySlugOptions = {
|
|
|
24
24
|
* Format the input number with commas
|
|
25
25
|
* @example 1000000 -> 1,000,000
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
declare function makeDaySlug(options?: DaySlugOptions): string;
|
|
28
28
|
declare const _default: {
|
|
29
29
|
makeDaySlug: typeof makeDaySlug;
|
|
30
|
-
};
|
|
31
|
-
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { _default as default, makeDaySlug };
|
package/dist/string/random.d.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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{|}";
|
|
5
5
|
/**
|
|
6
6
|
* allCharacter = `đĐaáàảãạăắằẳẵặâấầẩẫậeéèẻẽẹêếềểễệoóòỏõọôốồổỗộơớờởỡợiíìỉĩịuúùủũụưứừửữựyýỳỷỹỵAÁÀẢÃẠĂẮẰẲẴẶÂẤẦẨẪẬEÉÈẺẼẸÊẾỀỂỄỆOÓÒỎÕỌÔỐỒỔỖỘƠỚỜỞỠỢIÍÌỈĨỊUÚÙỦŨỤƯỨỪỬỮỰYÝỲ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_\`abcdefghijklmnopqrstuvwxyz{|}`;
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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;
|
|
11
|
+
declare const uniqueSortByTime: (length?: number, str?: string) => string;
|
|
12
12
|
declare const random: {
|
|
13
13
|
randAllCharacterByLength: (length?: number) => string;
|
|
14
14
|
randomStringByLength: (length: number, str?: string) => string;
|
|
15
15
|
randomStringAndNumberByLength: (length: number, str?: string) => string;
|
|
16
16
|
uniqueSortByTime: (length?: number, str?: string) => string;
|
|
17
|
-
};
|
|
18
|
-
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { allCharacter, random as default, numeric, punctuation, randAllCharacterByLength, randomStringAndNumberByLength, randomStringByLength, textLowCase, uniqueSortByTime };
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare function trimNull(str: string): string;
|
|
2
|
+
|
|
3
|
+
export { trimNull as default, trimNull };
|
package/dist/string/url.d.ts
CHANGED
|
@@ -1,22 +1 @@
|
|
|
1
|
-
export
|
|
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
|
-
export declare const getFileExtension: (url: string) => string | null | undefined;
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @param {string} url
|
|
10
|
-
* @returns
|
|
11
|
-
*/
|
|
12
|
-
export declare const isImage: (url: string) => boolean;
|
|
13
|
-
declare const xurl: {
|
|
14
|
-
addQueryParam: (_url: string, key: string, value: any) => string;
|
|
15
|
-
getUrlParams: (parameter: string, staticURL?: string, decode?: boolean) => string | false | undefined;
|
|
16
|
-
isLink: (str: string) => boolean;
|
|
17
|
-
getFileNameWithoutExtension: (url: string) => string;
|
|
18
|
-
getFileNameWithExtension: (url: string) => string;
|
|
19
|
-
getFileExtension: (url: string) => string | null | undefined;
|
|
20
|
-
isImage: (url: string) => boolean;
|
|
21
|
-
};
|
|
22
|
-
export default xurl;
|
|
1
|
+
export { a as addQueryParam, x as default, d as getFileExtension, c as getFileNameWithExtension, b as getFileNameWithoutExtension, g as getUrlParams, e as isImage, i as isLink } from '../url-0da0be84.js';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
declare const addQueryParam: (_url: string, key: string, value: any) => string;
|
|
2
|
+
declare const getUrlParams: (parameter: string, staticURL?: string, decode?: boolean) => string | false | undefined;
|
|
3
|
+
declare const isLink: (str: string) => boolean;
|
|
4
|
+
declare const getFileNameWithoutExtension: (url: string) => string;
|
|
5
|
+
declare const getFileNameWithExtension: (url: string) => string;
|
|
6
|
+
declare const getFileExtension: (url: string) => string | null | undefined;
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param {string} url
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
declare const isImage: (url: string) => boolean;
|
|
13
|
+
declare const xurl: {
|
|
14
|
+
addQueryParam: (_url: string, key: string, value: any) => string;
|
|
15
|
+
getUrlParams: (parameter: string, staticURL?: string, decode?: boolean) => string | false | undefined;
|
|
16
|
+
isLink: (str: string) => boolean;
|
|
17
|
+
getFileNameWithoutExtension: (url: string) => string;
|
|
18
|
+
getFileNameWithExtension: (url: string) => string;
|
|
19
|
+
getFileExtension: (url: string) => string | null | undefined;
|
|
20
|
+
isImage: (url: string) => boolean;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
declare const url_addQueryParam: typeof addQueryParam;
|
|
24
|
+
declare const url_getFileExtension: typeof getFileExtension;
|
|
25
|
+
declare const url_getFileNameWithExtension: typeof getFileNameWithExtension;
|
|
26
|
+
declare const url_getFileNameWithoutExtension: typeof getFileNameWithoutExtension;
|
|
27
|
+
declare const url_getUrlParams: typeof getUrlParams;
|
|
28
|
+
declare const url_isImage: typeof isImage;
|
|
29
|
+
declare const url_isLink: typeof isLink;
|
|
30
|
+
declare namespace url {
|
|
31
|
+
export {
|
|
32
|
+
url_addQueryParam as addQueryParam,
|
|
33
|
+
xurl as default,
|
|
34
|
+
url_getFileExtension as getFileExtension,
|
|
35
|
+
url_getFileNameWithExtension as getFileNameWithExtension,
|
|
36
|
+
url_getFileNameWithoutExtension as getFileNameWithoutExtension,
|
|
37
|
+
url_getUrlParams as getUrlParams,
|
|
38
|
+
url_isImage as isImage,
|
|
39
|
+
url_isLink as isLink,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { addQueryParam as a, getFileNameWithoutExtension as b, getFileNameWithExtension as c, getFileExtension as d, isImage as e, getUrlParams as g, isLink as i, url as u, xurl as x };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export default enableConsole;
|
|
1
|
+
export { a as default, a as enableConsole } from '../enableConsole-ddc24282.js';
|
package/dist/xconsole/index.d.ts
CHANGED
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export declare const showCredit: (version?: string | number) => void;
|
|
4
|
-
import { enableConsole } from "./enableConsole";
|
|
5
|
-
declare const xconsole: {
|
|
6
|
-
enableConsole: typeof enableConsole;
|
|
7
|
-
disableConsole: () => void;
|
|
8
|
-
removeConsole: () => void;
|
|
9
|
-
showCredit: (version?: string | number) => 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-11ec3903.js';
|
package/dist/xconsole/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 };
|
|
@@ -2,11 +2,11 @@ import fs from "fs";
|
|
|
2
2
|
export default function detectPrivateKeyByFilePath(_path) {
|
|
3
3
|
//
|
|
4
4
|
if (!fs.existsSync(_path))
|
|
5
|
-
return
|
|
5
|
+
return true;
|
|
6
6
|
const fileContents = fs.readFileSync(_path);
|
|
7
7
|
switch (true) {
|
|
8
|
-
case fileContents.includes(
|
|
9
|
-
case fileContents.includes("SECRET=") && !fileContents.includes("SECRET=\n") && !fileContents.includes("SECRET=*"):
|
|
8
|
+
case fileContents.includes(`${`-----`}BEGIN `):
|
|
9
|
+
case _path.includes(".env") && fileContents.includes("SECRET=") && !fileContents.includes("SECRET=\n") && !fileContents.includes("SECRET=*"):
|
|
10
10
|
return false;
|
|
11
11
|
default:
|
|
12
12
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detectPrivateKeyByFilePath.js","sourceRoot":"","sources":["../../src/file/detectPrivateKeyByFilePath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,KAAa;IAC/D,EAAE;IACF,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;QAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"detectPrivateKeyByFilePath.js","sourceRoot":"","sources":["../../src/file/detectPrivateKeyByFilePath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,KAAa;IAC/D,EAAE;IACF,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAEvC,MAAM,YAAY,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC5C,QAAQ,IAAI,EAAE;QACb,KAAK,YAAY,CAAC,QAAQ,CAAC,GAAG,OAAO,QAAQ,CAAC,CAAC;QAC/C,KAAK,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC;YAC3I,OAAO,KAAK,CAAC;QACd;YACC,MAAM;KACP;IAED,OAAO,IAAI,CAAC;AACb,CAAC;AAED,OAAO,EAAE,0BAA0B,EAAE,CAAC"}
|