Skip to content

Commit 1bd286e

Browse files
Trottdanielleadams
authored andcommitted
doc: revise url.resolve() text
PR-URL: #41661 Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Mestery <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 59f95fe commit 1bd286e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/url.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,11 +1568,11 @@ changes:
15681568

15691569
> Stability: 3 - Legacy: Use the WHATWG URL API instead.
15701570

1571-
* `from` {string} The Base URL being resolved against.
1572-
* `to` {string} The HREF URL being resolved.
1571+
* `from` {string} The base URL to use if `to` is a relative URL.
1572+
* `to` {string} The target URL to resolve.
15731573

15741574
The `url.resolve()` method resolves a target URL relative to a base URL in a
1575-
manner similar to that of a Web browser resolving an anchor tag HREF.
1575+
manner similar to that of a web browser resolving an anchor tag.
15761576

15771577
```js
15781578
const url = require('url');
@@ -1581,7 +1581,7 @@ url.resolve('http://example.com/', '/one'); // 'http://example.com/one'
15811581
url.resolve('http://example.com/one', '/two'); // 'http://example.com/two'
15821582
```
15831583

1584-
You can achieve the same result using the WHATWG URL API:
1584+
To achieve the same result using the WHATWG URL API:
15851585

15861586
```js
15871587
function resolve(from, to) {

0 commit comments

Comments
 (0)