Get countries' domain names and reverse.
npm i --save domainname
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
domainOf (parameter : string
)
Description : returns a domain name.
Returns : string
isDomainOf (parameter : string
)
Description : returns name of a country.
Returns string