const parseUrl = require('parse-url'); const url = 'git+ssh://git@softhunt.net/path/to/resource.git'; const parsedUrl = parseUrl(url); console.log(parsedUrl)