Gathering detailed insights and metrics for get-all-country-info
Gathering detailed insights and metrics for get-all-country-info
Gathering detailed insights and metrics for get-all-country-info
Gathering detailed insights and metrics for get-all-country-info
npm install get-all-country-info
Typescript
Module System
Node Version
NPM Version
JavaScript (99.39%)
Shell (0.61%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
4 Stars
114 Commits
5 Forks
1 Watchers
17 Branches
7 Contributors
Updated on Jun 17, 2025
Latest Version
1.1.6
Package Id
get-all-country-info@1.1.6
Unpacked Size
456.22 kB
Size
77.38 kB
File Count
23
NPM Version
6.14.4
Node Version
14.0.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
4
This package provides the information related the countries.The following informations are:
npm i get-all-country-info
1import { 2 getAllCountriesNames, 3 getAllCountriesCallingCode, 4 getAllIsoCodes, 5 getCountryInfo 6} from "get-all-country-info"; 7 8console.log(getAllCountriesNames()) // get all countries name 9 10console.log(getAllCountriesCallingCode()) // get all countries calling code 11 12console.log(getAllIsoCodes()) // get all countries iso code 13 14// To use getCountryInfo pass the following object as parameter 15 16const paramObject = { 17 methodType: keyword, // Required Keyword can be found in the Keywords table 18 attributes: empty or country name 19} 20 21getCountryInfo(paramObject) 22 23// getCountryInfo function can be implemented in three ways 24 25// 1. Put methodType = Keyword, attributes = empty or country name 26// Output = Returns details depending upon the keyword provided in methodType for 27// a particular country(if attributes value is non-empty) and for all 28// countries (if attributes value is empty) 29 30const options = { 31 methodType: "COUNTRY_NAMES", 32 attributes: "" 33} 34console.log(getCountryInfo(options)) // get all countries name 35 36// 2. Put methodType = array of keywords, attributes = country name 37// Output = Returns details depending upon the keyword provided in methodType for a 38// particular country 39const options = { 40 methodType: ["CONTINENT_NAME", "COUNTRY_CODE"], 41 attributes: "India" 42} 43console.log(getCountryInfo(options)) // get continent and country code of the country 44 45// 3. Put methodType = array of keywords, attributes = empty 46// Output = Returns details depending upon the keyword provided in methodType for 47// a particular country(if attributes value is non-empty) and for all 48// countries (if attributes value is empty) 49const options = { 50 methodType: ["CONTINENT_NAME", "COUNTRY_CODE"], 51 attributes: "" 52} 53console.log(getCountryInfo(options)) // get all countries code and continent name 54 55// result will be in array format
Method | Description | Output |
---|---|---|
getContinentName("India") | Return the continents of the coutries | "Asia" |
getCountryCode("India") | Return the codes of the coutries | "IN" |
getCountryTimeZone("Aruba") | Return the timezones of the coutries | ["America/Aruba"] |
getAllCountriesNames() | Return the names of the coutries | ["Andorra", "United Arab Emirates", ...] |
getAllCountriesLanguages() | Return the languages of the coutries | [{"name": "Aruba", "languages": [ "Dutch", "English","Papiamento", "Spanish"] }, { "name": "Afghanistan", "languages": [ "Balochi", "Dari", "Pashto", "Turkmenian", "Uzbek"]}] |
getAllIsoCodes() | Return the iso code of the coutries | ["AD", "AE", ..] |
getAllCountriesFlag() | Return the flags of coutries | ["🇦🇨", "🇦🇩" ..] |
getAllCountriesCallingCode() | Return the calling codes of the coutries | ["+93", "+358" ...] |
getAllCountriesCapitals() | Return the capitals of coutries | [{ "country": "Afghanistan", "capital": "Kabul" }, { "country": "Albania", "capital": "Tirana" }, ...] |
getCurrencybyCountryCode("USD") | Return the information about currency of particular country | {symbol: '$', name: 'US Dollar', symbol_native: '$', decimal_digits: 2, rounding: 0, code: 'USD', name_plural: 'US dollars'} |
getAllCountryStateNames() | Return the states of the coutries | [{"country": "Afghanistan", "states": [ "Badakhshan", "Badghis", "Baghlan", ...]}, {"country": "Albania", "states": ["Berat", "Dibres", "Durres",...]}] |
getCountryByCode("+91-7976411430") | Pass the mobile number with country code and it returns the country information | {"name": "India", "dial_code": "+91", "code": "IN" } |
getCountryInfo(paramObject) | const paramObject = {methodType: keyword, (keywords can be string or array, keyword values are: CONTINENT_NAME, COUNTRY_CODE, COUNTRY_TIME_ZONE, COUNTRY_NAMES, LANGUAGES, ISO_CODES, FLAG, CALLING_CODE, COUNTRY_CAPITALS, CURRENCY, COUNTRY_STATE_NAMES) attributes: empty or country name} | returns according to the parameters |
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 2/3 approved changesets -- score normalized to 6
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
26 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More