Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
cloud-regions-country-flags
Advanced tools
A library to convert cloud provider regions and ISO codes to country flag emojis and geographical information
A library to convert cloud provider regions to locations and emoji flags.
npm install cloud-regions-country-flags --save
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'
}
Name | Type | Required | Description |
---|---|---|---|
region | string | true | code of region |
provider | AWS / GCP / Vercel | true | name of provider |
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'
}
Name | Type | Required | Description |
---|---|---|---|
entry | string | true | ISO code |
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
A library to convert cloud provider regions and ISO codes to country flag emojis and geographical information
The npm package cloud-regions-country-flags receives a total of 89 weekly downloads. As such, cloud-regions-country-flags popularity was classified as not popular.
We found that cloud-regions-country-flags demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.