Version: 2.0.6
There seems to be an issue when using the following function:
const amount = 11111111111111111; // 17 characters
const value = numeral(amount).format('0,0.00');
console.log(value); // outputs "11,111,111,111,111,112.00"
Expected: 11,111,111,111,111,111.00
Actual: 11,111,111,111,111,112.00
This issue will occur when there is 17 or more numbers provided and an incorrect conversion occurs
JavaScript does not support such big numbers, the max safe value is:
Number.MAX_SAFE_INTEGER
9007199254740991
Most helpful comment
JavaScript does not support such big numbers, the max safe value is:
See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER