We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should take a Shopify MoneyV2 object, i.e.
MoneyV2
{ amount: 1499.99, currencyCode: 'USD' }
and format it with the proper symbol and decimal placement. Prices that are .00 cents should have the decimals trimmed: $1500
.00
$1500
I just saw this but it looks like you can use some built-in locale formatters for most of this!
new Intl.NumberFormat(locale, { style: 'currency', currency: currencyCode }).format(amount);
https://help.shopify.com/en/api/storefront-api/reference/object/moneyv2
The text was updated successfully, but these errors were encountered:
misteroh10302
No branches or pull requests
Should take a Shopify
MoneyV2
object, i.e.and format it with the proper symbol and decimal placement. Prices that are
.00
cents should have the decimals trimmed:$1500
I just saw this but it looks like you can use some built-in locale formatters for most of this!
https://help.shopify.com/en/api/storefront-api/reference/object/moneyv2
The text was updated successfully, but these errors were encountered: