Created
October 15, 2019 15:42
-
-
Save vitaly-t/86df0b2ae534327cdc1af2f753e8bc30 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Alternative/official approach to serializing BigInt: | |
BigInt.prototype.toJSON = function () { | |
return `${this.toString()}n`; | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment