openapi-request-coercer
Advanced tools
Comparing version 2.2.1 to 2.3.0
@@ -7,2 +7,6 @@ # openapi-request-coercer Changelog | ||
## 2.3.0 - 2019-03-19 | ||
### Fixed | ||
- Don't coerce numbers that cannot be converted (#371) | ||
## 2.2.1 - 2019-01-31 | ||
@@ -9,0 +13,0 @@ ### Added |
@@ -96,4 +96,10 @@ "use strict"; | ||
}, | ||
integer: function (input) { return Math.floor(Number(input)); }, | ||
number: function (input) { return Number(input); }, | ||
integer: function (input) { | ||
var result = Math.floor(Number(input)); | ||
return isNaN(result) ? input : result; | ||
}, | ||
number: function (input) { | ||
var result = Number(input); | ||
return isNaN(result) ? input : result; | ||
}, | ||
string: function (input) { return String(input); } | ||
@@ -100,0 +106,0 @@ }; |
{ | ||
"name": "openapi-request-coercer", | ||
"version": "2.2.1", | ||
"version": "2.3.0", | ||
"description": "Coerce request properties according to an openapi parameter list.", | ||
@@ -10,3 +10,3 @@ "main": "./dist/index.js", | ||
"prepare": "tsc", | ||
"test-watch": "mocha --watch-extensions ts -w", | ||
"test-watch": "tsc && mocha --watch-extensions ts -w", | ||
"test": "mocha", | ||
@@ -13,0 +13,0 @@ "travis-test": "npm run cover" |
Sorry, the diff of this file is not supported yet
22916
257