util-helpers 4.12.4 → 4.12.5

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # util-helpers
2
2
 
3
- [![npm][npm]][npm-url] ![GitHub](https://img.shields.io/github/license/doly-dev/util-helpers.svg)
3
+ [![npm][npm]][npm-url] [![Build and Deploy Docs](https://github.com/doly-dev/util-helpers/actions/workflows/ci.yml/badge.svg)](https://github.com/doly-dev/util-helpers/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/doly-dev/util-helpers/branch/master/graph/badge.svg?token=nhm6Zrmmyq)](https://codecov.io/gh/doly-dev/util-helpers) ![npm](https://img.shields.io/npm/dt/util-helpers) ![GitHub](https://img.shields.io/github/license/doly-dev/util-helpers.svg)
4
4
 
5
5
  [util-helpers](https://doly-dev.github.io/util-helpers/index.html) 是一个基于业务场景的工具方法库。
6
6
 
@@ -562,7 +562,7 @@
562
562
  return lastCode === checkCode;
563
563
  }
564
564
 
565
- const version = "4.12.4";
565
+ const version = "4.12.5";
566
566
 
567
567
  var config = {
568
568
  // 禁用warning提示
@@ -1676,18 +1676,13 @@
1676
1676
  ret = Number.NaN;
1677
1677
  }
1678
1678
  } else if (isSymbol(value)) {
1679
- ret = Number.NaN;
1680
- } else if (!isNumber(value)) {
1681
- // 其余非数字类型通过 Number 转换
1682
1679
  // 例如 Symbol 包装器对象将会报错
1683
1680
  // symObj = Object(Symbol());
1684
1681
  // Number(symObj); // TypeError: Cannot convert a Symbol value to a number
1685
- try {
1686
- ret = Number(value);
1687
- } catch (err) {
1688
- ret = Number.NaN;
1689
- console.error(err);
1690
- }
1682
+ ret = Number.NaN;
1683
+ } else if (!isNumber(value)) {
1684
+ // 其余非数字类型通过 Number 转换
1685
+ ret = Number(value);
1691
1686
  } else {
1692
1687
  ret = value;
1693
1688
  }