/get-domain-from-url

⚙️ Simple function to extract the domain from an url

Primary LanguageJavaScriptMIT LicenseMIT

get-domain-from-url

Get domain from an url

NPM version Build status Dependency Status devDependency Status Code Climate Dependency Status

Usage

const getDomain = require('get-domain-from-url');
getDomain('mail.google.com'); // google.com
getDomain('mail.google.co.uk'); // google.co.uk
getDomain('0.0.0.0:1664'); // ''

License

MIT