export function format(data:number){ return new Intl.NumberFormat('id-ID',{ style:'currency', currency:'IDR', currencyDisplay: "code", }).formatToParts(data) .filter(x => x.type !== "currency") .filter(x => x.type !== "literal" || x.value.trim().length !== 0) .map(x => x.value) .join("") }