Skip to content

JavaScript npm package: List of countries with useful info, and search functions

Notifications You must be signed in to change notification settings

Stacrypt/world-countries-info

Repository files navigation

World Countries Info

Install

npm install @stacrypt/world-countries-info

This package helps you if you need the list of countries for your web app! This package provides you a complete list of countries in the world, and some useful functions.

Usage

import countries, { getCountry, getCountryByDialCode, getFullSvgUrl } from 'world-countries-info'


// An array of all countries you can use in any way!

countries.filter(country => country.emoji === "🇺🇸")


// Use this function to find the correct country based on it's name (english, and persian) or code (alpha2, alpha3, numeric) or even it's emoji!

const US = getCountry("US")


// Use this function to find the correct country based on it's dial code

const Netherlands = getCountryByDialCode(528)


// This function helps you get the full svg url from wikimedia

const USSvgUrl = US && getFullSvgUrl(US.svgUrl)

These packages/codes helped us with this package:

About

JavaScript npm package: List of countries with useful info, and search functions

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published