Node.js urlObject.hostname API
The url.hostname is an inbuilt application programming interface of class URL within the url module which is used to get and set the hostname portion of the URL. The url.hostname does not include the port number.
It associates by single value url which is an object created by URL constructor.
Before Change gfg.org After Change geeksforgeeks.org