Skip to content
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

Looks, getPublicSuffix doesn't work correctly #51

Closed
JSBizon opened this issue Dec 15, 2014 · 2 comments
Closed

Looks, getPublicSuffix doesn't work correctly #51

JSBizon opened this issue Dec 15, 2014 · 2 comments

Comments

@JSBizon
Copy link

JSBizon commented Dec 15, 2014

I tried check this function with test data:
http://mxr.mozilla.org/mozilla-central/source/netwerk/test/unit/data/test_psl.txt?raw=1

For example:
tldjs.getPublicSuffix('test.kyoto.jp') -> kyoto.jp
but have to return:
checkPublicSuffix('test.kyoto.jp', 'test.kyoto.jp');

@myndzi
Copy link
Collaborator

myndzi commented Dec 16, 2014

I think you want getDomain, not getPublicSuffix. getPublicSuffix is supposed to return the TLD-equivalent; that is, "com" from "foo.com". Try tld.getDomain('test.kyoto.jp')

@JSBizon
Copy link
Author

JSBizon commented Dec 16, 2014

yeah, looks getDomain works good. Thank you.

@JSBizon JSBizon closed this as completed Dec 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants