Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const number = 123456999.789;
let numberFormated = new Intl.NumberFormat('pt-BR', { style: 'decimal', minimumFractionDigits: 2, maximumFractionDigits :2}).format(number);
console.log(numberFormated.replace(/\./g, '').replace(',', '.'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment