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", |
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
8829