Skip to content
New issue

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

BigInt not supported #80

Open
mzedeler opened this issue Apr 13, 2020 · 1 comment
Open

BigInt not supported #80

mzedeler opened this issue Apr 13, 2020 · 1 comment

Comments

@mzedeler
Copy link

require('msgpack5')().encode({a: 10n})
Uncaught Error: not implemented yet

I am a bit surprised that it isn't possible to write a decoder for this. I tried, but I get the same error, since msgpack5 never seems to try to get the value converted:

const m = require('msgpack5')()
m.registerEncoder((t) => (t instanceof BigInt), t => t.toString(10))
m..encode({a: 10n})
Uncaught Error: not implemented yet
@mcollina
Copy link
Owner

This library was written way before BigInt was a thing. Feel free to send a PR to add support for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants