You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How often does it reproduce? Is there a required condition?
Constantly
What is the expected behavior? Why is that the expected behavior?
The previous code snippet should output "$3M", because the number is round, notation is set to "compact" and maximumFractionDigits is set to 1. For comparison Chrome 133.0.6943.98 (V8 13.3.415.21) correctly outputs "$3M".
What do you see instead?
The previous code outputs "$3.0M" in Node.js v22.14.0 (V8 12.4.254.21-node.22), while Chrome 133.0.6943.98 (V8 13.3.415.21) outputs "$3M".
It seems that when using style: "currency" and specifying maximumFractionDigits, for some reason Node.js uses that number as the exact number of fraction digits instead of a maximum.