Reacto o método de formato de moeda

const priceSplitter = (number) => (number && number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','));

console.log(priceSplitter(72500));
 Run code snippet
Yasin Donmez