npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@andreasnicolaou/country-kit

v2.2.1

Published

A comprehensive package for working with country data. Includes ISO codes, names in multiple languages, capitals, currencies, continents and more.

Downloads

249

Readme

Country Kit - Comprehensive Country Data

A comprehensive package for working with country data. Includes ISO codes, names in multiple languages, capitals, currencies, continents and more.

Installation

npm install @andreasnicolaou/country-kit

Usage

Importing the Library

import { CountryKit } from '@andreasnicolaou/country-kit';

Get all Countries

const countries = CountryKit.getAllCountries();
console.log(countries); // Logs all countries

Get countries by Continent

const countries = CountryKit.getCountriesByContinent('Asia');
console.log(countries); // Logs all countries with continent 'Asia'

Get countries by Currency

const countries = CountryKit.getCountriesByCurrency('USD');
console.log(countries); // Logs all countries with currency 'USD'

Get countries by Language

const countries = CountryKit.getCountriesByLanguage('Spanish');
console.log(countries); // Logs all countries with language 'Spanish'

Get country by Code

const country = CountryKit.getCountryByCode('us');
console.log(country); // Logs US country data

Country Object Structure

| Property | Type | Description | | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | code | string \| null | The two-letter ISO 3166-1 country code. | | code3 | string \| null | The three-letter ISO 3166-1 country code. | | numeric_code | string \| null | The numeric ISO 3166-1 country code. | | name | string \| null | The common name of the country. | | official_name | string \| null | The official name of the country. | | native_name | string \| null | The native name of the country. | | translations | Record<'ara' \| 'bre' \| 'ces'\| 'chn'\| 'cym'\| 'deu'\| 'esp'\| 'est'\| 'fin'\| 'fra'\| 'grc'\| 'hrv'\| 'hun'\| 'idn'\| 'ind'\| 'ita'\| 'jpn'\| 'kor'\| 'nld'\| 'per'\| 'pol'\| 'por'\| 'prt'\| 'rus'\| 'sau'\| 'slk'\| 'spa'\| 'srp'\| 'swe'\| 'tha'\| 'tur'\| 'urd'\| 'usa'\| 'vnm'\| 'zho' , string> | A record of country names translated into various languages. | | capital | string \| null | The capital city of the country. | | continent | string \| null | The continent where the country is located. | | subregion | string \| null | The subregion where the country is located. | | tld | string[] | An array of top-level domains associated with the country. | | flag | string \| null | The URL of the country’s flag. | | emoji | string \| null | The emoji representation of the country's flag. | | currency | { code: string; name: string; symbol: string }[] | An array of currency objects with code, name, and symbol. | | languages | string[] | An array of official languages spoken in the country. | | timezones | string[] | An array of timezones used in the country. | | phone_code | string \| null | The international dialing code of the country. | | latlng | number[] \| null | The latitude and longitude coordinates of the country. | | population | number \| null | The estimated population of the country. | | area | number \| null | The total land area of the country in square kilometers. | | gdp | number \| null | The Gross Domestic Product of the country in USD. | | drives_on | 'left' \| 'right' \| null | The side of the road vehicles drive on in the country. | | demonym | string \| null | The demonym used for people from the country. | | world_share | string \| null | The percentage of the world’s population living in this country. |

Data Sources

Country data have been generated using the following sources:

  • REST Countries API - Providing detailed country information, including ISO codes, names, capitals, currencies, languages, and geographic data.
  • World Bank API - Providing population, GDP, and area statistics with the following indicators:
    • SP.POP.TOTL - Total population
    • NY.GDP.MKTP.CD - GDP (current US$)
    • AG.SRF.TOTL.K2 - Surface area (sq. km)

Contributing

Contributions are welcome! If you encounter issues or have ideas to enhance the library, feel free to submit an issue or pull request.