New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

aws-lambda-fastify

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-lambda-fastify - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

12

index.js

@@ -39,8 +39,8 @@ module.exports = (app, options) => (event, context, callback) => {

// HACK: modifies header casing to get around API Gateway's limitation of not allowing multiple
// headers with the same name, as discussed on the AWS Forum https://forums.aws.amazon.com/message.jspa?messageID=725953#725953
let multiValueHeaders
Object.keys(res.headers).forEach((h) => {
if (Array.isArray(res.headers[h])) {
if (h.toLowerCase() === 'set-cookie') {
res.headers[h].forEach((value, i) => { res.headers[require('binary-case')(h, i + 1)] = value })
multiValueHeaders = multiValueHeaders || {}
multiValueHeaders[h] = res.headers[h]
delete res.headers[h]

@@ -54,3 +54,3 @@ } else res.headers[h] = res.headers[h].join(',')

resolve({
const ret = {
statusCode: res.statusCode,

@@ -60,3 +60,5 @@ body: isBase64Encoded ? res.rawPayload.toString('base64') : res.payload,

isBase64Encoded
})
}
if (multiValueHeaders) ret.multiValueHeaders = multiValueHeaders
resolve(ret)
})

@@ -63,0 +65,0 @@ })

@@ -34,3 +34,3 @@ {

],
"version": "1.1.0",
"version": "1.2.0",
"main": "index.js",

@@ -42,5 +42,2 @@ "scripts": {

},
"dependencies": {
"binary-case": "1.1.4"
},
"devDependencies": {

@@ -47,0 +44,0 @@ "aws-serverless-express": "3.3.6",

@@ -80,9 +80,9 @@ # Introduction

**aws-lambda-fastify** x **14,706 ops/sec** ±5.68% (80 runs sampled)
**aws-lambda-fastify** x **24,309 ops/sec** ±6.87% (80 runs sampled)
**[serverless-http](https://github.com/dougmoscrop/serverless-http)** x **10,986 ops/sec** ±2.90% (78 runs sampled)
**[serverless-http](https://github.com/dougmoscrop/serverless-http)** x **16,403 ops/sec** ±4.67% (80 runs sampled)
**[aws-serverless-fastify](https://github.com/benMain/aws-serverless-fastify)** x **3,017 ops/sec** ±1.57% (76 runs sampled)
**[aws-serverless-fastify](https://github.com/benMain/aws-serverless-fastify)** x **2,598 ops/sec** ±1.07% (83 runs sampled)
**[aws-serverless-express](https://github.com/awslabs/aws-serverless-express)** x **2,607 ops/sec** ±6.36% (71 runs sampled)
**[aws-serverless-express](https://github.com/awslabs/aws-serverless-express)** x **2,314 ops/sec** ±5.04% (75 runs sampled)

@@ -89,0 +89,0 @@ Fastest is **aws-lambda-fastify**

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc