Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cloud-regions-country-flags

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloud-regions-country-flags

A library to convert cloud provider regions and ISO codes to country flag emojis and geographical information

  • 1.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
116
increased by30.34%
Maintainers
1
Weekly downloads
 
Created
Source

cloud-regions-country-flags

A library to convert cloud provider regions to locations and emoji flags.

Install

npm install cloud-regions-country-flags --save

Usage (fromProvider)

import { fromProvider } from 'cloud-regions-country-flags';

fromProvider('eu-north-1', 'AWS');

// Output
 {
  location: 'Europe (Stockholm)',
  flag: '🇸🇪',
  country: 'Sweden',
  latitude: 59.331325231594654,
  longitude: 18.0904021557263,
  raw: 'eu-north-1'
 }

fromProvider('us-west2-a', 'GCP');

// Output
{
  location: 'Los Angeles, California, North America',
  flag: '🇺🇸',
  country: 'United States of America',
  latitude: 34.04292305028126,
  longitude: -118.21813240055846,
  raw: 'us-west2-a'
}

Parameters

NameTypeRequiredDescription
regionstringtruecode of region
providerAWS / GCP / Verceltruename of provider

Region Information

  • AWS Regions
  • GCP Regions and zones
  • Vercel Region List

Usage (fromISO)

import { fromISO } from 'cloud-regions-country-flags';

fromISO('KE');

// Output
{
  country: 'Kenya',
  flag: '🇰🇪',
  latitude: 0.373810884212869,
  longitude: 37.98094909161015,
  raw: 'KE'
}


fromISO('VI');

// Output
{
  country: 'Virgin Islands (U.S.)',
  flag: '🇻🇮',
  latitude: 17.734242029786145,
  longitude: -64.71190436798027,
  raw: 'VI'
}

Parameters

NameTypeRequiredDescription
entrystringtrueISO code

ISO Information

Bugs

There has been a lot of copy and pasting of values from various sources to create this utility. If you spot anything that is incorrect please open an issue or PR. Thanks in advance!

FAQs

Package last updated on 04 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc