Skip to content

Commit

Permalink
Merge branch 'patch-1' of github.com:viceice/parse-path into new-version
Browse files Browse the repository at this point in the history
  • Loading branch information
IonicaBizau committed Jul 25, 2022
2 parents cbb46e0 + 01b23dc commit 02995c6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function parsePath(url) {
output.protocols = protocols(parsed)
output.protocol = output.protocols[0]
output.port = parsed.port
output.resource = parsed.host
output.resource = parsed.hostname
output.user = parsed.username || ""
output.password = parsed.password || ""
output.pathname = parsed.pathname
Expand Down
14 changes: 14 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,20 @@ const INPUTS = [
, query: {}
, search: ""
}
], [
"https://github.com:89/org/repo.git"
, {
protocols: ["https"]
, protocol: "https"
, port: "89"
, resource: "github.com"
, user: ""
, pathname: "/org/repo.git"
, hash: ""
, href: "https://github.com:89/org/repo.git"
, query: {}
, search: ""
}
]
];

Expand Down

0 comments on commit 02995c6

Please sign in to comment.