![]() |
The url.host is an inbuilt application programming interface of class URL with in url module. It returns the Punycode ASCII serialization of the domain. If domain is an invalid domain, the empty string is returned. Syntax : const url.domainToASCII Domain value : string Return value : string Example :
OUTPUT: xn--espaol-zwa.com xn--fiq228c.com // Prints an empty string in the 3'rd case Note : It performs the inverse operation to url.domainToUnicode(). |
Reffered: https://www.geeksforgeeks.org
Node.js |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 12 |