Skip to content

Commit

Permalink
chore: Sync readme and index.d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonJang committed Jun 21, 2021
1 parent 8035d21 commit f10e19a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,20 @@ declare namespace normalizeUrl {
});
//=> 'http://sindresorhus.com/?foo=bar'
```
If a boolean is provided, `true` will remove all the query parameters.
```
normalizeUrl('www.sindresorhus.com?foo=bar', {
removeQueryParameters: true
});
//=> 'http://sindresorhus.com'
```
`false` will not remove any query parameter.
```
normalizeUrl('www.sindresorhus.com?foo=bar&utm_medium=test&ref=test_ref', {
removeQueryParameters: false
});
//=> 'http://www.sindresorhus.com/?foo=bar&ref=test_ref&utm_medium=test'
```
*/
readonly removeQueryParameters?: ReadonlyArray<RegExp | string> | boolean;

Expand Down

0 comments on commit f10e19a

Please sign in to comment.