psl icon indicating copy to clipboard operation
psl copied to clipboard

psl.get('1.2.3.4') returns last two numbers of IP

Open aalexgabi opened this issue 5 years ago • 0 comments

Example:

> require('psl').get('1.2.3.4')
'3.4'

I think this should return the entire IP and not part of it.

This also does not work with ipv6:

> require('psl').get('2001:0db8:85a3:0000:0000:8a2e:0370:7334')
null

I'm not sure if this is within the scope of this module though. Is this module used to get the domain (in a cookie sense) on which a cookie can be set when given a hostname (domain or ip) or is this module only used to provide the public suffix when given a real domain?

aalexgabi avatar Jul 13 '18 09:07 aalexgabi