Skip to content

Commit

Permalink
Fix some code examples (#185)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
  • Loading branch information
rendall and sindresorhus committed Jul 16, 2023
1 parent 2d0bafe commit 4e2b52c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions index.d.ts
Expand Up @@ -61,10 +61,10 @@ export type Options = {
@example
```
normalizeUrl('user:password@sindresorhus.com');
normalizeUrl('https://user:password@sindresorhus.com');
//=> 'https://sindresorhus.com'
normalizeUrl('user:password@sindresorhus.com', {stripAuthentication: false});
normalizeUrl('https://user:password@sindresorhus.com', {stripAuthentication: false});
//=> 'https://user:password@sindresorhus.com'
```
*/
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Expand Up @@ -105,10 +105,10 @@ Default: `true`
Strip the [authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) part of the URL.

```js
normalizeUrl('user:password@sindresorhus.com');
normalizeUrl('https://user:password@sindresorhus.com');
//=> 'https://sindresorhus.com'

normalizeUrl('user:password@sindresorhus.com', {stripAuthentication: false});
normalizeUrl('https://user:password@sindresorhus.com', {stripAuthentication: false});
//=> 'https://user:password@sindresorhus.com'
```

Expand Down

0 comments on commit 4e2b52c

Please sign in to comment.