@jswork/root-domain
v1.0.0
Published
Extract root domain name from an URL.
Downloads
7
Readme
root-domain
Extract root domain name from an URL.
installation
npm install @jswork/root-domain
usage
import rd from '@jswork/root-domain';
rd('www.baidu.com'); // baidu.com
rd('https://api.js.work:8080/v1/user'); // js.work
rd('http://localhost'); // localhost
license
Code released under the MIT license.