verb
Version:
Verb makes it easy to build project documentation using simple markdown templates, with zero configuration required.
17 lines (14 loc) • 408 B
JavaScript
/**
* Verb <https://github.com/assemble/verb>
* Generate markdown documentation for GitHub projects.
*
* Copyright (c) 2014 Jon Schlinkert, Brian Woodward, contributors.
* Licensed under the MIT license.
*/
;
var url = require('url');
module.exports = function(str) {
var obj = url.parse(str);
var ending = obj.path.replace(/\.git$/, '/');
return 'https://' + obj.host + ending;
};