Socket
Socket
Sign inDemoInstall

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

Package Overview
Dependencies
0
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Country list with dial code and flag


Version published
Weekly downloads
10K
increased by19.03%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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.

Full Documentation

Installation

Via NPM
npm install country-list-with-dial-code-and-flag
import CountryList from 'country-list-with-dial-code-and-flag'

CountryList.getAll() 
// Response => Array<Country>

CountryList.findOneByCountryCode('MM') 
// Response => Country

CountryList.findOneByDialCode('+95') 
// Response => Country

CountryList.findByDialCode('+95') 
// Response => Array<Country>

CountryList.findByKeyword('united') 
// Response => Array<Country>
Via CDN
<script src="https://cdn.jsdelivr.net/npm/country-list-with-dial-code-and-flag@latest/dist/main.js"></script>

https://cdn.jsdelivr.net/npm/country-list-with-dial-code-and-flag@latest/dist/main.js
With specific version number
https://cdn.jsdelivr.net/npm/country-list-with-dial-code-and-flag@5.0.4/dist/main.js
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.

Keywords

FAQs

Last updated on 04 Jun 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc