diginext-utils 2.1.2 → 2.1.4
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 +22 -1
- package/dist/string/url.js +4 -6
- package/dist/string/url.js.map +1 -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/esm/string/index.d.ts +1 -1
- package/esm/string/url.d.ts +2 -7
- package/esm/string/url.js +4 -6
- package/esm/string/url.js.map +1 -1
- package/package.json +1 -1
- package/src/string/convertPathnameAndQuery.ts +3 -0
- package/src/string/url.ts +3 -6
- package/dist/Timer-7b0c4e7c.d.ts +0 -11
- package/dist/array-dc599632.d.ts +0 -158
- package/dist/browser-8d042ffe.d.ts +0 -22
- package/dist/camera-1a859d72.d.ts +0 -15
- package/dist/createDir-220e0081.d.ts +0 -13
- package/dist/enableConsole-ddc24282.d.ts +0 -11
- package/dist/fileMove-3a09e429.d.ts +0 -13
- package/dist/findFilesByExt-753e91d7.d.ts +0 -24
- package/dist/index-1e114d55.d.ts +0 -26
- package/dist/index-1f738e52.d.ts +0 -22
- package/dist/index-22309f0c.d.ts +0 -23
- package/dist/index-6ae3c86b.d.ts +0 -63
- package/dist/index-c52abc6d.d.ts +0 -90
- package/dist/object-43aaaf92.d.ts +0 -80
- package/dist/requestCamera-32b7dfc7.d.ts +0 -14
- package/dist/requestDeviceOrientationControl-b6458660.d.ts +0 -11
- package/dist/url-4f3cd108.d.ts +0 -48
|
@@ -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 | null | 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,22 @@
|
|
|
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
|
+
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;
|
package/dist/string/url.js
CHANGED
|
@@ -48,13 +48,11 @@ const getFileNameWithExtension = (url) => {
|
|
|
48
48
|
return "";
|
|
49
49
|
};
|
|
50
50
|
exports.getFileNameWithExtension = getFileNameWithExtension;
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
53
|
-
* @param {string} url
|
|
54
|
-
* @return {string}
|
|
55
|
-
*/
|
|
56
51
|
const getFileExtension = (url) => {
|
|
57
|
-
|
|
52
|
+
const arr = (0, exports.getFileNameWithExtension)(url).split(".");
|
|
53
|
+
if (arr.length > 1)
|
|
54
|
+
return (0, exports.getFileNameWithExtension)(url).split(".").pop();
|
|
55
|
+
return null;
|
|
58
56
|
};
|
|
59
57
|
exports.getFileExtension = getFileExtension;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AAhB,wBAAgB,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC;AAEvI,kBAAe,IAAI,CAAC"}
|
|
@@ -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/esm/string/index.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ declare const xstring: {
|
|
|
59
59
|
isLink: (str: string) => boolean;
|
|
60
60
|
getFileNameWithoutExtension: (url: string) => string;
|
|
61
61
|
getFileNameWithExtension: (url: string) => string;
|
|
62
|
-
getFileExtension: (url: string) => string | undefined;
|
|
62
|
+
getFileExtension: (url: string) => string | null | undefined;
|
|
63
63
|
isImage: (url: string) => boolean;
|
|
64
64
|
};
|
|
65
65
|
export default xstring;
|
package/esm/string/url.d.ts
CHANGED
|
@@ -3,12 +3,7 @@ export declare const getUrlParams: (parameter: string, staticURL?: string, decod
|
|
|
3
3
|
export declare const isLink: (str: string) => boolean;
|
|
4
4
|
export declare const getFileNameWithoutExtension: (url: string) => string;
|
|
5
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;
|
|
6
|
+
export declare const getFileExtension: (url: string) => string | null | undefined;
|
|
12
7
|
/**
|
|
13
8
|
*
|
|
14
9
|
* @param {string} url
|
|
@@ -21,7 +16,7 @@ declare const xurl: {
|
|
|
21
16
|
isLink: (str: string) => boolean;
|
|
22
17
|
getFileNameWithoutExtension: (url: string) => string;
|
|
23
18
|
getFileNameWithExtension: (url: string) => string;
|
|
24
|
-
getFileExtension: (url: string) => string | undefined;
|
|
19
|
+
getFileExtension: (url: string) => string | null | undefined;
|
|
25
20
|
isImage: (url: string) => boolean;
|
|
26
21
|
};
|
|
27
22
|
export default xurl;
|
package/esm/string/url.js
CHANGED
|
@@ -40,13 +40,11 @@ export const getFileNameWithExtension = (url) => {
|
|
|
40
40
|
}
|
|
41
41
|
return "";
|
|
42
42
|
};
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @param {string} url
|
|
46
|
-
* @return {string}
|
|
47
|
-
*/
|
|
48
43
|
export const getFileExtension = (url) => {
|
|
49
|
-
|
|
44
|
+
const arr = getFileNameWithExtension(url).split(".");
|
|
45
|
+
if (arr.length > 1)
|
|
46
|
+
return getFileNameWithExtension(url).split(".").pop();
|
|
47
|
+
return null;
|
|
50
48
|
};
|
|
51
49
|
/**
|
|
52
50
|
*
|
package/esm/string/url.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../src/string/url.ts"],"names":[],"mappings":"AAGA,IAAI,QAAQ,GAAG,sBAAsB,CAAC;AAEtC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAY,EAAE,GAAW,EAAE,KAAU,EAAE,EAAE;IACtE,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC;IAE7D,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,SAAiB,EAAE,SAAkB,EAAE,SAAkB,IAAI,EAAE,EAAE;IAC7F,IAAI,OAAO,MAAM,IAAI,WAAW;QAAE,OAAO,EAAE,CAAC;IAE5C,SAAS,GAAG,SAAS,IAAI,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IACtE,IAAI,YAAY,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;IAE7E,IAAI,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,EAAE,CAAC;IAElD,IAAI,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EACjD,UAAU,GAAG,IAAI,CAAC;IAEnB,KAAK,IAAI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AAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;KACpD;IACD,OAAO,EAAE,CAAC;AACX,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAE,EAAE;IAC/C,MAAM,GAAG,GAAG,wBAAwB,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACrD,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,wBAAwB,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IAC1E,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,GAAW,EAAE,EAAE;IACtC,IAAI,CAAC,GAAG;QAAE,OAAO,KAAK,CAAC;IAEvB,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAE/E,MAAM,KAAK,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE;QACpC,OAAO,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;IAEH,OAAO,KAAK,IAAI,CAAC,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,IAAI,GAAG,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC;AAEvI,eAAe,IAAI,CAAC"}
|
package/package.json
CHANGED
package/src/string/url.ts
CHANGED
|
@@ -53,13 +53,10 @@ export const getFileNameWithExtension = (url: string): string => {
|
|
|
53
53
|
return "";
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
-
/**
|
|
57
|
-
*
|
|
58
|
-
* @param {string} url
|
|
59
|
-
* @return {string}
|
|
60
|
-
*/
|
|
61
56
|
export const getFileExtension = (url: string) => {
|
|
62
|
-
|
|
57
|
+
const arr = getFileNameWithExtension(url).split(".");
|
|
58
|
+
if (arr.length > 1) return getFileNameWithExtension(url).split(".").pop();
|
|
59
|
+
return null;
|
|
63
60
|
};
|
|
64
61
|
|
|
65
62
|
/**
|
package/dist/Timer-7b0c4e7c.d.ts
DELETED
package/dist/array-dc599632.d.ts
DELETED
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
declare const sumArray: (array: [], key: string) => number;
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param {Array} array
|
|
5
|
-
* @param {string} key
|
|
6
|
-
* @returns {Number}
|
|
7
|
-
*/
|
|
8
|
-
declare const averageArray: (array: [], key: string) => number;
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* @param {Array} array
|
|
12
|
-
* @param {string} key
|
|
13
|
-
* @returns {Number}
|
|
14
|
-
*/
|
|
15
|
-
declare const minArray: (array: [], key: string) => number;
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @param {Array} array
|
|
19
|
-
* @param {string} key
|
|
20
|
-
* @returns {Number}
|
|
21
|
-
*/
|
|
22
|
-
declare const maxArray: (array: [], key: string) => number;
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* @param {Array} array
|
|
26
|
-
* @param {string} key
|
|
27
|
-
* @returns {Array}
|
|
28
|
-
*/
|
|
29
|
-
declare const sortElementByString: (array: any, key: string) => any[] | undefined;
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
* @param {Array} array
|
|
33
|
-
* @param {string} key
|
|
34
|
-
* @returns {Array}
|
|
35
|
-
*/
|
|
36
|
-
declare const sortElementByNumber: (array: any, key: string) => any[] | undefined;
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
* @param {Array} array
|
|
40
|
-
* @returns {any}
|
|
41
|
-
*/
|
|
42
|
-
declare const firstElement: (array: any[]) => any;
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @param {Array} array
|
|
46
|
-
* @returns {any}
|
|
47
|
-
*/
|
|
48
|
-
declare const lastElement: (array: any[]) => any;
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* @param {Array} array
|
|
52
|
-
* @returns {any}
|
|
53
|
-
*/
|
|
54
|
-
declare const randomIndex: (array: any[]) => number;
|
|
55
|
-
/**
|
|
56
|
-
*
|
|
57
|
-
* @param {Array} array
|
|
58
|
-
* @returns {any}
|
|
59
|
-
*/
|
|
60
|
-
declare const randomElement: (array: any[]) => any;
|
|
61
|
-
/**
|
|
62
|
-
* Remove same elements from 2 arrays
|
|
63
|
-
*/
|
|
64
|
-
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
|
-
declare const allMatchInArray: (target: any[], toMatch: any[]) => boolean;
|
|
72
|
-
declare const removeItem: (item: any, array: any[]) => any[];
|
|
73
|
-
declare const removeItemByKey: (key: string, value: any, array: any[]) => any[];
|
|
74
|
-
declare const getRandom: (array: any[], n: number) => any[];
|
|
75
|
-
/**
|
|
76
|
-
* Get an array with shuffle element
|
|
77
|
-
*/
|
|
78
|
-
declare const getHalfRandom: (array: any[], n: number) => any[];
|
|
79
|
-
/**
|
|
80
|
-
* Make array shuffle itself
|
|
81
|
-
*/
|
|
82
|
-
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
|
-
declare const moveIndex: (array: any[], oldIndex: number, newIndex: number) => any[];
|
|
91
|
-
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
|
-
|
|
114
|
-
declare const array_allMatchInArray: typeof allMatchInArray;
|
|
115
|
-
declare const array_averageArray: typeof averageArray;
|
|
116
|
-
declare const array_firstElement: typeof firstElement;
|
|
117
|
-
declare const array_getHalfRandom: typeof getHalfRandom;
|
|
118
|
-
declare const array_getRandom: typeof getRandom;
|
|
119
|
-
declare const array_lastElement: typeof lastElement;
|
|
120
|
-
declare const array_maxArray: typeof maxArray;
|
|
121
|
-
declare const array_mergeAndMakeUniqueElement: typeof mergeAndMakeUniqueElement;
|
|
122
|
-
declare const array_minArray: typeof minArray;
|
|
123
|
-
declare const array_moveArray: typeof moveArray;
|
|
124
|
-
declare const array_moveIndex: typeof moveIndex;
|
|
125
|
-
declare const array_randomElement: typeof randomElement;
|
|
126
|
-
declare const array_randomIndex: typeof randomIndex;
|
|
127
|
-
declare const array_removeItem: typeof removeItem;
|
|
128
|
-
declare const array_removeItemByKey: typeof removeItemByKey;
|
|
129
|
-
declare const array_shuffle: typeof shuffle;
|
|
130
|
-
declare const array_sortElementByNumber: typeof sortElementByNumber;
|
|
131
|
-
declare const array_sortElementByString: typeof sortElementByString;
|
|
132
|
-
declare const array_sumArray: typeof sumArray;
|
|
133
|
-
declare namespace array {
|
|
134
|
-
export {
|
|
135
|
-
array_allMatchInArray as allMatchInArray,
|
|
136
|
-
array_averageArray as averageArray,
|
|
137
|
-
xarray as default,
|
|
138
|
-
array_firstElement as firstElement,
|
|
139
|
-
array_getHalfRandom as getHalfRandom,
|
|
140
|
-
array_getRandom as getRandom,
|
|
141
|
-
array_lastElement as lastElement,
|
|
142
|
-
array_maxArray as maxArray,
|
|
143
|
-
array_mergeAndMakeUniqueElement as mergeAndMakeUniqueElement,
|
|
144
|
-
array_minArray as minArray,
|
|
145
|
-
array_moveArray as moveArray,
|
|
146
|
-
array_moveIndex as moveIndex,
|
|
147
|
-
array_randomElement as randomElement,
|
|
148
|
-
array_randomIndex as randomIndex,
|
|
149
|
-
array_removeItem as removeItem,
|
|
150
|
-
array_removeItemByKey as removeItemByKey,
|
|
151
|
-
array_shuffle as shuffle,
|
|
152
|
-
array_sortElementByNumber as sortElementByNumber,
|
|
153
|
-
array_sortElementByString as sortElementByString,
|
|
154
|
-
array_sumArray as sumArray,
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export { array as a, averageArray as b, maxArray as c, sortElementByString as d, sortElementByNumber as e, firstElement as f, randomElement as g, mergeAndMakeUniqueElement as h, allMatchInArray as i, removeItem as j, removeItemByKey as k, lastElement as l, minArray as m, getRandom as n, getHalfRandom as o, shuffle as p, moveIndex as q, randomIndex as r, sumArray as s, moveArray as t, xarray as x };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
declare const isPotrait: () => boolean;
|
|
2
|
-
declare const isLandscape: () => boolean;
|
|
3
|
-
declare const ua: () => any;
|
|
4
|
-
declare const isFacebookWebview: () => boolean | undefined;
|
|
5
|
-
declare const isInAppWebview: () => boolean;
|
|
6
|
-
|
|
7
|
-
declare const browser_isFacebookWebview: typeof isFacebookWebview;
|
|
8
|
-
declare const browser_isInAppWebview: typeof isInAppWebview;
|
|
9
|
-
declare const browser_isLandscape: typeof isLandscape;
|
|
10
|
-
declare const browser_isPotrait: typeof isPotrait;
|
|
11
|
-
declare const browser_ua: typeof ua;
|
|
12
|
-
declare namespace browser {
|
|
13
|
-
export {
|
|
14
|
-
browser_isFacebookWebview as isFacebookWebview,
|
|
15
|
-
browser_isInAppWebview as isInAppWebview,
|
|
16
|
-
browser_isLandscape as isLandscape,
|
|
17
|
-
browser_isPotrait as isPotrait,
|
|
18
|
-
browser_ua as ua,
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { isLandscape as a, browser as b, isFacebookWebview as c, isInAppWebview as d, isPotrait as i, ua as u };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
type GetWebcamParams = {
|
|
2
|
-
container?: HTMLElement;
|
|
3
|
-
facingMode: string;
|
|
4
|
-
audio: boolean;
|
|
5
|
-
};
|
|
6
|
-
declare function getWebcam(params?: GetWebcamParams): Promise<unknown> | undefined;
|
|
7
|
-
|
|
8
|
-
declare const camera_getWebcam: typeof getWebcam;
|
|
9
|
-
declare namespace camera {
|
|
10
|
-
export {
|
|
11
|
-
camera_getWebcam as getWebcam,
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { camera as c, getWebcam as g };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create new directory
|
|
3
|
-
*/
|
|
4
|
-
declare function createDir(path: string): true | undefined;
|
|
5
|
-
|
|
6
|
-
declare const createDir$1_createDir: typeof createDir;
|
|
7
|
-
declare namespace createDir$1 {
|
|
8
|
-
export {
|
|
9
|
-
createDir$1_createDir as createDir,
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { createDir as a, createDir$1 as c };
|