typedconverter
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -29,4 +29,8 @@ "use strict"; | ||
const value = safeToString(rawValue); | ||
if (value === "") | ||
return; | ||
const result = Number(value); | ||
return isNaN(result) ? undefined : result; | ||
if (isNaN(result)) | ||
return; | ||
return result; | ||
} | ||
@@ -33,0 +37,0 @@ function dateConverter(rawValue) { |
@@ -36,3 +36,3 @@ "use strict"; | ||
function isEmpty(result) { | ||
return (result.value === undefined || result.value === null) && result.issues === undefined; | ||
return (result.value === "" || result.value === undefined || result.value === null) && result.issues === undefined; | ||
} | ||
@@ -39,0 +39,0 @@ // --------------------------------------------------------------------- // |
{ | ||
"name": "typedconverter", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Convert object into classes match with TypeScript type annotation", | ||
@@ -24,7 +24,7 @@ "main": "lib/index.js", | ||
"tslib": "^1.10.0", | ||
"validator": "^11.1.0" | ||
"validator": "^12.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/ejs": "^2.6.3", | ||
"@types/jest": "^24.0.19", | ||
"@types/jest": "^24.0.21", | ||
"@types/joi": "^14.3.3", | ||
@@ -31,0 +31,0 @@ "coveralls": "^3.0.7", |
39737
812
+ Addedvalidator@12.2.0(transitive)
- Removedvalidator@11.1.0(transitive)
Updatedvalidator@^12.0.0