domain-parser
v0.0.5
Published
Getting the domain name without subdomains.
Downloads
4
Readme
node-domain-parser
A simple domain parser, getting the domain name without subdomains.
install
npm
npm install domain-parser
usage
var dp = require('domain-parser');
var result = dp('www.google.com.tw').domainName;
console.log(result);
// google.com.tw
result = dp('direct.jp-bank.japanpost.jp').domainName;
console.log(result);
// japanpost.jp
license
MIT