/domainName

Get countries' domain names

Primary LanguageJavaScriptMIT LicenseMIT

domainName Build Status

Get countries' domain names and reverse.

Installation

npm i --save domainname

Usage

Get name of a country by it's domain name :

var domains = require('domainname');

var test = domains.isDomainOf('.ca');
console.log(test); // Canada

Get domain name by name of a country:

var domains = require('domainname');

var test = domains.domainOf('Spain');
console.log(test); // .es

Api

domainOf (parameter : string)
Description : returns a domain name.
Returns : string

isDomainOf (parameter : string)
Description : returns name of a country.
Returns string