aws-lambda-middleware
Advanced tools
Comparing version 0.8.0 to 0.8.1
{ | ||
"name": "aws-lambda-middleware", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"engines": { | ||
@@ -5,0 +5,0 @@ "node": ">=8.3.0" |
@@ -275,5 +275,6 @@ # aws-lambda-middleware | ||
#### 0.8.0 | ||
#### 0.8.1 | ||
- PropTypes.*.default, Added ability to set the value returned from a function as a default value. | ||
- body parser improvements | ||
- PropTypes.addRules bug fix | ||
@@ -280,0 +281,0 @@ #### 0.7.1 |
@@ -15,3 +15,6 @@ const common = require('./common') | ||
addRules (obj) { | ||
Object.setPrototypeOf(PropTypes, obj) | ||
// Object.setPrototypeOf(PropTypes, obj) | ||
for (const key in obj) { | ||
PropTypes[key] = obj[key] | ||
} | ||
}, | ||
@@ -18,0 +21,0 @@ |
@@ -10,2 +10,14 @@ const { Middleware, PropTypes } = require('../index') | ||
PropTypes.addRules({ | ||
get date () { | ||
return PropTypes.makeRule({ | ||
validType: (value) => { | ||
return !!(typeof value === 'string') | ||
}, | ||
validRequired: (value) => { | ||
return !!value | ||
} | ||
}) | ||
} | ||
}) | ||
@@ -186,2 +198,5 @@ | ||
handler1(palyload1, { | ||
@@ -188,0 +203,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25245
642
293