@shopify/shop-minis-react
Version:
React component library for Shopify Shop Minis with Tailwind CSS v4 support (source-only, requires TypeScript)
16 lines (15 loc) • 368 B
JavaScript
function t(e, r) {
try {
const n = r === "USD" ? "en-US" : navigator.language || "en-US";
return new Intl.NumberFormat(n, {
style: "currency",
currency: r
}).format(Number(e));
} catch (n) {
return console.warn(`Invalid currency code: ${r}`, n), `${r} ${e}`;
}
}
export {
t as formatMoney
};
//# sourceMappingURL=formatMoney.js.map