summaryrefslogtreecommitdiff
path: root/deps/npm/lib/utils/is-git-url.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/utils/is-git-url.js')
-rw-r--r--deps/npm/lib/utils/is-git-url.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/deps/npm/lib/utils/is-git-url.js b/deps/npm/lib/utils/is-git-url.js
new file mode 100644
index 000000000..7ded4b602
--- /dev/null
+++ b/deps/npm/lib/utils/is-git-url.js
@@ -0,0 +1,13 @@
+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
+ }
+}