Files
npm/lib/utils/is-git-url.js
Robert Kowalski dec660c2a1 ls: show git urls in parentheses
If a project specifies git urls for dependencies these are shown
in parentheses after the name@version to make it easier for
users to recognize potential forks of a project.

Fixes #3570
2013-06-25 01:19:08 -04:00

14 lines
230 B
JavaScript

module.exports = isGitUrl
function isGitUrl (url) {
switch (url.protocol) {
case "git:":
case "git+http:":
case "git+https:":
case "git+rsync:":
case "git+ftp:":
case "git+ssh:":
return true
}
}