@pisell/utils 1.0.18 → 1.0.19

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/es/format.js CHANGED
@@ -15,7 +15,7 @@ export var formatAmount = function formatAmount() {
15
15
  var precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
16
16
  var symbol = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
17
17
  // 校验格式
18
- if (!isString(amount) || !isNumber(amount)) {
18
+ if (!isString(amount) && !isNumber(amount)) {
19
19
  console.error('amount is not a number');
20
20
  return amount;
21
21
  }
package/lib/format.js CHANGED
@@ -24,7 +24,7 @@ __export(format_exports, {
24
24
  module.exports = __toCommonJS(format_exports);
25
25
  var import_typeUtils = require("./typeUtils");
26
26
  var formatAmount = (amount = 0, precision = 2, symbol = "") => {
27
- if (!(0, import_typeUtils.isString)(amount) || !(0, import_typeUtils.isNumber)(amount)) {
27
+ if (!(0, import_typeUtils.isString)(amount) && !(0, import_typeUtils.isNumber)(amount)) {
28
28
  console.error("amount is not a number");
29
29
  return amount;
30
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/utils",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "sideEffects": false,
5
5
  "main": "./lib/index.js",
6
6
  "module": "./es/index.js",