The location to look up (e.g., 'US', 'GB')
The corresponding currency code (e.g., 'USD', 'GBP')
getCurrencyCodeFromLocation('US') // Returns 'USD'
getCurrencyCodeFromLocation('GB') // Returns 'GBP'
export function getCurrencyCodeFromLocation(location: CountryCode): CurrencyCode {
return CURRENCY_CODE_MAP_BY_LOCATION[String(location)];
}
Maps a location to its corresponding currency code. Uses a predefined mapping from the CURRENCY_CODE_MAP_BY_LOCATION constant. Supports major international locations.