
Security News
Insecure Agents Podcast: Certified Patches, Supply Chain Security, and AI Agents
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.
A handwritten msgpack encoder and decoder for Node.JS and modern browsers.
The original format can be found at http://wiki.msgpack.org/display/MSGPACK/Format+specification
I've extended the format a little to allow for encoding and decoding of undefined and Buffer instances.
This required three new type codes that were previously marked as "reserved". This change means that using these new types will render your serialized data incompatible with other messagepack implementations that don't have the same extension.
There are two new types for storing node Buffer instances. These work just
like "raw 16" and "raw 32" except they are node buffers instead of strings.
buffer 16 11011000 0xd8
buffer 32 11011001 0xd9
Also I've added a type for undefined that works just like the null type.
undefined 11000100 0xc4
var msgpack = require('msgpack');
var assert = require('assert');
var initial = {Hello: "World"};
var encoded = msgpack.encode(initial);
var decoded = msgpack.decode(encoded);
assert.deepEqual(initial, decoded);
FAQs
msgpack encoder and decoder in pure javascript
The npm package msgpack-js receives a total of 16,753 weekly downloads. As such, msgpack-js popularity was classified as popular.
We found that msgpack-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.

Security News
The planned feature introduces a review step before releases go live, following the Shai-Hulud attacks and a rocky migration off classic tokens that disrupted maintainer workflows.