We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a reason why undefined is so, err, disliked in this package?
undefined
I don't seem to be able to register an encoder for it, it's just hard coded in the encoder.js file to throw an error.
encoder.js
The msgpack-node implementation just encodes undefined values to null, and that's what I'd like to accomplish.
msgpack-node
null
The text was updated successfully, but these errors were encountered:
undefined is not null in JS. If you encode an undefined to a null, then when you decode you will not get an undefined.
In this library we support: deepEqual(decode(encode(data)), data).
deepEqual(decode(encode(data)), data)
Sorry, something went wrong.
Of course, but why not let us register an encoder for undefined?
Would you like to send a pr?
Successfully merging a pull request may close this issue.
Is there a reason why
undefined
is so, err, disliked in this package?I don't seem to be able to register an encoder for it, it's just hard coded in the
encoder.js
file to throw an error.The
msgpack-node
implementation just encodesundefined
values tonull
, and that's what I'd like to accomplish.The text was updated successfully, but these errors were encountered: