@hestia-earth/schema-convert 33.3.0 → 33.5.0
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/json.js +2 -1
- package/package.json +1 -1
package/json.js
CHANGED
|
@@ -353,8 +353,9 @@ var schemaRefValue = function (value, type) {
|
|
|
353
353
|
? { term: { name: value } }
|
|
354
354
|
: { id: value };
|
|
355
355
|
};
|
|
356
|
+
var isSemver = function (value) { return value.match(/^[\d]+\.[\d]+\.[\d]+$/) !== null; };
|
|
356
357
|
var cleanStringValue = function (value) {
|
|
357
|
-
return (
|
|
358
|
+
return ((0, utils_1.isNumber)(value) && !isSemver(value) ? value.replace(/\.0$/, '') : value).trim();
|
|
358
359
|
};
|
|
359
360
|
exports.cleanStringValue = cleanStringValue;
|
|
360
361
|
var propertyTypeToValue = {
|