-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
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
tldjs.getDomain('acc1sub1-dot-moisestest.appspot.com') returns 'acc1sub1-dot-moisestest.appspot.com' #120
Comments
Hi @mbelchin, Thanks for reaching out! I get slightly different results for this domain (with latest version of the rules): > tldjs.parse('acc1sub1-dot-moisestest.appspot.com')
{ hostname: 'acc1sub1-dot-moisestest.appspot.com',
isValid: true,
isIp: false,
tldExists: true,
publicSuffix: 'appspot.com',
domain: 'acc1sub1-dot-moisestest.appspot.com',
subdomain: '' }
> tldjs.getSubdomain('acc1sub1-dot-moisestest.appspot.com')
'' The result is still surprising, but it can be explained by the fact that
I did not have time to experiment with the proposed solution since then unfortunately. But if |
Hi, thanks for that quick and detailed answer.
you meant subdomain right? becase
parse will return empty for subdomain |
@mbelchin Right, I think the "trick" works for a slightly different use-case. If you would try to parse On the other hand, in your case, checking if |
Hi,
I'm just testing this library and I'm surprised by this results:
tldjs.getDomain('acc1sub1-dot-moisestest.appspot.com') returns 'acc1sub1-dot-moisestest.appspot.com'
Shouldn't return
appspot.com
instead ?tldjs.getSubdomain('acc1sub1-dot-moisestest.appspot.com') returns 'acc1sub1-dot-moisestest.appspot.com'
Shouldn't return
acc1sub1-dot-moisestest
instead ?Thanks in advance.
The text was updated successfully, but these errors were encountered: