Turn a URL, no matter how incomplete, into its domain name
npm install domain-from-partial-urldomain-from-partial-url



Turn a URL, no matter how incomplete, into its domain name
npm install domain-from-partial-url
The module exports a single function which will take a vaguely URL-like thing and spit out a domain. For example:
``js
var domainFromPartialUrl = require('domain-from-partial-url');
domainFromPartialUrl('example.com'); // example.com
domainFromPartialUrl('http://example.com'); // example.com
domainFromPartialUrl('example.com/someinfo.html'); // example.com
domainFromPartialUrl('https://example.com/lots/of/stuff/index.html'); // example.com
``
LGPL 3.0+
AJ Jordan