I am using the JavaScript Intl object, and I want to format a number (150 for example) to look like "£150". For Chrome untill the update to version 59 this code worked perfect:
var GBPFormatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'GBP',
maximumFractionDigits: 0
});
but now it says that the "maximumFractionDigits" can not be 0, and after reading in https://developer.mozilla.org/ i found that for GBP maximumFractionDigits can not be less than 2.
All well and good, but i still need to have "£150" not "£150.00". Any ideas how i can still use the Intl object and make it look the way i need.
P.S. I know that i can make my own function that dose the same, but considering that i do not have only GBP but a bit more currencyes, I prefer to stick with a ready solution.