mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
doc: clarify treatment of non-string base in URL()
PR-URL: https://github.com/nodejs/node/pull/41685 Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
1 parent
b83e661d30
commit
ae34900ccb
1 file changed
+2
-2
+2
-2
@@ -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)`.
|
||||
|
||||
Reference in new issue
Block a user