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

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