5.2.3 • Published 5 years ago

big.js.safe v5.2.3

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

big.js.safe

big.js but blows up for unsafe integers

npm i --save big.js.safe

const Big = require('big.js.safe')
// your big.js code goes here

Why this module?

When passing a number to big.js this happens:

Big('1234567890123456789').toFixed()  // 1234567890123456789 - All OK
Big(1234567890123456789).toFixed()    // 1234567890123456800 - Precision lost

Here precision is lost without warning.

big.js.safe solves this by simply throwing an error when an unsafe integer is given.

No other modifications are made.

5.2.3

5 years ago

5.2.2

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago