{"id":15862091,"url":"https://github.com/afeiship/root-domain","last_synced_at":"2025-04-01T20:35:25.280Z","repository":{"id":57122788,"uuid":"275696973","full_name":"afeiship/root-domain","owner":"afeiship","description":"Extract root domain name from an URL.","archived":false,"fork":false,"pushed_at":"2023-09-24T13:07:15.000Z","size":43,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T22:55:56.356Z","etag":null,"topics":["ajax","args","arguments","fetch","http","next","parse","request"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/afeiship.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-29T00:58:34.000Z","updated_at":"2023-09-29T11:44:11.000Z","dependencies_parsed_at":"2022-08-24T14:59:31.715Z","dependency_job_id":null,"html_url":"https://github.com/afeiship/root-domain","commit_stats":null,"previous_names":["afeiship/next-parse-request-args"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Froot-domain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Froot-domain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Froot-domain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Froot-domain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afeiship","download_url":"https://codeload.github.com/afeiship/root-domain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246709935,"owners_count":20821298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ajax","args","arguments","fetch","http","next","parse","request"],"created_at":"2024-10-05T22:24:22.496Z","updated_at":"2025-04-01T20:35:25.256Z","avatar_url":"https://github.com/afeiship.png","language":"TypeScript","readme":"# root-domain\n\u003e Extract root domain name from an URL.\n\n[![version][version-image]][version-url]\n[![license][license-image]][license-url]\n[![size][size-image]][size-url]\n[![download][download-image]][download-url]\n\n## installation\n```shell\nnpm install @jswork/root-domain\n```\n\n## usage\n```js\nimport rd from '@jswork/root-domain';\n\nrd('www.baidu.com');                      // baidu.com\nrd('https://api.js.work:8080/v1/user');   // js.work\nrd('http://localhost');                   // localhost\n```\n\n## license\nCode released under [the MIT license](https://github.com/afeiship/root-domain/blob/master/LICENSE.txt).\n\n[version-image]: https://img.shields.io/npm/v/@jswork/root-domain\n[version-url]: https://npmjs.org/package/@jswork/root-domain\n\n[license-image]: https://img.shields.io/npm/l/@jswork/root-domain\n[license-url]: https://github.com/afeiship/root-domain/blob/master/LICENSE.txt\n\n[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/root-domain\n[size-url]: https://github.com/afeiship/root-domain/blob/master/dist/root-domain.min.js\n\n[download-image]: https://img.shields.io/npm/dm/@jswork/root-domain\n[download-url]: https://www.npmjs.com/package/@jswork/root-domain\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Froot-domain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafeiship%2Froot-domain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Froot-domain/lists"}