
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
nation-code-lib
Advanced tools
Una librería TypeScript para acceder y filtrar información de países, incluyendo códigos, banderas, idiomas, monedas y más.
npm install nation-code-lib
import { NationAPI } from 'nation-code-lib';
// Obtener todos los países
const allCountries = NationAPI.getAllCountries();
// Buscar país por código
const spain = NationAPI.getCountryByCode('ESP');
// Buscar país por nombre
const mexico = NationAPI.getCountryByName('Mexico');
// Obtener países por región
const southAmericanCountries = NationAPI.getCountriesByRegion('South America');
// Obtener países por continente
const europeanCountries = NationAPI.getCountriesByContinent('Europe');
// Obtener código telefónico
const phoneCode = NationAPI.getPhoneCode('ESP'); // +34
// Obtener países por idioma
const spanishSpeakingCountries = NationAPI.getCountriesByLanguage('Spanish');
// Obtener países por moneda
const euroCountries = NationAPI.getCountriesByCurrency('EUR');
// Obtener datos simplificados de países
const simplifiedCountries = NationAPI.getSimplifiedCountries();
// Obtener datos simplificados con nombres oficiales en español
const spanishCountries = NationAPI.getSimplifiedCountries('spa');
getAllCountries()Retorna un array con todos los países disponibles.
getCountryByCode(code: string)Busca un país por su código (cca2, cca3, o ccn3).
code - Código del paísgetCountryByName(name: string)Busca un país por su nombre (común u oficial).
name - Nombre del paísgetCountriesByRegion(region: string)Retorna todos los países en una región específica.
region - Nombre de la regióngetCountriesByContinent(continent: string)Retorna todos los países en un continente específico.
continent - Nombre del continentegetPhoneCode(code: string)Obtiene el código telefónico de un país.
code - Código del paísgetCountriesByLanguage(language: string)Retorna todos los países que usan un idioma específico.
language - Idioma a buscargetCountriesByCurrency(currencyCode: string)Retorna todos los países que usan una moneda específica.
currencyCode - Código de la monedagetSimplifiedCountries(lang?: string)Retorna una versión simplificada de los datos de los países.
lang - (Opcional) Código del idioma para la traducción del nombre oficial (ej: 'spa' para español)Cada país contiene la siguiente información:
Si deseas contribuir a este proyecto:
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)Este proyecto está bajo la licencia ISC. Ver el archivo LICENSE para más detalles.
FAQs
library of codes countries and flags
The npm package nation-code-lib receives a total of 1 weekly downloads. As such, nation-code-lib popularity was classified as not popular.
We found that nation-code-lib 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.