GeezerVison is showing github.com — doc: revise url.resolve() text · nodejs/node@1bd286e
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: doc/api/url.md +4-4Lines changed: 4 additions & 4 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1568,11 +1568,11 @@ changes: |
1568 | 1568 |
|
1569 | 1569 | > Stability: 3 - Legacy: Use the WHATWG URL API instead. |
1570 | 1570 |
|
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. |
1573 | 1573 |
|
1574 | 1574 | 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. |
1576 | 1576 |
|
1577 | 1577 | ```js |
1578 | 1578 | const url = require('url'); |
@@ -1581,7 +1581,7 @@ url.resolve('http://example.com/', '/one'); // 'http://example.com/one' |
1581 | 1581 | url.resolve('http://example.com/one', '/two'); // 'http://example.com/two' |
1582 | 1582 | ``` |
1583 | 1583 |
|
1584 | | -You can achieve the same result using the WHATWG URL API: |
| 1584 | +To achieve the same result using the WHATWG URL API: |
1585 | 1585 |
|
1586 | 1586 | ```js |
1587 | 1587 | function resolve(from, to) { |
|