devix 0.0.20 → 0.0.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/dist/index.cjs.js +156 -4
- package/dist/index.d.ts +43 -16
- package/dist/index.esm.js +155 -3
- package/dist/index.umd.js +156 -4
- package/package.json +13 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,27 +1,52 @@
|
|
|
1
|
+
//! format types
|
|
1
2
|
interface ITimerObj {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
year: string
|
|
4
|
+
month: string
|
|
5
|
+
day: string
|
|
6
|
+
hours: string
|
|
7
|
+
minutes: string
|
|
8
|
+
seconds: string
|
|
9
|
+
week: string
|
|
10
|
+
weekNum: string
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
+
|
|
13
|
+
type TFormatTimer = (
|
|
14
|
+
cellValue: string | number | Date,
|
|
15
|
+
formatType?: string
|
|
16
|
+
) => string | ITimerObj
|
|
17
|
+
|
|
18
|
+
//! retalimit types
|
|
12
19
|
type ThrottleOptions = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
leading?: boolean
|
|
21
|
+
trailing?: boolean
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface TestServerOption {
|
|
25
|
+
url: string
|
|
26
|
+
method: string
|
|
27
|
+
handler: (ctx: any, next: any) => any
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface ITestServerOptions {
|
|
31
|
+
routes?: Array<TestServerOption>
|
|
32
|
+
}
|
|
33
|
+
type TIsType = (type: string, target: any) => boolean
|
|
34
|
+
|
|
35
|
+
//! other types
|
|
36
|
+
type Tcase = 'upper' | 'lower'
|
|
37
|
+
type TCases = [Tcase, Tcase]
|
|
38
|
+
type TTransGetParams = (params: IDataObject) => string
|
|
39
|
+
interface IDataObject {
|
|
40
|
+
[key: string]: any
|
|
41
|
+
}
|
|
18
42
|
|
|
19
43
|
declare function currying(fn: Function): (this: any, ...args: any[]) => any;
|
|
20
44
|
declare function compose(...fns: Function[]): ((this: any, ...args: any[]) => any) | undefined;
|
|
21
45
|
declare function insertStr(soure: string, start: number, newStr: string): string;
|
|
22
46
|
declare function stringCase(soure: string, separa?: string[], cases?: TCases): string;
|
|
47
|
+
declare const transformGetParams: TTransGetParams;
|
|
23
48
|
|
|
24
|
-
declare const isType:
|
|
49
|
+
declare const isType: TIsType;
|
|
25
50
|
|
|
26
51
|
declare enum CacheType {
|
|
27
52
|
Local = 0,
|
|
@@ -66,4 +91,6 @@ declare function setTimer(execute: (...args: any[]) => any, delay?: number, imme
|
|
|
66
91
|
cancel: () => void;
|
|
67
92
|
}>;
|
|
68
93
|
|
|
69
|
-
|
|
94
|
+
declare const createTestServer: (options?: ITestServerOptions) => any;
|
|
95
|
+
|
|
96
|
+
export { SortType, bubblingSort, compose, createTestServer, currying, debounce, deepClone, formatTimer, insertStr, isType, localCache, sessionCache, setTimer, shallowClone, stringCase, throttle, transformGetParams };
|