We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsing the following domain:
> await ParseDomain.parseDomain("analytics.withgoogle.com"); { type: 'LISTED', hostname: 'analytics.withgoogle.com', labels: [ 'analytics', 'withgoogle', 'com' ], icann: { subDomains: [ 'analytics' ], domain: 'withgoogle', topLevelDomains: [ 'com' ] }, subDomains: [], domain: 'analytics', topLevelDomains: [ 'withgoogle', 'com' ] }
I would have expected the subdomain array to include "analytics" and for the domain and TLD to be different.
Here's an example where this works correctly:
> await ParseDomain.parseDomain("analytics.google.com"); { type: 'LISTED', hostname: 'analytics.google.com', labels: [ 'analytics', 'google', 'com' ], icann: { subDomains: [ 'analytics' ], domain: 'google', topLevelDomains: [ 'com' ] }, subDomains: [ 'analytics' ], domain: 'google', topLevelDomains: [ 'com' ] }
The text was updated successfully, but these errors were encountered:
withgoogle.com is listed as public suffix and therefore treated as a top-level domain.
withgoogle.com
It's explained in the README: https://github.com/peerigon/parse-domain#%EF%B8%8F-effective-tlds--tlds-acknowledged-by-icann
Sorry, something went wrong.
@jhnns Aha! Thank you for explaining that and the link - that makes total sense. 👍
No branches or pull requests
Parsing the following domain:
I would have expected the subdomain array to include "analytics" and for the domain and TLD to be different.
Here's an example where this works correctly:
The text was updated successfully, but these errors were encountered: