easy-soft-utility 2.7.21 → 2.7.22
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/es/index.d.ts +1 -1
- package/es/utils/accessWayAssist.d.ts +8 -8
- package/es/utils/applicationAssist.d.ts +26 -26
- package/es/utils/arrayAssist.d.ts +5 -5
- package/es/utils/authorityCacheAssist.d.ts +16 -16
- package/es/utils/authorityLocalAssist.d.ts +10 -10
- package/es/utils/base64.d.ts +11 -11
- package/es/utils/cacheAssist.d.ts +77 -77
- package/es/utils/calculate.d.ts +5 -5
- package/es/utils/checkAssist.d.ts +121 -121
- package/es/utils/colorAssist.d.ts +31 -31
- package/es/utils/common.d.ts +107 -107
- package/es/utils/componentAssist.d.ts +17 -17
- package/es/utils/constants.d.ts +192 -192
- package/es/utils/convertAssist.d.ts +58 -58
- package/es/utils/convertExtraAssist.d.ts +15 -15
- package/es/utils/currentOperatorAssist.d.ts +17 -17
- package/es/utils/datetime.d.ts +66 -66
- package/es/utils/definition.d.ts +4 -4
- package/es/utils/dvaAssist.d.ts +43 -43
- package/es/utils/formatAssist.d.ts +44 -44
- package/es/utils/htmlAssist.d.ts +4 -4
- package/es/utils/httpAssist.d.ts +1 -1
- package/es/utils/index.d.ts +40 -40
- package/es/utils/localMetaDataAssist.d.ts +17 -17
- package/es/utils/localStorageAssist.d.ts +57 -57
- package/es/utils/lodashTools.d.ts +87 -87
- package/es/utils/loggerAssist.d.ts +173 -173
- package/es/utils/messagePromptAssist.d.ts +212 -212
- package/es/utils/meta.d.ts +85 -85
- package/es/utils/modelAssist.d.ts +41 -41
- package/es/utils/navigationAssist.d.ts +14 -14
- package/es/utils/nearestLocalhostNotify.d.ts +9 -9
- package/es/utils/notificationPromptAssist.d.ts +177 -177
- package/es/utils/parametersDataAssist.d.ts +16 -16
- package/es/utils/progressAssist.d.ts +18 -18
- package/es/utils/promptAssist.d.ts +35 -35
- package/es/utils/queryString.d.ts +8 -8
- package/es/utils/requestAssist.d.ts +218 -218
- package/es/utils/runtimeAssist.d.ts +15 -15
- package/es/utils/sessionStorageAssist.d.ts +57 -57
- package/es/utils/tokenAssist.d.ts +21 -21
- package/es/utils/tools.d.ts +21 -21
- package/es/utils/userInterfaceGenerate.d.ts +17 -17
- package/package.json +16 -16
package/es/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./utils";
|
|
1
|
+
export * from "./utils";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get access way collection cache
|
|
3
|
-
*/
|
|
4
|
-
export function getAccessWayCollectionCache(): {};
|
|
5
|
-
export function setAccessWayCollectionCache(o: any): void;
|
|
6
|
-
export namespace storageKeyCollection {
|
|
7
|
-
|
|
8
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Get access way collection cache
|
|
3
|
+
*/
|
|
4
|
+
export function getAccessWayCollectionCache(): {};
|
|
5
|
+
export function setAccessWayCollectionCache(o: any): void;
|
|
6
|
+
export namespace storageKeyCollection {
|
|
7
|
+
const accessWayCollection: string;
|
|
8
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Set application initial config
|
|
3
|
-
* @param {number} config application initial config
|
|
4
|
-
*/
|
|
5
|
-
export function setApplicationInitialConfig(config: number): void;
|
|
6
|
-
/**
|
|
7
|
-
* Set application external config list
|
|
8
|
-
* @param {Object|Array} configs application initial config list
|
|
9
|
-
*/
|
|
10
|
-
export function setApplicationExternalConfigList(configs: Object | any[]): void;
|
|
11
|
-
/**
|
|
12
|
-
* Get application initial config
|
|
13
|
-
*/
|
|
14
|
-
export function getApplicationInitialConfig(): any;
|
|
15
|
-
/**
|
|
16
|
-
* Get application external config list, its will be merged
|
|
17
|
-
*/
|
|
18
|
-
export function getApplicationExternalConfigList(): any;
|
|
19
|
-
/**
|
|
20
|
-
* Get application merged config
|
|
21
|
-
*/
|
|
22
|
-
export function getApplicationMergeConfig(): any;
|
|
23
|
-
export namespace applicationConfiguration {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Set application initial config
|
|
3
|
+
* @param {number} config application initial config
|
|
4
|
+
*/
|
|
5
|
+
export function setApplicationInitialConfig(config: number): void;
|
|
6
|
+
/**
|
|
7
|
+
* Set application external config list
|
|
8
|
+
* @param {Object|Array} configs application initial config list
|
|
9
|
+
*/
|
|
10
|
+
export function setApplicationExternalConfigList(configs: Object | any[]): void;
|
|
11
|
+
/**
|
|
12
|
+
* Get application initial config
|
|
13
|
+
*/
|
|
14
|
+
export function getApplicationInitialConfig(): any;
|
|
15
|
+
/**
|
|
16
|
+
* Get application external config list, its will be merged
|
|
17
|
+
*/
|
|
18
|
+
export function getApplicationExternalConfigList(): any;
|
|
19
|
+
/**
|
|
20
|
+
* Get application merged config
|
|
21
|
+
*/
|
|
22
|
+
export function getApplicationMergeConfig(): any;
|
|
23
|
+
export namespace applicationConfiguration {
|
|
24
|
+
const externalConfigListSetComplete: boolean;
|
|
25
|
+
const initialConfigSetComplete: boolean;
|
|
26
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shuffle array with random sort
|
|
3
|
-
* @param {Array} array the array will be changed
|
|
4
|
-
*/
|
|
5
|
-
export function shuffleArray(array: any[]): any[];
|
|
1
|
+
/**
|
|
2
|
+
* Shuffle array with random sort
|
|
3
|
+
* @param {Array} array the array will be changed
|
|
4
|
+
*/
|
|
5
|
+
export function shuffleArray(array: any[]): any[];
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Set the authorization fail handler
|
|
3
|
-
* @param {Function} handler handle authority request
|
|
4
|
-
*/
|
|
5
|
-
export function setAuthorizationFailHandler(handler: Function): void;
|
|
6
|
-
export function checkIsSuper(): boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Handle authorization fail
|
|
9
|
-
* @param {string} authority
|
|
10
|
-
*/
|
|
11
|
-
export function handleAuthorizationFail(authority: string): void;
|
|
12
|
-
export function checkHasAuthority(auth: any): boolean;
|
|
13
|
-
export namespace authorityAssist {
|
|
14
|
-
function handleAuthorizationFail(authority: any): void;
|
|
15
|
-
|
|
16
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Set the authorization fail handler
|
|
3
|
+
* @param {Function} handler handle authority request
|
|
4
|
+
*/
|
|
5
|
+
export function setAuthorizationFailHandler(handler: Function): void;
|
|
6
|
+
export function checkIsSuper(): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Handle authorization fail
|
|
9
|
+
* @param {string} authority
|
|
10
|
+
*/
|
|
11
|
+
export function handleAuthorizationFail(authority: string): void;
|
|
12
|
+
export function checkHasAuthority(auth: any): boolean;
|
|
13
|
+
export namespace authorityAssist {
|
|
14
|
+
function handleAuthorizationFail(authority: any): void;
|
|
15
|
+
const handleAuthorizationFailSetComplete: boolean;
|
|
16
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* set local authority collection
|
|
3
|
-
* @param {string|Array} authority
|
|
4
|
-
*/
|
|
5
|
-
export function setLocalAuthorityCollection(authority: string | any[]): void;
|
|
6
|
-
export function getLocalAuthorityCollection(): any[];
|
|
7
|
-
/**
|
|
8
|
-
* Remove local authority collection
|
|
9
|
-
*/
|
|
10
|
-
export function removeLocalAuthorityCollection(): void;
|
|
1
|
+
/**
|
|
2
|
+
* set local authority collection
|
|
3
|
+
* @param {string|Array} authority
|
|
4
|
+
*/
|
|
5
|
+
export function setLocalAuthorityCollection(authority: string | any[]): void;
|
|
6
|
+
export function getLocalAuthorityCollection(): any[];
|
|
7
|
+
/**
|
|
8
|
+
* Remove local authority collection
|
|
9
|
+
*/
|
|
10
|
+
export function removeLocalAuthorityCollection(): void;
|
package/es/utils/base64.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* base64 decode
|
|
3
|
-
* @param {string} target the string will decode
|
|
4
|
-
*/
|
|
5
|
-
export function decodeBase64(target: string): string;
|
|
6
|
-
/**
|
|
7
|
-
* base64 encode
|
|
8
|
-
* @param {string} target the string will encode
|
|
9
|
-
*/
|
|
10
|
-
export function encodeBase64(target: string): string;
|
|
11
|
-
export function fixedZero(value: any): any;
|
|
1
|
+
/**
|
|
2
|
+
* base64 decode
|
|
3
|
+
* @param {string} target the string will decode
|
|
4
|
+
*/
|
|
5
|
+
export function decodeBase64(target: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* base64 encode
|
|
8
|
+
* @param {string} target the string will encode
|
|
9
|
+
*/
|
|
10
|
+
export function encodeBase64(target: string): string;
|
|
11
|
+
export function fixedZero(value: any): any;
|
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get the runtime cache pool.
|
|
3
|
-
* @returns {nodeCache}
|
|
4
|
-
*/
|
|
5
|
-
export function getCachePool(): nodeCache;
|
|
6
|
-
/**
|
|
7
|
-
* Returns boolean indicating if the key is cached.
|
|
8
|
-
*/
|
|
9
|
-
export function hasCache({ key }: {
|
|
10
|
-
key: any;
|
|
11
|
-
}): boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Sets a key value pair. It is possible to define a ttl (in seconds). Returns true on success. Expiration time default is 0, it mean never expire
|
|
14
|
-
*/
|
|
15
|
-
export function setCache({ key, value, expiration }: {
|
|
16
|
-
key: any;
|
|
17
|
-
value: any;
|
|
18
|
-
expiration?: number | undefined;
|
|
19
|
-
}): boolean | undefined;
|
|
20
|
-
/**
|
|
21
|
-
* Sets multiple key val pairs. It is possible to define a ttl (seconds). Returns true on success.
|
|
22
|
-
*/
|
|
23
|
-
export function setMultiCache(list: any): boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Timestamp in ms representing the time at which the key will expire.
|
|
26
|
-
*/
|
|
27
|
-
export function getExpiration({ key }: {
|
|
28
|
-
key: any;
|
|
29
|
-
}): number | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Redefine the ttl of a key. Returns true if the key has been found and changed. Otherwise returns false. If the ttl-argument isn't passed the default-TTL will be used. The key will be deleted when passing in a ttl < 0. Expiration value 0 mean never expire
|
|
32
|
-
*/
|
|
33
|
-
export function setExpiration({ key, expiration }: {
|
|
34
|
-
key: any;
|
|
35
|
-
expiration: any;
|
|
36
|
-
}): boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Gets a saved value from the cache. Returns a undefined if not found or expired. If the value was found it returns the value.
|
|
39
|
-
*/
|
|
40
|
-
export function getCache({ key }: {
|
|
41
|
-
key: any;
|
|
42
|
-
}): any;
|
|
43
|
-
/**
|
|
44
|
-
* Get all cache keys.
|
|
45
|
-
*/
|
|
46
|
-
export function keys(): string[];
|
|
47
|
-
/**
|
|
48
|
-
* Gets multiple saved values from the cache. Returns an empty object {} if not found or expired. If the value was found it returns an object with the key value pair.
|
|
49
|
-
*/
|
|
50
|
-
export function getMultiCache(list: any): {
|
|
51
|
-
[key: string]: any;
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* Get the cached value and remove the key from the cache.
|
|
55
|
-
*/
|
|
56
|
-
export function takeCache({ key }: {
|
|
57
|
-
key: any;
|
|
58
|
-
}): any;
|
|
59
|
-
/**
|
|
60
|
-
* Delete a key. Returns the number of deleted entries. A delete will never fail.
|
|
61
|
-
*/
|
|
62
|
-
export function deleteCache({ key }: {
|
|
63
|
-
key: any;
|
|
64
|
-
}): number | undefined;
|
|
65
|
-
/**
|
|
66
|
-
* Delete multiple keys. Returns the number of deleted entries. A delete will never fail.
|
|
67
|
-
*/
|
|
68
|
-
export function deleteMultiCache(list: any): number;
|
|
69
|
-
/**
|
|
70
|
-
* Flush all data, it will clear cache pool.
|
|
71
|
-
*/
|
|
72
|
-
export function flushAllCache(): void;
|
|
73
|
-
/**
|
|
74
|
-
* Returns the statistics.
|
|
75
|
-
*/
|
|
76
|
-
export function statisticsCache(): nodeCache.Stats;
|
|
77
|
-
import nodeCache from
|
|
1
|
+
/**
|
|
2
|
+
* Get the runtime cache pool.
|
|
3
|
+
* @returns {nodeCache}
|
|
4
|
+
*/
|
|
5
|
+
export function getCachePool(): nodeCache;
|
|
6
|
+
/**
|
|
7
|
+
* Returns boolean indicating if the key is cached.
|
|
8
|
+
*/
|
|
9
|
+
export function hasCache({ key }: {
|
|
10
|
+
key: any;
|
|
11
|
+
}): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Sets a key value pair. It is possible to define a ttl (in seconds). Returns true on success. Expiration time default is 0, it mean never expire
|
|
14
|
+
*/
|
|
15
|
+
export function setCache({ key, value, expiration }: {
|
|
16
|
+
key: any;
|
|
17
|
+
value: any;
|
|
18
|
+
expiration?: number | undefined;
|
|
19
|
+
}): boolean | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Sets multiple key val pairs. It is possible to define a ttl (seconds). Returns true on success.
|
|
22
|
+
*/
|
|
23
|
+
export function setMultiCache(list: any): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Timestamp in ms representing the time at which the key will expire.
|
|
26
|
+
*/
|
|
27
|
+
export function getExpiration({ key }: {
|
|
28
|
+
key: any;
|
|
29
|
+
}): number | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Redefine the ttl of a key. Returns true if the key has been found and changed. Otherwise returns false. If the ttl-argument isn't passed the default-TTL will be used. The key will be deleted when passing in a ttl < 0. Expiration value 0 mean never expire
|
|
32
|
+
*/
|
|
33
|
+
export function setExpiration({ key, expiration }: {
|
|
34
|
+
key: any;
|
|
35
|
+
expiration: any;
|
|
36
|
+
}): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Gets a saved value from the cache. Returns a undefined if not found or expired. If the value was found it returns the value.
|
|
39
|
+
*/
|
|
40
|
+
export function getCache({ key }: {
|
|
41
|
+
key: any;
|
|
42
|
+
}): any;
|
|
43
|
+
/**
|
|
44
|
+
* Get all cache keys.
|
|
45
|
+
*/
|
|
46
|
+
export function keys(): string[];
|
|
47
|
+
/**
|
|
48
|
+
* Gets multiple saved values from the cache. Returns an empty object {} if not found or expired. If the value was found it returns an object with the key value pair.
|
|
49
|
+
*/
|
|
50
|
+
export function getMultiCache(list: any): {
|
|
51
|
+
[key: string]: any;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Get the cached value and remove the key from the cache.
|
|
55
|
+
*/
|
|
56
|
+
export function takeCache({ key }: {
|
|
57
|
+
key: any;
|
|
58
|
+
}): any;
|
|
59
|
+
/**
|
|
60
|
+
* Delete a key. Returns the number of deleted entries. A delete will never fail.
|
|
61
|
+
*/
|
|
62
|
+
export function deleteCache({ key }: {
|
|
63
|
+
key: any;
|
|
64
|
+
}): number | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Delete multiple keys. Returns the number of deleted entries. A delete will never fail.
|
|
67
|
+
*/
|
|
68
|
+
export function deleteMultiCache(list: any): number;
|
|
69
|
+
/**
|
|
70
|
+
* Flush all data, it will clear cache pool.
|
|
71
|
+
*/
|
|
72
|
+
export function flushAllCache(): void;
|
|
73
|
+
/**
|
|
74
|
+
* Returns the statistics.
|
|
75
|
+
*/
|
|
76
|
+
export function statisticsCache(): nodeCache.Stats;
|
|
77
|
+
import nodeCache from "node-cache";
|
package/es/utils/calculate.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 计算数组平均值
|
|
3
|
-
* @param {Array} array
|
|
4
|
-
*/
|
|
5
|
-
export function averageArray(array: any[]): number;
|
|
1
|
+
/**
|
|
2
|
+
* 计算数组平均值
|
|
3
|
+
* @param {Array} array
|
|
4
|
+
*/
|
|
5
|
+
export function averageArray(array: any[]): number;
|
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check target is invalid
|
|
3
|
-
*/
|
|
4
|
-
export function isInvalid(target: any): boolean;
|
|
5
|
-
/**
|
|
6
|
-
* Check target is datetime
|
|
7
|
-
*/
|
|
8
|
-
export function isDatetime(target: any): boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Check target is number
|
|
11
|
-
*/
|
|
12
|
-
export function isNumber(v: any): boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Check target is money
|
|
15
|
-
*/
|
|
16
|
-
export function isMoney(target: any): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Check both is equal by deep compare. Method supports comparison arrays, array buffers, booleans, date objects, error objects, maps, numbers, Object objects, regexes, sets, strings, symbols and typed arrays. Object values compare properties of the object itself, excluding inherited and enumerable properties. Comparisons between functions and DOM nodes are not supported.
|
|
19
|
-
*/
|
|
20
|
-
export function isEqual(target: any, compareData: any): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Check both is equal by serialize
|
|
23
|
-
*/
|
|
24
|
-
export function isEqualBySerialize(target: any, compareData: any): boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Check target is function
|
|
27
|
-
*/
|
|
28
|
-
export function isFunction(target: any): boolean;
|
|
29
|
-
/**isDateLodash
|
|
30
|
-
* Check target is boolean
|
|
31
|
-
*/
|
|
32
|
-
export function isBoolean(target: any): boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Check target is undefined
|
|
35
|
-
*/
|
|
36
|
-
export function isUndefined(target: any): boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Check target is null
|
|
39
|
-
*/
|
|
40
|
-
export function isNull(target: any): boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Check target is date
|
|
43
|
-
*/
|
|
44
|
-
export function isDate(target: any): boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Check target is string
|
|
47
|
-
*/
|
|
48
|
-
export function isString(target: any): boolean;
|
|
49
|
-
export function isArray(value: any): boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Check target is empty array
|
|
52
|
-
*/
|
|
53
|
-
export function isEmptyArray(value: any): boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Check target is object
|
|
56
|
-
*/
|
|
57
|
-
export function isObject(target: any): boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Check object has any key
|
|
60
|
-
*/
|
|
61
|
-
export function isEmptyObject(target: any): boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Check target is plain object
|
|
64
|
-
*/
|
|
65
|
-
export function isPlainObject(target: any): boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Check target is promise
|
|
68
|
-
*/
|
|
69
|
-
export function isPromise(target: any): boolean;
|
|
70
|
-
/**
|
|
71
|
-
* Check target is url
|
|
72
|
-
*/
|
|
73
|
-
export function isUrl(target: any): boolean;
|
|
74
|
-
/**
|
|
75
|
-
* Check target is base64 image
|
|
76
|
-
*/
|
|
77
|
-
export function isImageBase4(target: any): boolean;
|
|
78
|
-
/**
|
|
79
|
-
* Check value is null or empty string
|
|
80
|
-
* @param {string} target value collection
|
|
81
|
-
*/
|
|
82
|
-
export function checkStringIsNullOrWhiteSpace(target: string): boolean;
|
|
83
|
-
/**
|
|
84
|
-
* Check value is undefined, null or empty object
|
|
85
|
-
* @param {Object} target value collection
|
|
86
|
-
*/
|
|
87
|
-
export function checkObjectIsNullOrEmpty(target: Object): boolean;
|
|
88
|
-
/**
|
|
89
|
-
* Check value in the collection.
|
|
90
|
-
* @param {Array} collection value collection
|
|
91
|
-
* @param {*} target the target value will be checked
|
|
92
|
-
*/
|
|
93
|
-
export function checkInCollection(collection: any[], target: any): boolean;
|
|
94
|
-
/**
|
|
95
|
-
* check date is today
|
|
96
|
-
* @param {Date} date the date will be checked
|
|
97
|
-
*/
|
|
98
|
-
export function isToday(date: Date): boolean;
|
|
99
|
-
/**
|
|
100
|
-
* check datetime between min datetime and max datetime
|
|
101
|
-
* @param {Date} min min datetime
|
|
102
|
-
* @param {Date} max max datetime
|
|
103
|
-
* @param {Date} datetime the datetime will check
|
|
104
|
-
*/
|
|
105
|
-
export function isBetweenDatetime(min: Date, max: Date, datetime: Date): boolean;
|
|
106
|
-
/**
|
|
107
|
-
* check date is weekend
|
|
108
|
-
* @param {Date} date the datetime will check
|
|
109
|
-
*/
|
|
110
|
-
export function isWeekend(date: Date): boolean;
|
|
111
|
-
/**
|
|
112
|
-
* check date in the year
|
|
113
|
-
* @param {Date} date the datetime will check
|
|
114
|
-
* @param {string|number} year year
|
|
115
|
-
*/
|
|
116
|
-
export function inYear(date: Date, year: string | number): boolean;
|
|
117
|
-
/**
|
|
118
|
-
* Check target is async function
|
|
119
|
-
* @param {*} f the function will check
|
|
120
|
-
*/
|
|
121
|
-
export function isAsyncFunction(f: any): boolean;
|
|
1
|
+
/**
|
|
2
|
+
* Check target is invalid
|
|
3
|
+
*/
|
|
4
|
+
export function isInvalid(target: any): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Check target is datetime
|
|
7
|
+
*/
|
|
8
|
+
export function isDatetime(target: any): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Check target is number
|
|
11
|
+
*/
|
|
12
|
+
export function isNumber(v: any): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Check target is money
|
|
15
|
+
*/
|
|
16
|
+
export function isMoney(target: any): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Check both is equal by deep compare. Method supports comparison arrays, array buffers, booleans, date objects, error objects, maps, numbers, Object objects, regexes, sets, strings, symbols and typed arrays. Object values compare properties of the object itself, excluding inherited and enumerable properties. Comparisons between functions and DOM nodes are not supported.
|
|
19
|
+
*/
|
|
20
|
+
export function isEqual(target: any, compareData: any): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Check both is equal by serialize
|
|
23
|
+
*/
|
|
24
|
+
export function isEqualBySerialize(target: any, compareData: any): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Check target is function
|
|
27
|
+
*/
|
|
28
|
+
export function isFunction(target: any): boolean;
|
|
29
|
+
/**isDateLodash
|
|
30
|
+
* Check target is boolean
|
|
31
|
+
*/
|
|
32
|
+
export function isBoolean(target: any): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Check target is undefined
|
|
35
|
+
*/
|
|
36
|
+
export function isUndefined(target: any): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Check target is null
|
|
39
|
+
*/
|
|
40
|
+
export function isNull(target: any): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Check target is date
|
|
43
|
+
*/
|
|
44
|
+
export function isDate(target: any): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Check target is string
|
|
47
|
+
*/
|
|
48
|
+
export function isString(target: any): boolean;
|
|
49
|
+
export function isArray(value: any): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Check target is empty array
|
|
52
|
+
*/
|
|
53
|
+
export function isEmptyArray(value: any): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Check target is object
|
|
56
|
+
*/
|
|
57
|
+
export function isObject(target: any): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Check object has any key
|
|
60
|
+
*/
|
|
61
|
+
export function isEmptyObject(target: any): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Check target is plain object
|
|
64
|
+
*/
|
|
65
|
+
export function isPlainObject(target: any): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Check target is promise
|
|
68
|
+
*/
|
|
69
|
+
export function isPromise(target: any): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Check target is url
|
|
72
|
+
*/
|
|
73
|
+
export function isUrl(target: any): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Check target is base64 image
|
|
76
|
+
*/
|
|
77
|
+
export function isImageBase4(target: any): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Check value is null or empty string
|
|
80
|
+
* @param {string} target value collection
|
|
81
|
+
*/
|
|
82
|
+
export function checkStringIsNullOrWhiteSpace(target: string): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Check value is undefined, null or empty object
|
|
85
|
+
* @param {Object} target value collection
|
|
86
|
+
*/
|
|
87
|
+
export function checkObjectIsNullOrEmpty(target: Object): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Check value in the collection.
|
|
90
|
+
* @param {Array} collection value collection
|
|
91
|
+
* @param {*} target the target value will be checked
|
|
92
|
+
*/
|
|
93
|
+
export function checkInCollection(collection: any[], target: any): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* check date is today
|
|
96
|
+
* @param {Date} date the date will be checked
|
|
97
|
+
*/
|
|
98
|
+
export function isToday(date: Date): boolean;
|
|
99
|
+
/**
|
|
100
|
+
* check datetime between min datetime and max datetime
|
|
101
|
+
* @param {Date} min min datetime
|
|
102
|
+
* @param {Date} max max datetime
|
|
103
|
+
* @param {Date} datetime the datetime will check
|
|
104
|
+
*/
|
|
105
|
+
export function isBetweenDatetime(min: Date, max: Date, datetime: Date): boolean;
|
|
106
|
+
/**
|
|
107
|
+
* check date is weekend
|
|
108
|
+
* @param {Date} date the datetime will check
|
|
109
|
+
*/
|
|
110
|
+
export function isWeekend(date: Date): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* check date in the year
|
|
113
|
+
* @param {Date} date the datetime will check
|
|
114
|
+
* @param {string|number} year year
|
|
115
|
+
*/
|
|
116
|
+
export function inYear(date: Date, year: string | number): boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Check target is async function
|
|
119
|
+
* @param {*} f the function will check
|
|
120
|
+
*/
|
|
121
|
+
export function isAsyncFunction(f: any): boolean;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Build random hex color through configuration such as seeds
|
|
3
|
-
* @param {*} seed
|
|
4
|
-
*/
|
|
5
|
-
export function buildRandomHexColor({ seed }: any): string;
|
|
6
|
-
/**
|
|
7
|
-
* convert hex color to RGB color
|
|
8
|
-
* @param {*} color string -> hex color
|
|
9
|
-
* @param {*} symbol string -> default is 'RGB'
|
|
10
|
-
* @param {*} arrayMode bool -> whether return array type color like [255,255,255]
|
|
11
|
-
*/
|
|
12
|
-
export function buildRGBColorFromHexColor(color: any, symbol?: any, arrayMode?: any): any;
|
|
13
|
-
/**
|
|
14
|
-
* Build hex color like '#E564F2'
|
|
15
|
-
* @param {Object} options options
|
|
16
|
-
* @param {number} options.progress progress
|
|
17
|
-
* @param {string} options.startColor start color like "#11A612"
|
|
18
|
-
* @param {string} options.endColor end color like "#4F5612"
|
|
19
|
-
*/
|
|
20
|
-
export function buildHexColor({ progress, startColor, endColor }: {
|
|
21
|
-
progress: number;
|
|
22
|
-
startColor: string;
|
|
23
|
-
endColor: string;
|
|
24
|
-
}): string;
|
|
25
|
-
/**
|
|
26
|
-
* Build linear gradient css color, direct number value will be converted like '15deg'
|
|
27
|
-
*/
|
|
28
|
-
export function buildLinearGradient({ direct, list }: {
|
|
29
|
-
direct: any;
|
|
30
|
-
list?: any[] | undefined;
|
|
31
|
-
}): string;
|
|
1
|
+
/**
|
|
2
|
+
* Build random hex color through configuration such as seeds
|
|
3
|
+
* @param {*} seed
|
|
4
|
+
*/
|
|
5
|
+
export function buildRandomHexColor({ seed }: any): string;
|
|
6
|
+
/**
|
|
7
|
+
* convert hex color to RGB color
|
|
8
|
+
* @param {*} color string -> hex color
|
|
9
|
+
* @param {*} symbol string -> default is 'RGB'
|
|
10
|
+
* @param {*} arrayMode bool -> whether return array type color like [255,255,255]
|
|
11
|
+
*/
|
|
12
|
+
export function buildRGBColorFromHexColor(color: any, symbol?: any, arrayMode?: any): any;
|
|
13
|
+
/**
|
|
14
|
+
* Build hex color like '#E564F2'
|
|
15
|
+
* @param {Object} options options
|
|
16
|
+
* @param {number} options.progress progress
|
|
17
|
+
* @param {string} options.startColor start color like "#11A612"
|
|
18
|
+
* @param {string} options.endColor end color like "#4F5612"
|
|
19
|
+
*/
|
|
20
|
+
export function buildHexColor({ progress, startColor, endColor }: {
|
|
21
|
+
progress: number;
|
|
22
|
+
startColor: string;
|
|
23
|
+
endColor: string;
|
|
24
|
+
}): string;
|
|
25
|
+
/**
|
|
26
|
+
* Build linear gradient css color, direct number value will be converted like '15deg'
|
|
27
|
+
*/
|
|
28
|
+
export function buildLinearGradient({ direct, list }: {
|
|
29
|
+
direct: any;
|
|
30
|
+
list?: any[] | undefined;
|
|
31
|
+
}): string;
|