Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@aerapass/country-data
Advanced tools
Data about countries - like their ISO codes and currencies - with typings.
npm install @aerapass/country-data
import { countries, continents, currencies, regions } from '@aerapass/country-data'
// .all gives you an array of all entries
console.log(countries.all)
console.log(currencies.all)
// countries are found using alpha2 or alpha3 (both uppercase)
console.log(countries.BE.name) // 'Belgium'
console.log(countries.FRA.currencies) // ['EUR']
// currencies are accessed by their code (uppercase)
console.log(currencies.USD.name) // 'United States dollar'
// regions are accessed using a camel case name
console.log(regions.europe.countries)
The data currently provided for each country is:
name
The english name for the countryalpha2
The ISO 3166-1 alpha 2 codealpha3
The ISO 3166-1 alpha 3 codestatus
: The ISO status of the entry - see below.currencies
An array of ISO 4217 currency codes with the primary one firstlanguages
An array of ISO 639-2 codes for languages (may not be complete).countryCallingCodes
An array of the international call prefixes for this country.ioc
The International Olympic Committee country codeemoji
The emoji of country's flag.numeric
The ISO 3166-1 numeric codeThe status
can be one of 'assigned', 'reserved', 'user assigned' or 'deleted'.
Assigned means that the code is properly in the ISO 3166 standard. Reserved means that the code is being prevented from being used. Deleted means that it has been deleted. User Assigned means that for some use cases it is required. Deleted means that it used to be in the standard but is now not.
See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 for full details, especially the "User-assigned code elements" and "Reserved code elements" sections.
Countries are ofter grouped into regions. The list of regions is by no means exhaustive, pull requests very welcome for additions.
countries
An array of alpha2
codes for the countries in this region.It is not that useful to just have the currency code(s) for a country, so included is currency data too:
name
The english name for the currencycode
The ISO 4217 codenumber
The ISO 4217 numberdecimals
The number of decimal digits conventionally shownsymbol
The currency symbol for the currency (e.g. ¥, $ etc.). Some symbols are not available, in which case
symbol
contains the ISO 4217 code. Credit to bengourley/currency-symbol-map
for the symbol database.The currency data was copied from the Wikipedia ISO 4217 page.
The country calling codes came from the Wikipedia country calling codes page.
FAQs
Data about countries - like their ISO codes and currencies
We found that @aerapass/country-data demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.