summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/github-url-from-username-repo/index.js
blob: 46b0bb51399fb8da93c797ae0af79f4f183738f5 (plain)
1
2
3
4
5
6
7
8
9
module.exports = getUrl

function getUrl (r) {
  if (!r) return null
  if (/^[\w-]+\/[\w\.-]+$/.test(r))
    return "git://github.com/" + r
  else
    return null
}