Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
msgpack-js-v5-ng
Advanced tools
Readme
Please see the original README.md from the source repository for more information.
This is a port of creationix/msgpack-js to support the new MsgPack v5 specification.
Please feel free to open issues/pull requests for support/discussion.
$ npm i msgpack-js-v5 --save
var msgpack = require('msgpack-js-v5-ng');
var output = msgpack.decode(packed).value;
Since there is no way to encode undefined
inside the msgpack spec, an extension point is
used for this purpose. Specifically, the fixext 1
type is used with all values being 0
to indicate undefined
. On the wire, it requires 3 bytes and should looks like this:
0xd4 | 0x00 | 0x00
Where |
is byte separator.
Extensions are encoded/decoded to and from a simple 2-elements array tuple of the form
[type, Buffer]
. Where type
is the msgpack extension type identifier and Buffer
is
the raw decoded value.
Special case for fixext 1
since it will always be 1-byte long a simple [type, value]
is returned directly instead of wrapping it in node.js Buffer
.
This package will follows msgpack-js
version for the time being. The version string will
simply be appended with v5
.
If and when this package diverges from the original, we can start our own versioning. Or
this module could just be merged into the original msgpack-js
module.
FAQs
msgpack encoder and decoder in pure javascript based on creationix/msgpack-js updated to match the new v5 specification with string support.
The npm package msgpack-js-v5-ng receives a total of 2 weekly downloads. As such, msgpack-js-v5-ng popularity was classified as not popular.
We found that msgpack-js-v5-ng 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.