util-helpers 4.0.7 → 4.0.8

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/types/minus.d.ts CHANGED
@@ -5,9 +5,7 @@ export default minus;
5
5
  * @static
6
6
  * @alias module:Math.minus
7
7
  * @since 3.1.0
8
- * @param {number|string} num1 相减的第一个数
9
- * @param {number|string} num2 相减的第二个数
10
- * @param {...number|string} others 相减的第其余数
8
+ * @param {...number|string} nums 相减的数
11
9
  * @returns {number} 差
12
10
  * @example
13
11
  *
@@ -20,4 +18,4 @@ export default minus;
20
18
  * minus(1, 0.9, 0.02, 0.08);
21
19
  * // => 0
22
20
  */
23
- declare function minus(num1: number | string, num2: number | string, ...others: (number | string)[]): number;
21
+ declare function minus(...nums: (number | string)[]): number;
package/types/plus.d.ts CHANGED
@@ -5,9 +5,7 @@ export default plus;
5
5
  * @static
6
6
  * @alias module:Math.plus
7
7
  * @since 3.1.0
8
- * @param {number|string} num1 相加的第一个数
9
- * @param {number|string} num2 相加的第二个数
10
- * @param {...number|string} others 相加的其余数
8
+ * @param {...number|string} nums 相加的数
11
9
  * @returns {number} 总和
12
10
  * @example
13
11
  *
@@ -20,4 +18,4 @@ export default plus;
20
18
  * plus(0.1, 0.2, 0.3, 0.4);
21
19
  * // => 1
22
20
  */
23
- declare function plus(num1: number | string, num2: number | string, ...others: (number | string)[]): number;
21
+ declare function plus(...nums: (number | string)[]): number;
package/types/times.d.ts CHANGED
@@ -5,9 +5,7 @@ export default times;
5
5
  * @static
6
6
  * @alias module:Math.times
7
7
  * @since 3.1.0
8
- * @param {number|string} num1 相乘的第一个数
9
- * @param {number|string} num2 相乘的第二个数
10
- * @param {...number|string} others 相乘的其余数
8
+ * @param {...number|string} nums 相乘的数
11
9
  * @returns {number} 乘积
12
10
  * @example
13
11
  *
@@ -20,4 +18,4 @@ export default times;
20
18
  * times(3, 0.6, 2, 10);
21
19
  * // => 36
22
20
  */
23
- declare function times(num1: number | string, num2: number | string, ...others: (number | string)[]): number;
21
+ declare function times(...nums: (number | string)[]): number;
@@ -3,6 +3,6 @@ export default convertToString;
3
3
  * 转换为字符串
4
4
  *
5
5
  * @param {*} value 值
6
- * @returns 字符串
6
+ * @returns {string} 字符串
7
7
  */
8
- declare function convertToString(value: any): any;
8
+ declare function convertToString(value: any): string;
@@ -36,6 +36,13 @@ export function float2Fixed(num: number | string): number;
36
36
  * @returns
37
37
  */
38
38
  export function checkBoundary(num: number): void;
39
+ /**
40
+ * 去掉左边数字0
41
+ *
42
+ * @param {string} num 数字字符串
43
+ * @returns {string}
44
+ */
45
+ export function trimLeftZero(num: string): string;
39
46
  /**
40
47
  * 科学计数法转换成普通数字
41
48
  *