This PR replaces decimal.js (32 KB) with bignumber.js (20 KB) to lower bundle size. The minimal changes required to make this happen made this a very low-hanging fruit.
A further step along the same direction would be to use either big.js (8 KB) or decimal.js-light (6 KB). However, doing so requires more work to handle edge cases involving Infinity, NaN and -0 as these are not supported by the smaller libraries.
Coverage remained the same at 89.54% when pulling c394644f98afa1ba87ef862eaf4f0cd24eb694a1 on jacoscaz:bignumber.js into 58befd26bcb416a5278efd8b0febff8ecd99d7d9 on comunica:master.
This PR replaces
decimal.js
(32 KB) withbignumber.js
(20 KB) to lower bundle size. The minimal changes required to make this happen made this a very low-hanging fruit.A further step along the same direction would be to use either
big.js
(8 KB) ordecimal.js-light
(6 KB). However, doing so requires more work to handle edge cases involvingInfinity
,NaN
and-0
as these are not supported by the smaller libraries.