https://github.com/necessarylion/country-list-with-dial-code-and-flag
Country Flag with Dial Number Code
https://github.com/necessarylion/country-list-with-dial-code-and-flag
country-codes country-flags dialcodes flag flags
Last synced: 10 days ago
JSON representation
Country Flag with Dial Number Code
- Host: GitHub
- URL: https://github.com/necessarylion/country-list-with-dial-code-and-flag
- Owner: necessarylion
- Created: 2021-06-28T09:27:37.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2025-02-15T10:28:26.000Z (2 months ago)
- Last Synced: 2025-04-04T05:08:51.277Z (19 days ago)
- Topics: country-codes, country-flags, dialcodes, flag, flags
- Language: TypeScript
- Homepage:
- Size: 4.86 MB
- Stars: 53
- Watchers: 2
- Forks: 19
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Country list with dial code and flag
[](https://badge.fury.io/js/country-list-with-dial-code-and-flag)  
This package provide all country list with their flag emoji, flag svg and dial number code.
## [Full Documentation](https://zin-kyaw-kyaw.gitbook.io/country-flags/)
## Installation
#### Via NPM
```sh
npm install country-list-with-dial-code-and-flag
``````ts
import CountryList from 'country-list-with-dial-code-and-flag'CountryList.getAll()
// Response => ArrayCountryList.findOneByCountryCode('MM')
// Response => CountryCountryList.findOneByDialCode('+95')
// Response => CountryCountryList.findByDialCode('+95')
// Response => ArrayCountryList.findByKeyword('united')
// Response => ArrayCountryList.findByCurrencyCode('TRY')
// Response => ArrayCountryList.findOneByCurrencyCode('TRY')
// Response => Country
```#### Via CDN
```html
https://cdn.jsdelivr.net/npm/country-list-with-dial-code-and-flag@latest/dist/main.js
```##### With specific version number
```bash
https://cdn.jsdelivr.net/npm/[email protected]/dist/main.js
```##### Country Flag SVG (optional)
```html
```
```html
const mm = window.CountryList.findOneByCountryCode('mm')
document.getElementById('flag').innerHTML = window.CountryFlagSvg[mm.code]```
## Development
Want to contribute? Great!
Fork the repo and create PR to us.