domain-parser

0.0.5 • Public • Published

node-domain-parser

A simple domain parser, getting the domain name without subdomains.

Build Status

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

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i domain-parser

    Weekly Downloads

    1

    Version

    0.0.5

    License

    MIT

    Last publish

    Collaborators

    • kilfu0701