Skip to content

Commit 01cd545

Browse files
committed
📝
1 parent dd2141a commit 01cd545

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

example/index.js

+21-20
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,46 @@
22
const parsePath = require("../lib")
33

44
console.log(parsePath("http://ionicabizau.net/blog"))
5-
// { protocols: [ 'http' ],
5+
// {
6+
// protocols: [ 'http' ],
67
// protocol: 'http',
7-
// port: null,
8+
// port: '',
89
// resource: 'ionicabizau.net',
910
// user: '',
11+
// password: '',
1012
// pathname: '/blog',
1113
// hash: '',
1214
// search: '',
13-
// href: 'http://ionicabizau.net/blog' }
15+
// href: 'http://ionicabizau.net/blog',
16+
// query: {}
17+
// }
1418

1519
console.log(parsePath("http://domain.com/path/name?foo=bar&bar=42#some-hash"))
16-
// { protocols: [ 'http' ],
20+
// {
21+
// protocols: [ 'http' ],
1722
// protocol: 'http',
18-
// port: null,
23+
// port: '',
1924
// resource: 'domain.com',
2025
// user: '',
26+
// password: '',
2127
// pathname: '/path/name',
2228
// hash: 'some-hash',
2329
// search: 'foo=bar&bar=42',
24-
// href: 'http://domain.com/path/name?foo=bar&bar=42#some-hash' }
30+
// href: 'http://domain.com/path/name?foo=bar&bar=42#some-hash',
31+
// query: { foo: 'bar', bar: '42' }
32+
// }
2533

2634
console.log(parsePath("git+ssh://[email protected]/path/name.git"))
27-
// { protocols: [ 'git', 'ssh' ],
35+
// {
36+
// protocols: [ 'git', 'ssh' ],
2837
// protocol: 'git',
29-
// port: null,
38+
// port: '',
3039
// resource: 'host.xz',
3140
// user: 'git',
41+
// password: '',
3242
// pathname: '/path/name.git',
3343
// hash: '',
3444
// search: '',
35-
// href: 'git+ssh://[email protected]/path/name.git' }
36-
37-
console.log(parsePath("[email protected]:IonicaBizau/git-stats.git"))
38-
// { protocols: [],
39-
// protocol: 'ssh',
40-
// port: null,
41-
// resource: 'github.com',
42-
// user: 'git',
43-
// pathname: '/IonicaBizau/git-stats.git',
44-
// hash: '',
45-
// search: '',
46-
// href: '[email protected]:IonicaBizau/git-stats.git' }
45+
// href: 'git+ssh://[email protected]/path/name.git',
46+
// query: {}
47+
// }

0 commit comments

Comments
 (0)