const parseUrl = require('parse-url'); const url = 'https://www.softhunt.net/'; const parsedUrl = parseUrl(url); console.log(parsedUrl)