Skip to content

Stringify for nums bigger than max safe integer #1646

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

Merged
merged 12 commits into from
Mar 26, 2025

Conversation

pawfrolow
Copy link
Contributor

@pawfrolow pawfrolow commented Mar 11, 2025

Hi, I've made fixes for two problems, discussed here #1259

1: Trying to paste big number like 7405242042266046865, that incorectly converts it to number, because it bigger that max safe integer.
Before: https://github.com/user-attachments/assets/7869e787-c2da-4d1c-ac20-0e7243720148
After: https://github.com/user-attachments/assets/be9029f3-b726-4eb5-8c52-3e9bf4cfd798

Copy link
Owner

@josdejong josdejong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Pavel, I think it makes sense to parse a bigint into a string rather than a number which loses digits.

I made a few inline comments, can you have a look at those?

@pawfrolow pawfrolow changed the title Stringify for nums bigger than max safe integer, accept only text for paste Stringify for nums bigger than max safe integer Mar 13, 2025
Copy link
Owner

@josdejong josdejong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates Pavel, this looks good indeed! One small remark left, can you have a look?

Copy link
Owner

@josdejong josdejong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I like how this PR turned out :)

@josdejong josdejong merged commit 9e4d54c into josdejong:develop Mar 26, 2025
5 checks passed
@pawfrolow
Copy link
Contributor Author

Hi, @josdejong can you tell if there will be a new version with these changes?

I also saw a small typo in the history file on line 8, there is a different nickname there :)

@josdejong
Copy link
Owner

Ah, sorry about that, I've fixed it via d56659a.

I've just published [email protected] containing your new feature 🎉

@pawfrolow
Copy link
Contributor Author

Thanks a lot, great news!

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

Successfully merging this pull request may close these issues.

2 participants