Gathering detailed insights and metrics for koa-bodyparser-secure
Gathering detailed insights and metrics for koa-bodyparser-secure
npm install koa-bodyparser-secure
Typescript
Module System
Node Version
NPM Version
68.1
Supply Chain
92.7
Quality
74.3
Maintenance
50
Vulnerability
100
License
JavaScript (91.15%)
Makefile (8.85%)
Total Downloads
2,399
Last Day
1
Last Week
1
Last Month
4
Last Year
57
62 Commits
1 Watching
1 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
3.0.0
Package Id
koa-bodyparser-secure@3.0.0
Size
3.54 kB
NPM Version
2.12.1
Node Version
0.12.7
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
0%
1
Compared to previous week
Last month
33.3%
4
Compared to previous month
Last year
-60.7%
57
Compared to previous year
a body parser for koa, base on co-body.
1var koa = require('koa'); 2var bodyParser = require('koa-bodyparser'); 3 4var app = koa(); 5app.use(bodyParser()); 6 7app.use(function *() { 8 // the parsed body will store in this.request.body 9 // if nothing was parsed, body will be an empty object {} 10 this.body = this.request.body; 11});
encode: requested encoding. Default is utf-8
by co-body
formLimit: limit of the urlencoded
body. If the body ends up being larger than this limit, a 413 error code is returned. Default is 56kb
jsonLimit: limit of the json
body. Default is 1mb
strict: when set to true, JSON parser will only accept arrays and objects. Default is true
. See strict mode in co-body
detectJSON: custom json request detect function. Default is null
1app.use(bodyparser({ 2 detectJSON: function (ctx) { 3 return /\.json$/i.test(ctx.path); 4 } 5}));
extendTypes: support extend types:
1app.use(bodyparser({ 2 extendTypes: { 3 json: ['application/x-javascript'] // will parse application/x-javascript type body as a JSON string 4 } 5}));
onerror: support custom error handle, if koa-bodyparser
throw an error, you can customize the response like:
1app.use(bodyparser({ 2 onerror: function (err, ctx) { 3 ctx.throw('body parse error', 422); 4 } 5}));
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
project is archived
Details
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-01-06
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More