Closed irasanchez closed 3 years ago
Hi. You should use the { tld: true } option.
With the option flag.
➜ extract-domain-test node index.js
[ 'independent.co.uk', 'ipsf.org.il', 'indiatimes.com' ]
Hi. You should use the { tld: true } option.
Perfect, thank you!
This array of URLS
["https://www.independent.co.uk/travel/news-and-advi…terdam-rome-venice-warsaw-dubrovnik-a8108096.html", "https://www.ipsf.org.il/?section=20", "https://timesofindia.indiatimes.com/blogs/voices/g…up-for-sustainable-tourism-in-a-post-covid-world/"]
returns this array of strings
["co.uk", "org.il", "indiatimes.com"]
The first two aren't working properly for some reason.