Skip to main content
JavascriptJS String/String Related

JavaScript PSL | A quick way to get domain, tld, sld, domain and sub domain from a String | Validate domain name

By March 1, 2023No Comments

Here’s a JavaScript library that helps extracts part from the URL. i.e. TLD (e.g. .com), Second level domain e.g. google, and subdomain e.g. mail, and domain name: google.com.

The package does more than just string extractions, it also validates whether a domain is valid or not.