Country-Search NPMJS
You can find information about the countries with their: Code, Capital, Currency, Phone
Country Information Utility Library
Features
- Search by Phone, Currency, Capital, name
Installation
$ npm i @doxerfx/country
Usage
const country = require('');
// GetCountry whitout filter
console.log(Country['PT'])
// Result->
/*
{
name: 'Portugal',
code: 'PT',
capital: 'Lisbon',
phone: '351',
currency: 'EUR'
}
*/
// GetCountry by name
console.log(Country.Country['Switzerland'])
// Result->
/*
{
name: 'Switzerland',
code: 'CH',
capital: 'Berne',
phone: '41',
currency: 'CHF'
}
*/
// GetCountry by code
console.log(Country.Code['PT'])
// Result->
/*
{
name: 'Portugal',
code: 'PT',
capital: 'Lisbon',
phone: '351',
currency: 'EUR'
}
*/
// GetCountry by cypital
console.log(Country.Capital['Berne'])
// Result->
/*
{
name: 'Switzerland',
code: 'CH',
capital: 'Berne',
phone: '41',
currency: 'CHF'
}
*/
// GetCountry by Phone
console.log(Country.Phone['41'])
// Result->
/*
{
name: 'Switzerland',
code: 'CH',
capital: 'Berne',
phone: '41',
currency: 'CHF'
}
*/