A global method ip2country
is available to look up a country based on the user's IP-address. You may use this for a statistical purpose or for security reasons.
function ip2country(ip: string) => Promise<string>;
The result is a 2-letter ISO country code.