@signalplus/params-about 1.0.6-alpha1 → 1.0.7-alpha1

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.
Files changed (2) hide show
  1. package/lib/es/index.js +13 -13
  2. package/package.json +1 -1
package/lib/es/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Bundle of @signalplus/params-about
3
- * Generated: 2023-05-19
4
- * Version: 1.0.6-alpha1
3
+ * Generated: 2023-08-16
4
+ * Version: 1.0.7-alpha1
5
5
  * License: MIT
6
6
  * Author: 2631541504@qq.com
7
7
  */
@@ -297,7 +297,7 @@ function expiriesValidator(val) {
297
297
 
298
298
  if (error) {
299
299
  // return { [i]: error }
300
- return "The ".concat(i + 1, "th item: ").concat(error);
300
+ return "The ".concat(i + 1).concat(i === 1 ? 'nd' : i === 2 ? 'rd' : 'th', " item: ").concat(error);
301
301
  }
302
302
  }
303
303
 
@@ -1646,7 +1646,7 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
1646
1646
  var index = $val.findIndex(function ($it) {
1647
1647
  return !$it.trim();
1648
1648
  });
1649
- if (index > -1) return "The ".concat(index + 1, "th item: should not be empty");
1649
+ if (index > -1) return "The ".concat(index + 1).concat(index === 1 ? 'nd' : index === 2 ? 'rd' : 'th', " item: should not be empty");
1650
1650
  return '';
1651
1651
  },
1652
1652
  sort: 7
@@ -1669,15 +1669,15 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
1669
1669
  if (isNullLike(val.expiry) && isNullLike(val.value)) return '';
1670
1670
 
1671
1671
  if (error) {
1672
- return "Expiry field of the ".concat(i + 1, "th item: ").concat(error);
1672
+ return "Expiry field of the ".concat(i + 1).concat(i === 1 ? 'nd' : i === 2 ? 'rd' : 'th', " item: ").concat(error);
1673
1673
  }
1674
1674
 
1675
1675
  if (isNullLike(val.expiry) && !isNullLike(val.value)) {
1676
- return "The ".concat(i + 1, "th item: expiry shold not be empty");
1676
+ return "The ".concat(i + 1).concat(i === 1 ? 'nd' : i === 2 ? 'rd' : 'th', " item: expiry should not be empty");
1677
1677
  }
1678
1678
 
1679
1679
  if (!isNullLike(val.expiry) && isNullLike(val.value)) {
1680
- return "The ".concat(i + 1, "th item: value shold not be empty");
1680
+ return "The ".concat(i + 1).concat(i === 1 ? 'nd' : i === 2 ? 'rd' : 'th', " item: value should not be empty");
1681
1681
  }
1682
1682
  }
1683
1683
 
@@ -1697,24 +1697,24 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
1697
1697
 
1698
1698
  if (error) {
1699
1699
  // return { [i]: { expire: error } }
1700
- return "Expiry field of the ".concat(i + 1, "th item: ").concat(error);
1700
+ return "Expiry field of the ".concat(i + 1).concat(i === 1 ? 'nd' : i === 2 ? 'rd' : 'th', " item: ").concat(error);
1701
1701
  }
1702
1702
 
1703
1703
  if ((isNullLike(val === null || val === void 0 ? void 0 : val.minAumPercentage) || isNullLike(val === null || val === void 0 ? void 0 : val.maxAumPercentage)) && (isNullLike(val === null || val === void 0 ? void 0 : val.minAbs) || isNullLike(val === null || val === void 0 ? void 0 : val.maxAbs))) {
1704
1704
  // return {
1705
1705
  // [i]: 'at least one parameter must be specified between AUM and ABS',
1706
1706
  // }
1707
- return "The ".concat(i + 1, "th item: at least one parameter must be specified between AUM and ABS");
1707
+ return "The ".concat(i + 1).concat(i === 1 ? 'nd' : i === 2 ? 'rd' : 'th', " item: at least one parameter must be specified between AUM and ABS");
1708
1708
  }
1709
1709
 
1710
1710
  if ((!isNullLike(val === null || val === void 0 ? void 0 : val.minAbs) || !isNullLike(val === null || val === void 0 ? void 0 : val.maxAbs)) && +val.minAbs >= +val.maxAbs) // return { [i]: { minAbs: 'Min ABS should smaller than Max ABS' } }
1711
- return "The ".concat(i + 1, "th item: Min ABS should smaller than Max ABS");
1711
+ return "The ".concat(i + 1).concat(i === 1 ? 'nd' : i === 2 ? 'rd' : 'th', " item: Min ABS should smaller than Max ABS");
1712
1712
 
1713
1713
  if ((!isNullLike(val === null || val === void 0 ? void 0 : val.minAumPercentage) || !isNullLike(val === null || val === void 0 ? void 0 : val.maxAumPercentage)) && +val.minAumPercentage >= +val.maxAumPercentage) {
1714
1714
  // return {
1715
1715
  // [i]: { minAumPercentage: 'Min AUM should smaller than Max AUM' },
1716
1716
  // }
1717
- return "The ".concat(i + 1, "th item: Min AUM should smaller than Max AUM");
1717
+ return "The ".concat(i + 1).concat(i === 1 ? 'nd' : i === 2 ? 'rd' : 'th', " item: Min AUM should smaller than Max AUM");
1718
1718
  }
1719
1719
  }
1720
1720
 
@@ -1733,11 +1733,11 @@ var ParamTypeConfig = (_ParamTypeConfig = {}, _defineProperty(_ParamTypeConfig,
1733
1733
  if (isNullLike(val.instrument) && isNullLike(val.value)) return '';
1734
1734
 
1735
1735
  if (isNullLike(val.instrument) && !isNullLike(val.value)) {
1736
- return "The ".concat(i + 1, "th item: instrument shold not be empty");
1736
+ return "The ".concat(i + 1).concat(i === 1 ? 'nd' : i === 2 ? 'rd' : 'th', " item: instrument shold not be empty");
1737
1737
  }
1738
1738
 
1739
1739
  if (!isNullLike(val.instrument) && isNullLike(val.value)) {
1740
- return "The ".concat(i + 1, "th item: value shold not be empty");
1740
+ return "The ".concat(i + 1).concat(i === 1 ? 'nd' : i === 2 ? 'rd' : 'th', " item: value shold not be empty");
1741
1741
  }
1742
1742
  }
1743
1743
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalplus/params-about",
3
- "version": "1.0.6-alpha1",
3
+ "version": "1.0.7-alpha1",
4
4
  "description": "A description for the module",
5
5
  "main": "./lib/umd/index.js",
6
6
  "module": "./lib/es/index.js",