Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: list all versions WHATWG URL api was added #24847

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 27 additions & 7 deletions doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ const myURL =

### Class: URL
<!-- YAML
added: v7.0.0
added:
- v7.0.0
- v6.13.0
changes:
- version: v10.0.0
pr-url: https://github.com/nodejs/node/pull/18281
Expand Down Expand Up @@ -525,7 +527,9 @@ console.log(JSON.stringify(myURLs));

### Class: URLSearchParams
<!-- YAML
added: v7.5.0
added:
- v7.5.0
- v6.13.0
changes:
- version: v10.0.0
pr-url: https://github.com/nodejs/node/pull/18281
Expand Down Expand Up @@ -602,7 +606,9 @@ console.log(params.toString());

#### Constructor: new URLSearchParams(obj)
<!-- YAML
added: v7.10.0
added:
- v7.10.0
- v6.13.0
-->

* `obj` {Object} An object representing a collection of key-value pairs
Expand All @@ -627,7 +633,9 @@ console.log(params.toString());

#### Constructor: new URLSearchParams(iterable)
<!-- YAML
added: v7.10.0
added:
- v7.10.0
- v6.13.0
-->

* `iterable` {Iterable} An iterable object whose elements are key-value pairs
Expand Down Expand Up @@ -785,7 +793,9 @@ console.log(params.toString());

#### urlSearchParams.sort()
<!-- YAML
added: v7.7.0
added:
- v7.7.0
- v6.13.0
-->

Sort all existing name-value pairs in-place by their names. Sorting is done
Expand Down Expand Up @@ -836,7 +846,9 @@ for (const [name, value] of params) {

### url.domainToASCII(domain)
<!-- YAML
added: v7.4.0
added:
- v7.4.0
- v6.13.0
-->

* `domain` {string}
Expand All @@ -859,7 +871,9 @@ console.log(url.domainToASCII('xn--iñvalid.com'));

### url.domainToUnicode(domain)
<!-- YAML
added: v7.4.0
added:
- v7.4.0
- v6.13.0
-->

* `domain` {string}
Expand All @@ -881,6 +895,9 @@ console.log(url.domainToUnicode('xn--iñvalid.com'));
```

### url.fileURLToPath(url)
<!-- YAML
added: v10.12.0
-->

* `url` {URL | string} The file URL string or URL object to convert to a path.
* Returns: {string} The fully-resolved platform-specific Node.js file path.
Expand Down Expand Up @@ -942,6 +959,9 @@ console.log(url.format(myURL, { fragment: false, unicode: true, auth: false }));
```

### url.pathToFileURL(path)
<!-- YAML
added: v10.12.0
-->

* `path` {string} The path to convert to a File URL.
* Returns: {URL} The file URL object.
Expand Down