peerigon/parse-domain

Some domains are not parsed correctly

siffash opened this issue · 2 comments

Input: domain.spb.ru
Output: {domain: "spb", subdomain: "domain", tld: "ru"}
Expected output: {domain: "domain", subdomain: "", tld: "spb.ru"}

Input: domain.ru.com
Output: {domain: "ru", subdomain: "domain", tld: "com"}
Expected output: {domain: "domain", subdomain: "", tld: "ru.com"}

Input: domain.uk.com
Output: {domain: "uk", subdomain: "domain", tld: "com"}
Expected output: {domain: "domain", subdomain: "", tld: "uk.com"}

jhnns commented

Are you using privateTlds: true?

Tried with this option and it worked, thanks!