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 0.2.0 to 0.3.0

18

index.js

@@ -33,13 +33,13 @@ /**

function requestbody(opts) {
opts = opts || {}
opts.patchNode = (opts && 'patchNode' in opts) ? opts.patchNode : false,
opts.patchKoa = (opts && 'patchKoa' in opts) ? opts.patchKoa : true,
opts.multipart = (opts && 'multipart' in opts) ? opts.multipart : false;
opts.encoding = (opts && 'encoding' in opts) ? opts.encoding : 'utf-8',
opts.jsonLimit = (opts && 'jsonLimit' in opts) ? opts.jsonLimit : '1mb',
opts.formLimit = (opts && 'formLimit' in opts) ? opts.formLimit : '56kb';
opts.formidable = (opts && 'formidable' in opts) ? opts.formidable : {};
opts = opts || {};
opts.patchNode = 'patchNode' in opts ? opts.patchNode : false;
opts.patchKoa = 'patchKoa' in opts ? opts.patchKoa : true;
opts.multipart = 'multipart' in opts ? opts.multipart : false;
opts.encoding = 'encoding' in opts ? opts.encoding : 'utf-8';
opts.jsonLimit = 'jsonLimit' in opts ? opts.jsonLimit : '1mb';
opts.formLimit = 'formLimit' in opts ? opts.formLimit : '56kb';
opts.formidable = 'formidable' in opts ? opts.formidable : {};
return function *(next){
var body;
var body = {};
if (this.is('json')) {

@@ -46,0 +46,0 @@ body = yield buddy.json(this, {encoding: opts.encoding, limit: opts.jsonLimit});

{
"name": "koa-body",
"version": "0.2.0",
"version": "0.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