Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koa-body

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-body - npm Package Compare versions

Comparing version 2.1.0 to 2.3.0

18

index.js

@@ -83,3 +83,11 @@ /**

bodyPromise = bodyPromise || Promise.resolve({});
return bodyPromise.then(function(body) {
return bodyPromise.catch(function(parsingError) {
if (typeof opts.onError === 'function') {
opts.onError(parsingError, ctx);
} else {
throw parsingError;
}
return next();
})
.then(function(body) {
if (opts.patchNode) {

@@ -93,10 +101,2 @@ ctx.req.body = body;

})
.catch(function(parsingError) {
if (typeof opts.onError === 'function') {
opts.onError(parsingError, ctx);
} else {
throw parsingError;
}
return next();
})
};

@@ -103,0 +103,0 @@ }

{
"name": "koa-body",
"version": "2.1.0",
"version": "2.3.0",
"description": "A koa body parser middleware. Support multipart, urlencoded and json request bodies.",

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

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