-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add error handling for excessively large integers
Encoding or decoding values larger than Javascript's MAX_SAFE_INTEGER can cause unpredictable behavior. This change adds error handling to the `encode` and `decode` functions to throw an error if this value gets exceeded. API documentation updated accordingly. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER for more details. Resolves: #28
- Loading branch information
1 parent
c6a0af8
commit bc725f1
Showing
2 changed files
with
67 additions
and
38 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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