{"id":18385306,"url":"https://github.com/wankdanker/node-domain-name-parser","last_synced_at":"2025-04-07T00:32:00.961Z","repository":{"id":11512397,"uuid":"13992652","full_name":"wankdanker/node-domain-name-parser","owner":"wankdanker","description":"Parse domain name into tld, sld, domain, domainName, host","archived":false,"fork":false,"pushed_at":"2016-03-02T13:47:19.000Z","size":17,"stargazers_count":5,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-26T16:04:32.564Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wankdanker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-30T16:33:38.000Z","updated_at":"2020-08-14T07:48:34.000Z","dependencies_parsed_at":"2022-09-26T17:50:48.912Z","dependency_job_id":null,"html_url":"https://github.com/wankdanker/node-domain-name-parser","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wankdanker%2Fnode-domain-name-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wankdanker%2Fnode-domain-name-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wankdanker%2Fnode-domain-name-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wankdanker%2Fnode-domain-name-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wankdanker","download_url":"https://codeload.github.com/wankdanker/node-domain-name-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223266775,"owners_count":17116516,"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":[],"created_at":"2024-11-06T01:17:14.540Z","updated_at":"2024-11-06T01:17:15.979Z","avatar_url":"https://github.com/wankdanker.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"node-domain-name-parser\n=======================\n\nA simple parser that breaks apart a domain name into its components\n\n[![build status](https://secure.travis-ci.org/wankdanker/node-domain-name-parser.png)](http://travis-ci.org/wankdanker/node-domain-name-parser)\n\ninstall\n=======\n\nnpm\n\n```bash\nnpm install domain-name-parser\n```\n\nusage\n=====\n\n```javascript\nvar parse = require('domain-name-parser')\n  , d = parse('host.subdomain.domain.com')\n  ;\n\nconsole.log(\n  d.tld            //\"com\" -- the first part on the right\n  , d.sld          //\"domain\" -- the second part from the right\n  , d.host         //\"host\" -- the left-most part\n  , d.domainName   //\"domain.com\" -- always the commonly referred to part (sld + tld)\n  , d.domain       //\"subdomain.domain.com\" -- everything except the host\n  , d.level(3)     //\"subdomain\" -- specific domain level part, 1 based (tld is level 1)\n);\n```\n\napi\n===\n\n* parse(name, opts);\n   * name - string: the domain name you want to parse\n   * opts.countryMerge - boolean, default false: if TLD is a country TLD (eg: uk, cn, ru) merge it with the next part and treat that as the TLD\n* parse.defaults(opts);\n   * opts - same as available to parse(). Used as the default for all calls to parse();\n\nlicense\n=======\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwankdanker%2Fnode-domain-name-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwankdanker%2Fnode-domain-name-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwankdanker%2Fnode-domain-name-parser/lists"}