Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Function to check if currency is "zero-decimal" - Stripe
// https://stripe.com/docs/currencies#zero-decimal
const isZeroDecimalCurrency = (currency: string) =>
[
'BIF',
'CLP',
'DJF',
'GNF',
'JPY',
'KMF',
'KRW',
'MGA',
'PYG',
'RWF',
'UGX',
'VND',
'VUV',
'XAF',
'XOF',
'XPF',
].includes(currency)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment