Gathering detailed insights and metrics for jsonp-body
Gathering detailed insights and metrics for jsonp-body
Gathering detailed insights and metrics for jsonp-body
Gathering detailed insights and metrics for jsonp-body
Helper to create more safe jsonp response body for koa and other web framework.
npm install jsonp-body
Typescript
Module System
Min. Node Version
Node Version
NPM Version
98.6
Supply Chain
87.9
Quality
77.3
Maintenance
100
Vulnerability
100
License
TypeScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
10 Stars
22 Commits
2 Forks
14 Watchers
1 Branches
13 Contributors
Updated on Jan 11, 2025
Latest Version
2.0.0
Package Id
jsonp-body@2.0.0
Unpacked Size
13.17 kB
Size
4.46 kB
File Count
11
NPM Version
10.8.2
Node Version
18.20.5
Published on
Jan 11, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Helper to create more safe jsonp response body for koa and other web framework.
1npm install jsonp-body --save
1const koa = require('koa'); 2const { jsonp } = require('jsonp-body'); 3 4var app = koa(); 5app.use(async function () { 6 this.set('X-Content-Type-Options', 'nosniff'); 7 if (this.query.callback) { 8 this.set('Content-Type', 'text/javascript'); 9 } else { 10 this.set('Content-Type', 'application/json'); 11 } 12 this.body = jsonp({foo: 'bar'}, this.query.callback); 13});
jsonp(obj, callback, options)
Get obj
jsonp string response with callback
.
JSON.stringify
callback
, default to 512
JSON.stringify(obj, [replacer, [space]])
JSON.stringify(obj, [replacer, [space]])
Made with contributors-img.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 2/20 approved changesets -- score normalized to 1
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
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