0.1.5 • Published 4 years ago

@doxerfx/country v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

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'
}
*/