Created
August 21, 2014 15:45
-
-
Save yorkie/a4ba009c9ec82134cc57 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var url = require('url'); | |
var assert = require('assert'); | |
function parse(repo, githubHost) { | |
githubHost = githubHost || 'github.com' | |
if (typeof repo === 'object') | |
return repo.url | |
var repoObj = url.parse(repo); | |
var protocol = repoObj.protocol; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment