Skip to content

Large unsigned integers should be decoded to a BigInt rather than a string #228

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

Closed
oschwald opened this issue Apr 30, 2025 · 2 comments
Closed

Comments

@oschwald
Copy link
Collaborator

Currently, the decoder converts unsigned integers that are more than 6 bytes long to strings. They would be easier to use correctly if they were left as BigInt values.

I am raising this as an issue rather than immediately making a PR as this would technically be a breaking change.

@runk
Copy link
Owner

runk commented Apr 30, 2025

It makes total sense to use BigInt.

I'm fairly sure that at the time of writing this lib (was core part of the maxmind module back then), there was no BigInt in javascript.

@oschwald
Copy link
Collaborator Author

oschwald commented May 3, 2025

Done in #231

@oschwald oschwald closed this as completed May 3, 2025
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