We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
url.parse
1 parent bcca6b1 commit 2740cd6Copy full SHA for 2740cd6
index.js
@@ -62,7 +62,7 @@ function parse(str) {
62
63
if (!obj.host && (/^git@/).test(str) === true) {
64
// return the correct host for git@ URLs
65
- obj.host = url.parse('http://' + str).host;
+ obj.host = url.parse('http://' + str.replace(/git@([^:]+):/, '$1/')).host;
66
}
67
68
obj.path = trimSlash(obj.path);
test/index.js
@@ -5,6 +5,10 @@ var test = require('tape');
5
var gh = require('../');
6
7
test('parse-github-url', function (t) {
8
+ process.on('warning', function (e) {
9
+ t.fail(e, 'no deprecation warnings are issued');
10
+ });
11
+
12
t.equal(gh('toString').href, 'toString');
13
14
t.test('gets the user:', function (assert) {
0 commit comments