url-domain-name
v1.0.4
Published
Get domain name from url
Downloads
8
Maintainers
Readme
url-domain-name
Get domain name from url
Install
npm i url-domain-name
Usage
const Domain = require('url-domain-name');
domainName = Domain.from('https://github.com/arshadkazmi42');
console.log(domainName);
// Output
// github.com
domainName = Domain.from('https://mail.google.com/arshadkazmi42');
console.log(domainName);
// Output
// mail.google.com
API
- from(url)
- Returns domain name from input url
Contributing
Interested in contributing to this project? You can log any issues or suggestion related to this library here
Read our contributing guide on getting started with contributing to the codebase
Contributors
Thank you to all the contributors who have helped us in making this project better :raised_hands: