Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2022-01-25 06:43:55 +0300
committerGitHub <noreply@github.com>2022-01-25 06:43:55 +0300
commit6023bedc07bbbd6128aabe8bb9b4f193f40712c5 (patch)
tree0537ce52231961868b038812d5e7a3afb41e9327 /doc
parent88a3bd5fcd8adb281587a4d8442155c89fac0094 (diff)
doc: revise url.resolve() text
PR-URL: https://github.com/nodejs/node/pull/41661 Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/url.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/api/url.md b/doc/api/url.md
index c8dfac649dc..0077873b80b 100644
--- a/doc/api/url.md
+++ b/doc/api/url.md
@@ -1585,11 +1585,11 @@ changes:
> Stability: 3 - Legacy: Use the WHATWG URL API instead.
-* `from` {string} The Base URL being resolved against.
-* `to` {string} The HREF URL being resolved.
+* `from` {string} The base URL to use if `to` is a relative URL.
+* `to` {string} The target URL to resolve.
The `url.resolve()` method resolves a target URL relative to a base URL in a
-manner similar to that of a Web browser resolving an anchor tag HREF.
+manner similar to that of a web browser resolving an anchor tag.
```js
const url = require('url');
@@ -1598,7 +1598,7 @@ url.resolve('http://example.com/', '/one'); // 'http://example.com/one'
url.resolve('http://example.com/one', '/two'); // 'http://example.com/two'
```
-You can achieve the same result using the WHATWG URL API:
+To achieve the same result using the WHATWG URL API:
```js
function resolve(from, to) {