if you can find a way to use only integers within that range, you can do it safely in plain JS.
for example, units of integer microdollars (one millionth of a dollar) allows you to deal in amounts up to $9 billion without exceeding the safe integer limit. if you want a larger range than that, you need to make a corresponding reduction in precision (such as using millidollars).
or, switch to a full-blown bignum / arbitrary precision library.
if you can find a way to use only integers within that range, you can do it safely in plain JS.
for example, units of integer microdollars (one millionth of a dollar) allows you to deal in amounts up to $9 billion without exceeding the safe integer limit. if you want a larger range than that, you need to make a corresponding reduction in precision (such as using millidollars).
or, switch to a full-blown bignum / arbitrary precision library.
0: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...