const parts = formatter.formatToParts(1234.56);
// [
// { type: "currency", value: "$" },
// { type: "integer", value: "1" },
// { type: "group", value: "," },
// { type: "integer", value: "234" },
// { type: "decimal", value: "." },
// { type: "fraction", value: "56" }
// ]
// Build custom display
const integer = parts
.filter((p) => p.type === "integer" || p.type === "group")
.map((p) => p.value)
.join("");
const fraction = parts.find((p) => p.type === "fraction")?.value || "00";
console.log(`$${integer}.${fraction}`);