From 4e2b52ce9d0ef7988b0002599022cea3510b02f0 Mon Sep 17 00:00:00 2001 From: Rendall Date: Sun, 16 Jul 2023 23:26:35 +0300 Subject: [PATCH] Fix some code examples (#185) Co-authored-by: Sindre Sorhus --- index.d.ts | 4 ++-- readme.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.d.ts b/index.d.ts index 42948b7..f821193 100644 --- a/index.d.ts +++ b/index.d.ts @@ -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' ``` */ diff --git a/readme.md b/readme.md index 45cf82c..ab3dd47 100644 --- a/readme.md +++ b/readme.md @@ -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' ```