peerigon / parse-domain

Splits a hostname into subdomains, domain and (effective) top-level domains.
MIT License
503 stars 71 forks source link

result.domain not correct #132

Closed librz closed 3 years ago

librz commented 3 years ago
const result = parseDomain(`amazonaws.com`);
console.log(result);

result.type is listed, however, result.domain is undefined, which is very strange

librz commented 3 years ago

result.icann.domain has value though

jhnns commented 3 years ago

That's intended, see README.

Use the icann property if you don't want private namespaces.