-
-
Notifications
You must be signed in to change notification settings - Fork 25
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 version #78
Comments
https://gist.github.com/CatsMiaow/7fc9f28c9d2a5ab6d7605646086fdca6 |
@CatsMiaow Modern browsers have a native BigInt type: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt :) |
I know but BigInt doesn't work as I want. console.log(616580508813361172); // 616580508813361200
BigInt(616580508813361172); // 616580508813361152n
616580508813361152n.toString(); // "616580508813361152"
BigInt(616580508813361172).toString(); // "616580508813361152"
BigInt(616580508813361172).toString() === "616580508813361172" // false But as I wrote this comment, I checked again BigInt("616580508813361172").toString() === "616580508813361172" // true 🤔 Rewritten with BigInt |
same issue here trying to encode this hex number: |
With BigInt more common nowadays, it'd definitely be nice to have this functionality |
Would be good to get BigInt support... I think the current version doesn't support BigInts.
The text was updated successfully, but these errors were encountered: