From 018ec32535b0d0e00b57befee21b807c91d8e63c Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 26 Jan 2022 21:45:53 -0800 Subject: [PATCH] doc: clarify treatment of non-string base in URL() PR-URL: https://github.com/nodejs/node/pull/41685 Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Darshan Sen --- doc/api/url.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/url.md b/doc/api/url.md index 0dc4620c41d5fc..1fd63a842fb200 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -132,8 +132,8 @@ return `true`. * `input` {string} The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is [converted to a string][] first. -* `base` {string|URL} The base URL to resolve against if the `input` is not - absolute. +* `base` {string} The base URL to resolve against if the `input` is not + absolute. If `base` is not a string, it is [converted to a string][] first. Creates a new `URL` object by parsing the `input` relative to the `base`. If `base` is passed as a string, it will be parsed equivalent to `new URL(base)`.