Socket
Socket
Sign inDemoInstall

middy

Package Overview
Dependencies
Maintainers
8
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

middy - npm Package Compare versions

Comparing version 0.27.0 to 0.27.1

2

package.json
{
"name": "middy",
"version": "0.27.0",
"version": "0.27.1",
"description": "🛵 The stylish Node.js middleware engine for AWS Lambda",

@@ -5,0 +5,0 @@ "main": "./index.js",

@@ -69,3 +69,3 @@ <div align="center">

const middy = require('middy')
const { urlEncodeBodyParser, validator, httpErrorHandler } = require('middy/middlewares')
const { jsonBodyParser, validator, httpErrorHandler } = require('middy/middlewares')

@@ -107,3 +107,3 @@ // This is your common handler, in no way different than what you are used to doing every day

const handler = middy(processPayment)
.use(urlEncodeBodyParser()) // parses the request body when it's a JSON and converts it to an object
.use(jsonBodyParser()) // parses the request body when it's a JSON and converts it to an object
.use(validator({inputSchema})) // validates the input

@@ -110,0 +110,0 @@ .use(httpErrorHandler()) // handles common http errors and returns proper responses

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