Replace bignumber.js with big.js #4
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR replaces
bignumber.jswithbig.js. The goal is to reduce the bundle size, asbig.jsis significantly smaller thanbignumber.jsSee the bundle size for [email protected]:
From the diagram, we can see that
bignumber.jstakes up most of the bundle sizeIf we compare bignumber.js with big.js, we see the latter is smaller, while having most of the same functionality (or we can get by with some calls to get the same functionality)
Tests pass so I expect it to have the same functionality.
Description commit by commit:
contractin this package ! It must have been a copy-paste error)bignumber.jswithbig.jsNote I believe this should be a breaking change because while the output should stay the same, the input used to accept a
BigNumber.jsinstance, which is no longer accepted. We useBigSourcenow.