Closed
Description
I think we should probably forbid NaN and Infinity from taking part in a number range format. What would be your expected behavior in these cases?
new Intl.NumberFormat().formatRange(10, NaN);
new Intl.NumberFormat().formatRange(10, Infinity);
The first case makes no sense. The second case could be an interesting application of the "greater than" pattern, but that's not yet supported in ICU.
For now, better to throw a RangeError. We can remove that restriction later if we ever needed to.