lgutils 1.3.13 → 1.3.14
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/index.d.ts +15 -26
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -20,12 +20,10 @@ export declare const download: (
|
|
|
20
20
|
data: string,
|
|
21
21
|
strFileName?: string,
|
|
22
22
|
strMimeType?: string,
|
|
23
|
-
isImgUrl?: boolean | undefined
|
|
23
|
+
isImgUrl?: boolean | undefined,
|
|
24
24
|
) => true | undefined
|
|
25
25
|
|
|
26
|
-
export declare const fileReaderToBase64: (
|
|
27
|
-
target: any
|
|
28
|
-
) => (cb: (p: any) => void) => void
|
|
26
|
+
export declare const fileReaderToBase64: (target: any) => (cb: (p: any) => void) => void
|
|
29
27
|
|
|
30
28
|
export declare const format10k: (n: number) => string
|
|
31
29
|
|
|
@@ -40,7 +38,7 @@ export declare const formatCash: (
|
|
|
40
38
|
| number
|
|
41
39
|
| {
|
|
42
40
|
valueOf(): number
|
|
43
|
-
}
|
|
41
|
+
},
|
|
44
42
|
) => string
|
|
45
43
|
|
|
46
44
|
export declare const formatCash2: (num: number) => string
|
|
@@ -50,7 +48,7 @@ export declare const formatCashInt: (
|
|
|
50
48
|
| number
|
|
51
49
|
| {
|
|
52
50
|
valueOf(): number
|
|
53
|
-
}
|
|
51
|
+
},
|
|
54
52
|
) => string
|
|
55
53
|
|
|
56
54
|
export declare const formatCashIntNil: (
|
|
@@ -59,7 +57,7 @@ export declare const formatCashIntNil: (
|
|
|
59
57
|
| {
|
|
60
58
|
valueOf(): number
|
|
61
59
|
}
|
|
62
|
-
| NIL
|
|
60
|
+
| NIL,
|
|
63
61
|
) => string
|
|
64
62
|
|
|
65
63
|
export declare const formatCashNil: (
|
|
@@ -68,17 +66,12 @@ export declare const formatCashNil: (
|
|
|
68
66
|
| {
|
|
69
67
|
valueOf(): number
|
|
70
68
|
}
|
|
71
|
-
| NIL
|
|
69
|
+
| NIL,
|
|
72
70
|
) => string
|
|
73
71
|
|
|
74
|
-
export declare function formatDate(
|
|
75
|
-
d: string | number,
|
|
76
|
-
formatType?: string
|
|
77
|
-
): string
|
|
72
|
+
export declare function formatDate(d: string | number, formatType?: string): string
|
|
78
73
|
|
|
79
|
-
export declare const formatDateNil: (
|
|
80
|
-
d: string | number | null | undefined
|
|
81
|
-
) => string
|
|
74
|
+
export declare const formatDateNil: (d: string | number | null | undefined) => string
|
|
82
75
|
|
|
83
76
|
export declare function formatDuration(period: string): string
|
|
84
77
|
|
|
@@ -89,7 +82,7 @@ export declare const formatRatio: (
|
|
|
89
82
|
| number
|
|
90
83
|
| {
|
|
91
84
|
valueOf(): number
|
|
92
|
-
}
|
|
85
|
+
},
|
|
93
86
|
) => string
|
|
94
87
|
|
|
95
88
|
export declare const formatRatioNil: (
|
|
@@ -98,7 +91,7 @@ export declare const formatRatioNil: (
|
|
|
98
91
|
| {
|
|
99
92
|
valueOf(): number
|
|
100
93
|
}
|
|
101
|
-
| NIL
|
|
94
|
+
| NIL,
|
|
102
95
|
) => string
|
|
103
96
|
|
|
104
97
|
export declare const getBase64: (file: File) => Promise<unknown>
|
|
@@ -179,31 +172,27 @@ export declare const removeItem: (key: string) => any
|
|
|
179
172
|
|
|
180
173
|
export declare const setItem: (key: string, value: any) => any
|
|
181
174
|
|
|
182
|
-
export declare const setProxyObj: (
|
|
183
|
-
data: object,
|
|
184
|
-
getFn: () => void,
|
|
185
|
-
setFn: () => void
|
|
186
|
-
) => object
|
|
175
|
+
export declare const setProxyObj: (data: object, getFn: () => void, setFn: () => void) => object
|
|
187
176
|
|
|
188
177
|
export declare const sortObj: <
|
|
189
178
|
T extends keyof D,
|
|
190
179
|
D extends {
|
|
191
180
|
[key: string]: any
|
|
192
|
-
}
|
|
181
|
+
},
|
|
193
182
|
>(
|
|
194
183
|
obj: D[],
|
|
195
184
|
property: T,
|
|
196
|
-
type?: 'asc' | 'desc'
|
|
185
|
+
type?: 'asc' | 'desc',
|
|
197
186
|
) => D[]
|
|
198
187
|
|
|
199
188
|
export declare const sumObj: <
|
|
200
189
|
T extends keyof D,
|
|
201
190
|
D extends {
|
|
202
191
|
[key: string]: any
|
|
203
|
-
}
|
|
192
|
+
},
|
|
204
193
|
>(
|
|
205
194
|
obj: D[],
|
|
206
|
-
key: T
|
|
195
|
+
key: T,
|
|
207
196
|
) => number
|
|
208
197
|
|
|
209
198
|
export declare const trimString: (str: string) => string
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lgutils",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.14",
|
|
4
4
|
"description": "lgutils",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "lib/lgutils.cjs.prod.js",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"@types/moment": "^2.13.0",
|
|
36
36
|
"@types/qs": "^6.9.0"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "fbb1ea34dd1cea2f1261f1606b57f6ba63c6a0af"
|
|
39
39
|
}
|