@nano-lib/util 1.0.9 → 1.0.11
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/lib/index.d.ts +7 -19
- package/lib/index.js +116 -116
- package/lib/index.mjs +859 -852
- package/lib/utils/face.d.ts +7 -9
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { default as scrollTo } from './utils/scroll';
|
|
2
2
|
import { uuid, randomNum } from './utils/random';
|
|
3
3
|
import { parseTime, getTimeDistance, getDayRange } from './utils/date';
|
|
4
|
-
import { addResizeListener, removeResizeListener } from './utils/event';
|
|
5
4
|
import { addClass, removeClass, hasClass, toggleClass, noContextmenu, useRafThrottle } from './utils/element';
|
|
6
5
|
import { encodeURIToParams, paramsToQueryString, queryStringToParams, errorCodeToString, YNToString, HNToString, valueToLabel, chargeToLabel, cascaderToLabel, multipleSelectToLabel, phoneToAsterisk, idNumberToAsterisk, firstLetterToUpperCase, firstLetterToLowerCase } from './utils/to';
|
|
7
6
|
import { validHttp, validExternal, validString, validNumberStr, validEmptyObject, validURL, validPassword, validEmail, validIdNumber, validPhone, validTel } from './utils/valid';
|
|
8
|
-
|
|
7
|
+
export { addResizeListener, removeResizeListener } from './utils/event';
|
|
8
|
+
export { loadFaceModels, faceapiLivingEvent, faceapiLivingEventHint, getFaceGestureResult, getFaceLandmarks, getFaceVideoFrame } from './utils/face';
|
|
9
9
|
export { NOOP, debounce, sleep, countdownTimer, creatCancelTask, downloadFile, getRandomItemInArray, getFullUrl, getArrayFullUrl, getGenderByIdNumber, getBirthdayByIdNumber, getPercentage, trimArray, loadCss, loadJs } from './utils/common';
|
|
10
10
|
export declare const CONSTANTS: {
|
|
11
11
|
DATE_VALUE_FORMAT: Map<string, "YYYY-MM-DD" | "YYYY-MM-DD HH:mm:ss" | "YYYY-MM" | "YYYY" | "HH:mm:ss">;
|
|
@@ -14,14 +14,6 @@ export declare const CONSTANTS: {
|
|
|
14
14
|
DOC_TYPE: string[];
|
|
15
15
|
FILE_TYPE: string[];
|
|
16
16
|
};
|
|
17
|
-
export declare const faceUtil: {
|
|
18
|
-
loadModels: typeof loadModels;
|
|
19
|
-
faceapiLivingEvent: import('./utils/face').FaceapiGesture[];
|
|
20
|
-
faceapiLivingEventHint: Record<import('./utils/face').FaceapiGesture, string>;
|
|
21
|
-
getFaceGestureResult: typeof getFaceGestureResult;
|
|
22
|
-
getFaceLandmarks: typeof getFaceLandmarks;
|
|
23
|
-
captureVideoFrame: typeof captureVideoFrame;
|
|
24
|
-
};
|
|
25
17
|
export declare const toUtil: {
|
|
26
18
|
encodeURIToParams: typeof encodeURIToParams;
|
|
27
19
|
paramsToQueryString: typeof paramsToQueryString;
|
|
@@ -60,6 +52,11 @@ export declare const elementUtil: {
|
|
|
60
52
|
noContextmenu: typeof noContextmenu;
|
|
61
53
|
useRafThrottle: typeof useRafThrottle;
|
|
62
54
|
};
|
|
55
|
+
export declare const dateUtil: {
|
|
56
|
+
parseTime: typeof parseTime;
|
|
57
|
+
getTimeDistance: typeof getTimeDistance;
|
|
58
|
+
getDayRange: typeof getDayRange;
|
|
59
|
+
};
|
|
63
60
|
export declare const cacheUtil: {
|
|
64
61
|
local: {
|
|
65
62
|
set(key: string, value: string): void;
|
|
@@ -78,16 +75,7 @@ export declare const cacheUtil: {
|
|
|
78
75
|
clear(): void;
|
|
79
76
|
};
|
|
80
77
|
};
|
|
81
|
-
export declare const eventUtil: {
|
|
82
|
-
addResizeListener: typeof addResizeListener;
|
|
83
|
-
removeResizeListener: typeof removeResizeListener;
|
|
84
|
-
};
|
|
85
78
|
export declare const randomUtil: {
|
|
86
79
|
uuid: typeof uuid;
|
|
87
80
|
randomNum: typeof randomNum;
|
|
88
81
|
};
|
|
89
|
-
export declare const dateUtil: {
|
|
90
|
-
parseTime: typeof parseTime;
|
|
91
|
-
getTimeDistance: typeof getTimeDistance;
|
|
92
|
-
getDayRange: typeof getDayRange;
|
|
93
|
-
};
|