nhanh-pure-function 1.3.12 → 1.3.13
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 +0 -5
- package/lib/Utility/Utility.d.ts +3 -5
- package/lib/Utility/Utility.js +2 -2
- package/package.json +1 -1
package/lib/Index.d.ts
CHANGED
package/lib/Utility/Utility.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { ExtractParameters } from "../Index";
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* 非null | undefined判断
|
|
5
3
|
* @param value any
|
|
@@ -62,7 +60,7 @@ export function _MergeObjects<T, T1>(A: T, B: T1): T & T1;
|
|
|
62
60
|
/**
|
|
63
61
|
* 时间戳转换字符串
|
|
64
62
|
* @param {Number | Date} time 时间戳或Date对象
|
|
65
|
-
* @param {String} template 完整模板 -->
|
|
63
|
+
* @param {String} template 完整模板 --> YYYY MM DD hh mm ss ms
|
|
66
64
|
* @param {Boolean} pad 补0
|
|
67
65
|
*/
|
|
68
66
|
export function _TimeTransition(
|
|
@@ -160,7 +158,7 @@ export function _GenerateUUID(prefix?: string): string;
|
|
|
160
158
|
export function _Debounce<T extends Function>(
|
|
161
159
|
fn: T,
|
|
162
160
|
delay: number
|
|
163
|
-
): (...args:
|
|
161
|
+
): (...args: Parameters<T>) => void;
|
|
164
162
|
|
|
165
163
|
/**
|
|
166
164
|
* 节流
|
|
@@ -171,7 +169,7 @@ export function _Debounce<T extends Function>(
|
|
|
171
169
|
export function _Throttle<T extends Function>(
|
|
172
170
|
fn: T,
|
|
173
171
|
delay: number
|
|
174
|
-
): (...args:
|
|
172
|
+
): (...args: Parameters<T>) => void;
|
|
175
173
|
|
|
176
174
|
/**
|
|
177
175
|
* 数据类型
|
package/lib/Utility/Utility.js
CHANGED
|
@@ -120,7 +120,7 @@ export function _MergeObjects(A, B, visitedObjects = []) {
|
|
|
120
120
|
/**
|
|
121
121
|
* 时间戳转换字符串
|
|
122
122
|
* @param {Number | Date} time 时间戳或Date对象
|
|
123
|
-
* @param {String} template 完整模板 -->
|
|
123
|
+
* @param {String} template 完整模板 --> YYYY MM DD hh mm ss ms
|
|
124
124
|
* @param {Boolean} pad 补0
|
|
125
125
|
*/
|
|
126
126
|
export function _TimeTransition(time, template, pad = true) {
|
|
@@ -131,7 +131,7 @@ export function _TimeTransition(time, template, pad = true) {
|
|
|
131
131
|
return "";
|
|
132
132
|
}
|
|
133
133
|
const dictionary = {
|
|
134
|
-
|
|
134
|
+
YYYY: "getFullYear",
|
|
135
135
|
MM: "getMonth",
|
|
136
136
|
DD: "getDate",
|
|
137
137
|
hh: "getHours",
|