Created
June 1, 2017 17:05
-
-
Save dmikey/05b72f48e7d32b8a653eb97fe858e341 to your computer and use it in GitHub Desktop.
This file contains 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
module.exports = function(uri) { | |
// returns protocol://hostname:port/ | |
var a = document.createElement('a'); | |
a.href = endPoints.host; | |
return a.protocol + '//' + a.host + ':' + (a.port.length > 0 ? a.port : '80') +'/'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment