'use strict';

function formatUSD(amount) {
  const formatter = new Intl.NumberFormat("en-US", {
    style: "currency",
    currency: "USD",
    minimumFractionDigits: 2,
  });
  return formatter.format(typeof amount === "string"
    ? parseFloat(amount.replace(/\$|,/g, ""))
    : amount || 0);
}

exports.formatUSD = formatUSD;

//# sourceMappingURL=formatUSD-65108a08.js.map