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 +1 -1
- package/dist/util-helpers.js +5 -10
- package/dist/util-helpers.js.map +1 -1
- package/dist/util-helpers.min.js +1 -1
- package/dist/util-helpers.min.js.map +1 -1
- package/esm/utils/config.js +1 -1
- package/esm/utils/math.util.js +4 -9
- package/lib/utils/config.js +1 -1
- package/lib/utils/math.util.js +4 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# util-helpers
|
|
2
2
|
|
|
3
|
-
[![npm][npm]][npm-url] 
|
|
3
|
+
[![npm][npm]][npm-url] [](https://github.com/doly-dev/util-helpers/actions/workflows/ci.yml) [](https://codecov.io/gh/doly-dev/util-helpers)  
|
|
4
4
|
|
|
5
5
|
[util-helpers](https://doly-dev.github.io/util-helpers/index.html) 是一个基于业务场景的工具方法库。
|
|
6
6
|
|
package/dist/util-helpers.js
CHANGED
|
@@ -562,7 +562,7 @@
|
|
|
562
562
|
return lastCode === checkCode;
|
|
563
563
|
}
|
|
564
564
|
|
|
565
|
-
const version = "4.12.
|
|
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
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
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
|
}
|