const GitUrlParse = require("git-url-parse");
const x1= GitUrlParse("http://github.com/IonicaBizau/node-git-url-parse.git");
console.log(x1);
console.log(x1.toString(x1.protocols == ['ssh'] ? 'git+ssh' : undefined));
const x2 = GitUrlParse("git@gitlab.example.com:IonicaBizau/node-git-url-parse.git");
console.log(x2);
console.log(x2.toString(x2.protocols == ['ssh'] ? 'git+ssh' : undefined));