I am trying to use NumberFormat in NodeJS. It is working perfect for style "currency" but for style "unit" it is throwing the error: RangeError: Value unit out of range for numberformat options property style
Here is my code:
Intl.NumberFormat("en-US", {
style: "unit",
unit: "kilometer-per-hour",
}).format(71);
This is only happening in NodeJS. I tried the same code in browser console and it worked perfectly.