Just some days ago, I start to write a wrapper to consume an Brazilian Service when I want to send the "product_code" as an number value, but the number is very high. The magic number is 5213372036854743040, this is a high value, but when I receive my first bug saying to me the product is now available for me, I open some support tickets, but the strange is the POSTMan works great, but in my app using Request I ever receive the error message.
Well, open the Node.js console and Chrome's console and put the number 5213372036854743040 the return value is just 5213372036854743000. My first thinking is "well, maybe this number is the max number value" but, the max integer in x64 is 9,223,372,036,854,775,807 and the Number.MAX_VALUE is 1.7976931348623157e+308.
If I sum the number with 100 the return is the same, but if I double the value this works. I think maybe when we got a number with more than 19 algarisms the v8 just round the value to end 000.
Someone here knows what or because this works with this behavior?