Giter Site home page Giter Site logo

country-list-with-dial-code-and-flag's Introduction

Country list with dial code and flag

npm version ts contributors

This package provide all country list with their flag emoji, flag svg and dial number code.

Installation

Via NPM

npm install country-list-with-dial-code-and-flag

Via CDN

<script src="https://cdn.jsdelivr.net/npm/country-list-with-dial-code-and-flag/dist/main.js"></script>
Country Flag SVG (optional)
<script src="https://cdn.jsdelivr.net/npm/country-list-with-dial-code-and-flag/dist/country-flag-svg.js"></script>
<div id="flag"></div>
<script>
  const mm = window.CountryList.findOneByCountryCode('mm')
  document.getElementById('flag').innerHTML = window.CountryFlagSvg[mm.code]
</script>

Development

Want to contribute? Great! Fork the repo and create PR to us.

country-list-with-dial-code-and-flag's People

Contributors

ajzkk avatar astamataris avatar dependabot[bot] avatar labheshwar avatar necessarylion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

country-list-with-dial-code-and-flag's Issues

Support React Native Import

I tried using this inside a RN project with require and import methods but it failed with some error about __esModule being invalid.

My guess is this is designed more with browsers in mind.

How to load the images?

Is there any example on how to display flags?

If there is no way to display flag with this package, we just need index.js file not entire package.

Wrong and missing dial codes

Hello, I discovered 2 errors in your data:

Wrong dial code:
❌ +595 is duplicated by Paraguay and Guayana in your data file
✅ Prefix por Paraguay is +595 and for Guyana is +592

Missing country:
⚠️ South Sudan 🇸🇸 (+211) is missing . It's different country as Sudan (Sudan is included)

Icon Missing

How to get icons along with the raw data?
There should be icons I did not find it.

Add country name with local language

Objective

Add country name with local language

Example

{ name: 'Myanmar', 'local_name' : 'မြန်မာ', dial_code: '+95', code: 'MM', flag: '🇲🇲' },
{ name: 'Thailand', 'local_name' : 'ประเทศไทย', dial_code: '+66', code: 'TH', flag: '🇹🇭' },

Random flags

When i search for a flag still random flag appears
Screenshot 2023-06-28 145619

Countries with multiple area codes are restricted to a single area code

Countries like the Dominican Republic and Jamaica have several area codes but the library has chosen one of several and forced it... can we either get additional countries added for the variety of area codes OR (preferably) remove the area code either entirely or remove the area code when there are multiple for a given country?

Full list of country codes can be found here with area codes being broken out into parentheses when applicable:
https://en.wikipedia.org/wiki/List_of_country_calling_codes

image

image

Emoji displaying

I see, that you've already answered on issues like that, but it IS here. They are partially displayed. And when they are not, the text is displayed. Like on the attached screenshot. I am using Angular.
imgpsh_fullsize_anim

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.