Created
June 2, 2022 08:11
-
-
Save baptisteArno/d8e93b8be05bb670966b1e37fbf49104 to your computer and use it in GitHub Desktop.
Function to check if currency is "zero-decimal" - Stripe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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