@jswork/root-domain
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

root-domain

Extract root domain name from an URL.

version license size download

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @jswork/root-domain

Homepage

js.work

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

5.3 kB

Total Files

7

Last publish

Collaborators

  • afeiship