📅  最后修改于: 2022-03-11 15:02:45.798000             🧑  作者: Mango
const formatter = new Intl.NumberFormat('en-ID', {
style: 'currency',
currency: 'IDR'
}).format(10000000)
.replace(/[IDR]/gi, '')
.replace(/(\.+\d{2})/, '')
.trimLeft()
console.log(`Rp ${formatter}`)