Skip to content

Commit 81e92b2

Browse files
authored
docs: add stringifyParsedURL
Updated README.md to include stringifyParsedURL
2 parents 314bf0b + 82f5789 commit 81e92b2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ parseURL('foo.com/foo?test=123#token', 'https://')
7575
// { protocol: 'https:', auth: '', host: 'foo.com', pathname: '/foo', search: '?test=123', hash: '#token' }
7676
```
7777

78+
### `stringifyParsedURL`
79+
80+
```ts
81+
const obj = parseURL('http://foo.com/foo?test=123#token')
82+
obj.host = 'bar.com'
83+
84+
stringifyParsedURL(obj)
85+
// http://bar.com/foo?test=123#token
86+
```
87+
7888
### `withQuery`
7989

8090
```ts

0 commit comments

Comments
 (0)