JavaScript URL Parse, incluindo Pathname

const parseUrl = require('parse-url');
const url = 'git+ssh://[email protected]/path/to/resource.git';
const parsedUrl = parseUrl(url);

console.log(parsedUrl)
Outrageous Ostrich