@etainabl/nodejs-sdk 1.3.140 → 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 +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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 (
|
|
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);
|