Gathering detailed insights and metrics for msgpack-response
Gathering detailed insights and metrics for msgpack-response
Gathering detailed insights and metrics for msgpack-response
Gathering detailed insights and metrics for msgpack-response
ExpressJS msgpack response middleware / msgpack.org[Node]
npm install msgpack-response
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
17 Stars
111 Commits
3 Forks
3 Watchers
11 Branches
3 Contributors
Updated on Sep 06, 2021
Latest Version
1.0.4
Package Id
msgpack-response@1.0.4
Unpacked Size
7.88 kB
Size
3.40 kB
File Count
5
NPM Version
6.14.8
Node Version
12.20.0
Published on
Dec 14, 2020
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
An implementation of Message Pack middleware for ExpressJS.
Features
Response.msgPack(jsObject)
method on the standard ExpressJS Response object.With auto-detection and transformation enabled, the middleware detects automatically the HTTP header Accept: application/x-msgpack
and piggybacks the Response.json()
method of the ExpressJS API, to encode the JSON response as Message Pack. This method is useful when you have existing applications that need to use the middleware, without changing the codebase very much.
1const msgpackResponse = require('msgpack-response'); 2 3app.use(msgpackResponse({auto_detect: true})); 4 5app.get('/test_json', (req, res) => { 6 res.status(200).json({'message': 'a true test'}); 7})
Note: Remember to add the header
Accept: application/x-msgpack
in the request.
Also, it can have auto-detection and transformation disabled. The middleware extends the Response
object of the ExpressJS framework, by adding the msgPack()
method to it. Then to return an encoded response, you just use the Response.msgPack()
method that accepts the Javascript object as a parameter. For example,
1const msgpackResponse = require('msgpack-response'); 2 3app.use(msgpackResponse({auto_detect: false})); 4//or 5app.use(msgpackResponse()); 6 7app.get('/test_msgpack', (req, res) => { 8 res.status(200).msgPack({'message': 'a true test'}); 9});
Note: Initialize the middleware before the actual routes in the middleware chain to properly extend the
Response
Object.
Node.js >= 6.0
With npm do:
1npm install msgpack-response -save
I :heart: open source software!
Check out my other open source projects or say :wave: on twitter.
Contributions are welcome :metal:. Please see the Contributing Guide and the Code of Conduct.
See also the list of contributors who participated in this project.
msgpack-response is available under the MIT license. See the LICENSE file for more info.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
Found 1/22 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
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
25 existing vulnerabilities detected
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