@@ -78,48 +78,49 @@ yarn add parse-path
78
78
const parsePath = require (" parse-path" )
79
79
80
80
console .log (parsePath (" http://ionicabizau.net/blog" ))
81
- // { protocols: [ 'http' ],
81
+ // {
82
+ // protocols: [ 'http' ],
82
83
// protocol: 'http',
83
- // port: null ,
84
+ // port: '' ,
84
85
// resource: 'ionicabizau.net',
85
86
// user: '',
87
+ // password: '',
86
88
// pathname: '/blog',
87
89
// hash: '',
88
90
// search: '',
89
- // href: 'http://ionicabizau.net/blog' }
91
+ // href: 'http://ionicabizau.net/blog',
92
+ // query: {}
93
+ // }
90
94
91
95
console .log (parsePath (" http://domain.com/path/name?foo=bar&bar=42#some-hash" ))
92
- // { protocols: [ 'http' ],
96
+ // {
97
+ // protocols: [ 'http' ],
93
98
// protocol: 'http',
94
- // port: null ,
99
+ // port: '' ,
95
100
// resource: 'domain.com',
96
101
// user: '',
102
+ // password: '',
97
103
// pathname: '/path/name',
98
104
// hash: 'some-hash',
99
105
// search: 'foo=bar&bar=42',
100
- // href: 'http://domain.com/path/name?foo=bar&bar=42#some-hash' }
106
+ // href: 'http://domain.com/path/name?foo=bar&bar=42#some-hash',
107
+ // query: { foo: 'bar', bar: '42' }
108
+ // }
101
109
102
110
console .
log (
parsePath (
" git+ssh://[email protected] /path/name.git" ))
103
- // { protocols: [ 'git', 'ssh' ],
111
+ // {
112
+ // protocols: [ 'git', 'ssh' ],
104
113
// protocol: 'git',
105
- // port: null ,
114
+ // port: '' ,
106
115
// resource: 'host.xz',
107
116
// user: 'git',
117
+ // password: '',
108
118
// pathname: '/path/name.git',
109
119
// hash: '',
110
120
// search: '',
111
- // href: 'git+ssh://[email protected] /path/name.git' }
112
-
113
- console .
log (
parsePath (
" [email protected] :IonicaBizau/git-stats.git" ))
114
- // { protocols: [],
115
- // protocol: 'ssh',
116
- // port: null,
117
- // resource: 'github.com',
118
- // user: 'git',
119
- // pathname: '/IonicaBizau/git-stats.git',
120
- // hash: '',
121
- // search: '',
122
- // href: '[email protected] :IonicaBizau/git-stats.git' }
121
+ // href: 'git+ssh://[email protected] /path/name.git',
122
+ // query: {}
123
+ // }
123
124
```
124
125
125
126
@@ -158,16 +159,17 @@ Parses the input url.
158
159
159
160
#### Return
160
161
- ** Object** An object containing the following fields:
161
- - ` protocols ` (Array): An array with the url protocols (usually it has one element).
162
- - ` protocol ` (String): The first protocol, ` "ssh" ` (if the url is a ssh url) or ` "file" ` .
163
- - ` port ` (null|Number): The domain port.
164
- - ` resource ` (String): The url domain (including subdomains).
165
- - ` user ` (String): The authentication user (usually for ssh urls).
166
- - ` pathname ` (String): The url pathname.
167
- - ` hash ` (String): The url hash.
168
- - ` search ` (String): The url querystring value.
169
- - ` href ` (String): The input url.
170
- - ` query ` (Object): The url querystring, parsed as object.
162
+ - ` protocols ` (Array): An array with the url protocols (usually it has one element).
163
+ - ` protocol ` (String): The first protocol or ` "file" ` .
164
+ - ` port ` (String): The domain port (default: ` "" ` ).
165
+ - ` resource ` (String): The url domain (including subdomain and port).
166
+ - ` user ` (String): The authentication user (default: ` "" ` ).
167
+ - ` password ` (String): The authentication password (default: ` "" ` ).
168
+ - ` pathname ` (String): The url pathname.
169
+ - ` hash ` (String): The url hash.
170
+ - ` search ` (String): The url querystring value (excluding ` ? ` ).
171
+ - ` href ` (String): The normalized input url.
172
+ - ` query ` (Object): The url querystring, parsed as object.
171
173
172
174
173
175
@@ -228,39 +230,36 @@ If you are using this library in one of your projects, add it in this list. :spa
228
230
- ` eleventy-plugin-embed-soundcloud `
229
231
- ` @enkeledi/react-native-week-month-date-picker `
230
232
- ` @hemith/react-native-tnk `
231
- - ` npm_one_1_2_3 `
232
233
- ` native-kakao-login `
233
- - ` rn-adyen-dropin `
234
+ - ` npm_one_1_2_3 `
234
235
- ` react-fsm-router `
235
- - ` react-native-contact-list `
236
- - ` react-native-biometric-authenticate `
237
236
- ` react-native-arunmeena1987 `
237
+ - ` react-native-biometric-authenticate `
238
+ - ` react-native-contact-list `
238
239
- ` react-native-is7 `
240
+ - ` react-native-payu-payment-testing `
239
241
- ` react-native-kakao-maps `
240
242
- ` react-native-my-first-try-arun-ramya `
241
- - ` react-native-payu-payment-testing `
242
243
- ` react-native-ytximkit `
244
+ - ` rn-adyen-dropin `
243
245
- ` tria-prima `
244
246
- ` sm-versioning `
247
+ - ` @positionex/position-sdk `
245
248
- ` @corelmax/react-native-my2c2p-sdk `
246
- - ` @datalogic/react-native-datalogic-module `
247
249
- ` @felipesimmi/react-native-datalogic-module `
248
250
- ` @hawkingnetwork/react-native-tab-view `
249
251
- ` drowl-base-theme-iconset `
250
252
- ` native-apple-login `
251
253
- ` react-native-cplus `
252
254
- ` npm_qwerty `
253
- - ` react-native-arunjeyam1987 `
254
255
- ` react-native-bubble-chart `
256
+ - ` react-native-arunjeyam1987 `
255
257
- ` react-native-flyy `
256
- - ` @alphy11/semantic-release-gitlab `
257
- - ` @apardellass/react-native-audio-stream `
258
- - ` @fgreinacher/semantic-release-gitlab `
259
- - ` @geeky-apo/react-native-advanced-clipboard `
260
- - ` @j4s0n/semantic-release-gitlab `
261
258
- ` @saad27/react-native-bottom-tab-tour `
262
259
- ` @xudong/semantic-release-gitlab `
263
260
- ` candlelabssdk `
261
+ - ` @fgreinacher/semantic-release-gitlab `
262
+ - ` @geeky-apo/react-native-advanced-clipboard `
264
263
- ` react-native-dsphoto-module `
265
264
- ` react-native-responsive-size `
266
265
- ` react-native-sayhello-module `
@@ -271,21 +270,22 @@ If you are using this library in one of your projects, add it in this list. :spa
271
270
- ` payutesting `
272
271
- ` semantic-release-gitee `
273
272
- ` semantic-release-gitlab-plugin `
274
- - ` @pvm/github `
275
273
- ` @pvm/plugin-conventional-changelog `
276
- - ` @devdiary/semantic-devdiary-release `
277
- - ` birken-react-native-community-image-editor `
278
- - ` luojia-cli-dev `
274
+ - ` @pvm/github `
275
+ - ` @con-test/react-native-concent-common `
279
276
- ` reac-native-arun-ramya-test `
280
- - ` react-native-plugpag-wrapper `
281
- - ` react-native-pulsator-native `
282
277
- ` react-native-arun-ramya-test `
283
278
- ` react-native-arunramya151 `
279
+ - ` react-native-plugpag-wrapper `
280
+ - ` react-native-pulsator-native `
284
281
- ` react-native-transtracker-library `
285
282
- ` semantic-release-version `
283
+ - ` @devdiary/semantic-devdiary-release `
284
+ - ` luojia-cli-dev `
285
+ - ` birken-react-native-community-image-editor `
286
286
- ` @screeb/react-native `
287
- - ` @cloudoki/donderflow `
288
287
- ` @buganto/client `
288
+ - ` @cloudoki/donderflow `
289
289
- ` @tjoussen/semantic-release-gitlab-mr `
290
290
- ` astra-ufo-sdk `
291
291
- ` react-native-syan-photo-picker `
@@ -294,11 +294,12 @@ If you are using this library in one of your projects, add it in this list. :spa
294
294
- ` l2forlerna `
295
295
- ` native-google-login `
296
296
- ` raact-native-arunramya151 `
297
+ - ` react-native-modal-progress-bar `
297
298
- ` react-native-test-module-hhh `
298
299
- ` reddit-title-has-verbatim-quote `
300
+ - ` react-native-jsi-device-info `
299
301
- ` react-native-badge-control `
300
302
- ` rn-tm-notify `
301
- - ` react-native-jsi-device-info `
302
303
303
304
304
305
0 commit comments