@etainabl/nodejs-sdk 1.3.139 → 1.3.141

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/dist/esm/index.js CHANGED
@@ -868,7 +868,7 @@ var convertItems = (items, type, defaultUnits, accountFactor) => {
868
868
  return convertedItems;
869
869
  };
870
870
  var simpleConvert = (value, fromUnit, toUnit) => {
871
- if (!value) throw new Error("Value is required");
871
+ if (typeof value !== "number" || isNaN(value)) throw new Error("Value must be a valid number");
872
872
  if (!fromUnit) throw new Error("From unit is required");
873
873
  if (!toUnit) throw new Error("To unit is required");
874
874
  const conversionFactor = _getConversionFactor(fromUnit, toUnit);