lambda-request-handler
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -11,7 +11,7 @@ "use strict"; | ||
const url = __importStar(require("url")); | ||
const getValuesFromStringAndMultiString = (stringMap, multiStringMap) => { | ||
const getValuesFromStringAndMultiString = (stringMap, multiStringMap, lcKeys = true) => { | ||
const retVal = {}; | ||
const singleMap = stringMap || {}; | ||
Object.keys(singleMap).forEach(k => { | ||
retVal[k.toLowerCase()] = singleMap[k]; | ||
retVal[lcKeys ? k.toLowerCase() : k] = singleMap[k]; | ||
}); | ||
@@ -21,3 +21,3 @@ const multiMap = multiStringMap || {}; | ||
// get the last value | ||
retVal[k.toLowerCase()] = multiMap[k][multiMap[k].length - 1]; | ||
retVal[lcKeys ? k.toLowerCase() : k] = multiMap[k][multiMap[k].length - 1]; | ||
}); | ||
@@ -29,3 +29,3 @@ return retVal; | ||
let ssl = false; | ||
const queryStringParams = getValuesFromStringAndMultiString(event.queryStringParameters, event.multiValueQueryStringParameters); | ||
const queryStringParams = getValuesFromStringAndMultiString(event.queryStringParameters, event.multiValueQueryStringParameters, false); | ||
const headers = getValuesFromStringAndMultiString(event.headers, event.multiValueHeaders); | ||
@@ -32,0 +32,0 @@ if (ctx) { |
{ | ||
"name": "lambda-request-handler", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"license": "(MIT OR Apache-2.0)", | ||
@@ -40,16 +40,16 @@ "scripts": { | ||
"devDependencies": { | ||
"@types/compression": "^1.0.1", | ||
"@types/compression": "^1.7.0", | ||
"@types/cookie-parser": "^1.4.2", | ||
"@types/express": "^4.17.2", | ||
"@types/jest": "^24.0.23", | ||
"@types/node": "^12.12.14", | ||
"@types/express": "^4.17.6", | ||
"@types/jest": "^25.2.1", | ||
"@types/node": "^13.13.4", | ||
"compression": "^1.7.4", | ||
"cookie-parser": "^1.4.4", | ||
"ejs": "^3.0.1", | ||
"cookie-parser": "^1.4.5", | ||
"ejs": "^3.1.2", | ||
"express": "^4.17.1", | ||
"jest": "^24.9.0", | ||
"ts-jest": "^24.2.0", | ||
"ts-node": "^8.5.4", | ||
"typescript": "^3.7.3" | ||
"jest": "^25.4.0", | ||
"ts-jest": "^25.4.0", | ||
"ts-node": "^8.9.1", | ||
"typescript": "^3.8.3" | ||
} | ||
} |
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
Mixed license
License(Experimental) Package contains multiple licenses.
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
23056
15
1