1.1.0 • Published 2 months ago

countries-phone-masks v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Countries Phone Masks

Phone masks, ISO codes and flags for all countries

Inspiration

After the need to add international phone masks into an application, I stumbled upon many libraries but they seemed too outdated or just too complex to just give me the country code, country name, flag and phone mask. This list contains a hybrid of gists, libraries and wikipedia articles. Any issues, kindly, consider creating an issue or a pull request.

Installation

npm install countries-phone-masks

Import

const countries = require('countries-phone-masks')
// or 
import countries from 'countries-phone-masks'

Usage

console.log(countries.find(({ name }) => name === 'Brazil'))
// {
//   name: 'Brazil',
//   code: '+55',
//   iso: 'BR',
//   flag: 'https://cdn.kcak11.com/CountryFlags/countries/br.svg',
//   mask: [ '(##)####-####', '(##)#####-####' ]
// }
1.1.0

2 months ago

1.0.8

8 months ago

1.0.7

8 months ago

1.0.6

8 months ago

1.0.5

2 years ago

1.0.2

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

3 years ago