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 🙏

© 2024 – Pkg Stats / Ryan Hefner

countries_metadata

v0.0.3

Published

List of countries containing country code, currency, dial code, continent, capital, and flags.

Downloads

17

Readme

countries_metadata

List of countries containing country code, currency, dial code, continent, capital, and flags.

Purpose

The purpose of this repository is to provide a detailed list of country metadata, encompassing essential information for each country. The metadata includes:

  • Country code: A unique code assigned to each country.
  • Flag emoji: Emoji representation of the country's flag.
  • Country name: The name of the country.
  • Dial code: The international dialing code for the country.
  • Currency code: The code representing the country's currency.
  • Continent: The continent to which the country belongs.
  • Capital: The capital city of the country.

This data is stored in countries_metadata.json and can be utilized in various applications that require country-related information.

Usage

In your nodejs project:

An array containing metadata about various countries.

import * as metadata from 'countries_metadata'

console.log(metadata.countries)

Find a country by its code.

findCountryByCode(code: string): Country | undefined
import * as metadata from 'countries_metadata'

const country = metadata.findCountryByCode('MW')

Get a country by its name.

getCountryByName(name: string): Country | undefined
import * as metadata from 'countries_metadata'

const country = metadata.findCountryByCode('Malawi')

Find countries in a specific continent.

findCountriesByContinent(continent: string): Country[]
import * as metadata from 'countries_metadata'

const country = metadata.findCountriesByContinent('Africa')

To use the country metadata in your other projects:

  1. Copy or download the countries_metadata.json file from this repository.
  2. Incorporate the data into your application or project as needed.

Data Sources

The country data, including continent and capital information, was sourced from this Gist by tiagodealmeida. The original data was enriched by integrating additional details like dial codes and currency codes.

The flag emojis used in the metadata were sourced from the country-flag-emoji-json repository by Risan.

How the Data was Generated

The countries_metadata.json file was generated by processing data from the country-flag-emoji-json repository and augmenting it with information sourced from tiagodealmeida's Gist. This resulted in a comprehensive dataset containing various details for each country.

Contributing

If you have additional information or updates to the country metadata, feel free to contribute to this repository by submitting a pull request.

License

This repository is licensed under the MIT License.