X Tutup
The Wayback Machine - https://web.archive.org/web/20220320055727/https://github.com/nodejs/node/commit/ae34900ccb
Skip to content
Permalink
Browse files
doc: clarify treatment of non-string base in URL()
PR-URL: #41685
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
Trott authored and ruyadorno committed Feb 7, 2022
1 parent b83e661 commit ae34900ccbfa746cecd4928f68c4e91b5eeec4e1
Showing with 2 additions and 2 deletions.
  1. +2 −2 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)`.

0 comments on commit ae34900

Please sign in to comment.
X Tutup