Gathering detailed insights and metrics for country-list-spanish
Gathering detailed insights and metrics for country-list-spanish
Gathering detailed insights and metrics for country-list-spanish
Gathering detailed insights and metrics for country-list-spanish
Get the country name in Spanish for any ISO 3166 country code, and vice versa
npm install country-list-spanish
Typescript
Module System
Node Version
NPM Version
75.8
Supply Chain
99.5
Quality
75.7
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
221,958
Last Day
29
Last Week
1,324
Last Month
6,183
Last Year
149,348
MIT License
3 Stars
32 Commits
1 Forks
2 Watchers
2 Branches
1 Contributors
Updated on Mar 24, 2025
Minified
Minified + Gzipped
Latest Version
0.3.2
Package Id
country-list-spanish@0.3.2
Unpacked Size
24.37 kB
Size
6.13 kB
File Count
7
NPM Version
8.19.3
Node Version
16.19.0
Published on
Mar 08, 2023
Cumulative downloads
Total Downloads
Last Day
11.5%
29
Compared to previous day
Last Week
4.9%
1,324
Compared to previous week
Last Month
-34.3%
6,183
Compared to previous month
Last Year
209.4%
149,348
Compared to previous year
Get the country name in Spanish for any ISO 3166-1 alpha-2 country code, and vice versa.
The full list of 263 country names and codes in this package is composed as follows:
As with any other node package:
1npm install country-list-spanish
The package exports four functions:
Arguments: 1, string
, an ISO 3166-1 alpha-2 code.
Returns: string
, a country name in Spanish.
If the code parameter is left empty or it's not in the list, returns undefined
.
1const { getCountry } = require("country-list-spanish"); 2 3console.log(getCountry("PM")); // logs 'San Pedro y Miquelón' 4console.log(getCountry("IC")); // logs 'Islas Canarias' 5console.log(getCountry("NJ")); // logs undefined
Arguments: 1, string
, a country name in Spanish.
Returns: string
, an ISO 3166-1 alpha-2 code.
If the country parameter is left empty or it's not in the list, returns undefined
.
1const { getCode } = require("country-list-spanish"); 2 3console.log(getCode("San Pedro y Miquelón")); // logs 'PM' 4console.log(getCode("Islas Canarias")); // logs 'IC' 5console.log(getCode("País de Nunca Jamás")); // logs undefined
Arguments: 0 or 1, object
, a config object (see table below and examples).
Returns: array
(default) or object
, with all the countries in the list.
By default, the function returns an array with all 249 official country names in it.
If { object: true }
is passed as config, the function returns an object of code-country (key-value) pairs.
If { extended: true }
is passed, the exceptionally reserved codes are included in the response.
1const { getCountries } = require("country-list-spanish"); 2 3console.log(getCountries()); // logs [ "Andorra", "Emiratos Árabes Unidos", ... ], an array of length 249 4console.log(getCountries({ object: true, extended: true })); // logs { AD: "Andorra", AE: "Emiratos Árabes Unidos", ... }, an object with 263 key-value pairs
Arguments: 0 or 1, object
, a config object (see below).
Returns: array
(default) or object
, with all the codes in the list.
By default, the function returns an array with all 249 official codes in it.
If {object: true}
is passed as config, the function returns an object of country-code (key-value) pairs.
If {extended: true}
is passed, the exceptionally reserved codes are included in the response.
1const { getCodes } = require("country-list-spanish"); 2 3console.log(getCodes()); // logs [ "AD", "AE", ... ], an array of length 249 4console.log(getCodes({ object: true })); // logs { Andorra: "AD", Emiratos Árabes Unidos: "AE", ... }, an object with 249 key-value pairs
param | type | default | feature |
---|---|---|---|
object | boolean | false | Return an array or an object |
extended | boolean | false | Include the 14 reserved/extra codes or not |
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
5 existing vulnerabilities detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- 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
Score
Last Scanned on 2025-06-09
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