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 CHANGED
@@ -1,8 +1,3 @@
1
1
  export * from "./Utility/Utility";
2
2
  export * from "./User/User";
3
3
  export * from "./Math/Math";
4
-
5
- /** 提取单个函数的参数类型 */
6
- export type ExtractParameters<T> = T extends (...args: infer P) => any
7
- ? P
8
- : never;
@@ -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 完整模板 --> yyyy MM DD hh mm ss ms
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: ExtractParameters<T>) => void;
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: ExtractParameters<T>) => void;
172
+ ): (...args: Parameters<T>) => void;
175
173
 
176
174
  /**
177
175
  * 数据类型
@@ -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 完整模板 --> yyyy MM DD hh mm ss ms
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
- yyyy: "getFullYear",
134
+ YYYY: "getFullYear",
135
135
  MM: "getMonth",
136
136
  DD: "getDate",
137
137
  hh: "getHours",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nhanh-pure-function",
3
- "version": "1.3.12",
3
+ "version": "1.3.13",
4
4
  "description": "纯函数工具",
5
5
  "main": "lib/Index.js",
6
6
  "scripts": {