dollars function on big numbers
Closed this issue · 2 comments
mowafy commented
currency('90071992547').dollars();
expected: 90071992547
actual: -122320669
tested on Firefox 71 & Chrome 78
scurker commented
This is a known limitation due to integer limits
mowafy commented
I think the problem in the double telda in the dollar method
let tmp = 90071992547.1234;
console.log(~~tmp);
// expected: 90071992547, actual: -122320669
console.log( Math.floor(tmp) );
// expected: 90071992547, actual: 90071992547