Gathering detailed insights and metrics for country-query
Gathering detailed insights and metrics for country-query
Gathering detailed insights and metrics for country-query
Gathering detailed insights and metrics for country-query
@ladjs/country-language
Maintained fork of country-language with zero-dependencies. Query languages spoken to a country or countries where people speak a language.
country-language
Query languages spoken to a country or countries where people speak a language.
country-data-query
Easy and powerful library for query complex country and regions data in simple and effective way by country code, currency code, dial code in various filters.
@dear-rama/country-query
A javascript query API for world-countries data
npm install country-query
Typescript
Module System
Node Version
NPM Version
73.2
Supply Chain
98.9
Quality
76
Maintenance
100
Vulnerability
99.3
License
JavaScript (100%)
Total Downloads
267,625
Last Day
16
Last Week
274
Last Month
1,099
Last Year
92,042
10 Stars
53 Commits
3 Forks
1 Watchers
3 Branches
3 Contributors
Updated on Aug 12, 2024
Latest Version
2.0.3
Package Id
country-query@2.0.3
Unpacked Size
30.54 kB
Size
7.23 kB
File Count
10
NPM Version
6.14.16
Node Version
14.19.1
Cumulative downloads
Total Downloads
Last Day
-72.4%
16
Compared to previous day
Last Week
17.6%
274
Compared to previous week
Last Month
-80.2%
1,099
Compared to previous month
Last Year
-10.9%
92,042
Compared to previous year
2
5
A javascript query API for world-countries data.
Finds data for one or more countries matching some search value.
Takes a property name to search by and a value to search for. If the value matches a single country, an object containing that country's data will be returned. If the value matches more than one country, an array of country objects will be returned. If no countries match, or an invalid property name is used, returns null
.
This function is not case-sensitive, i.e the input values German
, german
and gErMaN
would all match the language German
.
1var CountryQuery = require('country-query') 2 3var austria = CountryQuery.find('cca2', 'AT') 4var germany = CountryQuery.find('demonym', 'German') 5 6// austria and germany will both be objects with this structure: 7/* 8 { 9 "name": { 10 "common": "Austria", 11 "official": "Republic of Austria", 12 "native": { 13 "bar": { 14 "official": "Republik Österreich", 15 "common": "Österreich" 16 } 17 } 18 }, 19 "tld": [".at"], 20 "cca2": "AT", 21 "ccn3": "040", 22 "cca3": "AUT", 23 "cioc": "AUT", 24 "independent": true, 25 "status": "officially-assigned", 26 "currencies": { 27 "EUR": { "name": "Euro", "symbol": "\u20ac" } 28 }, 29 "idd": { 30 "root": "+4", 31 "suffixes": ["3"] 32 }, 33 "capital": ["Vienna"], 34 "altSpellings": ["AT", "Osterreich", "Oesterreich"], 35 "region": "Europe", 36 "subregion": "Western Europe", 37 "languages": { 38 "bar": "Austro-Bavarian German" 39 }, 40 "translations": { 41 "ces": { 42 "official": "Rakouská republika", 43 "common": "Rakousko" 44 }, 45 "cym": { 46 "official": "Gweriniaeth Awstria", 47 "common": "Awstria" 48 }, 49 "deu": { 50 "official": "Republik Österreich", 51 "common": "Österreich" 52 }, 53 // ...snip... 54 }, 55 "latlng": [47.33333333, 13.33333333], 56 "landlocked": true, 57 "borders": ["CZE", "DEU", "HUN", "ITA", "LIE", "SVK", "SVN", "CHE"], 58 "area": 83871, 59 "flag": "\ud83c\udde6\ud83c\uddf9", 60 "demonyms": { 61 "eng": { 62 "f": "Austrian", 63 "m": "Austrian" 64 }, 65 "fra": { 66 "f": "Autrichienne", 67 "m": "Autrichien" 68 } 69 } 70 } 71 */ 72 73var euroCountries = CountryQuery.find('currencies', 'EUR') 74 75// euroCountries will be an array of country objects
Acceptable values for by
are:
tld
currencies
idd
altSpellings
latlng
borders
name.common
name.official
name.native
translations
languages
cca2
ccn3
cca3
capital
cioc
region
subregion
demonyms
landlocked
area
Find country by its area.
Return value is the same as find.
Find country by alternative spellings of its name.
Return value is the same as find.
Find country by countries that it borders
Return value is the same as find.
Find country by telephone calling code.
Return value is the same as find.
Find country by its capital city.
Return value is the same as find.
Find country by 2-letter country code.
Return value is the same as find.
Find country by 3-letter country code.
Return value is the same as find.
Find country by numeric country code.
Return value is the same as find.
Find country by 3-letter International Olympic Commitee country code.
Return value is the same as find.
Find country by currency.
Return value is the same as find.
Find country by one of the demonyms used for its citizens.
Return value is the same as find.
Find country by whether or not it is landlocked.
Return value is the same as find.
Find country by its language.
Return value is the same as find.
Find country by its common name.
Return value is the same as find.
Find country by its native name.
Return value is the same as find.
Find country by its official name.
Return value is the same as find.
Find country by the region it is located in.
Return value is the same as find.
Find country by subregion it is located in.
Return value is the same as find.
Find country by top level domain.
Return value is the same as find.
Find country by translations of its name.
Return value is the same as find.
This project would not exist without the work of the contributors to the world-countries data set.
Copyright (C) 2015, Peter Thompson peter.thompson@dunelm.org.uk
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
7 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
Found 0/18 approved changesets -- score normalized to 0
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
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
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
Score
Last Scanned on 2025-06-23
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