asv-hlps 1.2.61 → 1.2.63

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/cjs/utils.js CHANGED
@@ -497,22 +497,23 @@ const sumAmount = (tobs, property) => {
497
497
  };
498
498
  exports.sumAmount = sumAmount;
499
499
  const formatAmountToString = (amount, opt) => {
500
- switch (opt.math) {
500
+ let getAmount = amount;
501
+ switch (opt === null || opt === void 0 ? void 0 : opt.math) {
501
502
  case "ceil":
502
- Math.ceil(amount);
503
+ getAmount = Math.ceil(amount);
503
504
  break;
504
505
  case "floor":
505
- Math.floor(amount);
506
+ getAmount = Math.floor(amount);
506
507
  break;
507
508
  default:
508
- amount;
509
+ getAmount;
509
510
  break;
510
511
  }
511
- switch (opt.currency) {
512
+ switch (opt === null || opt === void 0 ? void 0 : opt.currency) {
512
513
  case "cfa":
513
- return (0, exports.formatToStringCfa)(amount);
514
+ return (0, exports.formatToStringCfa)(getAmount);
514
515
  default:
515
- return (0, exports.formatToString)(amount);
516
+ return (0, exports.formatToString)(getAmount);
516
517
  }
517
518
  };
518
519
  exports.formatAmountToString = formatAmountToString;
package/lib/esm/utils.js CHANGED
@@ -426,21 +426,22 @@ export const sumAmount = (tobs, property) => {
426
426
  }, 0);
427
427
  };
428
428
  export const formatAmountToString = (amount, opt) => {
429
- switch (opt.math) {
429
+ let getAmount = amount;
430
+ switch (opt === null || opt === void 0 ? void 0 : opt.math) {
430
431
  case "ceil":
431
- Math.ceil(amount);
432
+ getAmount = Math.ceil(amount);
432
433
  break;
433
434
  case "floor":
434
- Math.floor(amount);
435
+ getAmount = Math.floor(amount);
435
436
  break;
436
437
  default:
437
- amount;
438
+ getAmount;
438
439
  break;
439
440
  }
440
- switch (opt.currency) {
441
+ switch (opt === null || opt === void 0 ? void 0 : opt.currency) {
441
442
  case "cfa":
442
- return formatToStringCfa(amount);
443
+ return formatToStringCfa(getAmount);
443
444
  default:
444
- return formatToString(amount);
445
+ return formatToString(getAmount);
445
446
  }
446
447
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asv-hlps",
3
- "version": "1.2.61",
3
+ "version": "1.2.63",
4
4
  "description": "helpers",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",