doc: list all versions WHATWG URL api was added

PR-URL: https://github.com/nodejs/node/pull/24847
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
This commit is contained in:
Thomas Watson 2018-12-05 10:44:37 +01:00 committed by Rich Trott
parent adbdaf94be
commit 7868b6a003

View File

@ -73,7 +73,9 @@ const myURL =
### Class: URL ### Class: URL
<!-- YAML <!-- YAML
added: v7.0.0 added:
- v7.0.0
- v6.13.0
changes: changes:
- version: v10.0.0 - version: v10.0.0
pr-url: https://github.com/nodejs/node/pull/18281 pr-url: https://github.com/nodejs/node/pull/18281
@ -525,7 +527,9 @@ console.log(JSON.stringify(myURLs));
### Class: URLSearchParams ### Class: URLSearchParams
<!-- YAML <!-- YAML
added: v7.5.0 added:
- v7.5.0
- v6.13.0
changes: changes:
- version: v10.0.0 - version: v10.0.0
pr-url: https://github.com/nodejs/node/pull/18281 pr-url: https://github.com/nodejs/node/pull/18281
@ -602,7 +606,9 @@ console.log(params.toString());
#### Constructor: new URLSearchParams(obj) #### Constructor: new URLSearchParams(obj)
<!-- YAML <!-- YAML
added: v7.10.0 added:
- v7.10.0
- v6.13.0
--> -->
* `obj` {Object} An object representing a collection of key-value pairs * `obj` {Object} An object representing a collection of key-value pairs
@ -627,7 +633,9 @@ console.log(params.toString());
#### Constructor: new URLSearchParams(iterable) #### Constructor: new URLSearchParams(iterable)
<!-- YAML <!-- YAML
added: v7.10.0 added:
- v7.10.0
- v6.13.0
--> -->
* `iterable` {Iterable} An iterable object whose elements are key-value pairs * `iterable` {Iterable} An iterable object whose elements are key-value pairs
@ -785,7 +793,9 @@ console.log(params.toString());
#### urlSearchParams.sort() #### urlSearchParams.sort()
<!-- YAML <!-- 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 Sort all existing name-value pairs in-place by their names. Sorting is done
@ -836,7 +846,9 @@ for (const [name, value] of params) {
### url.domainToASCII(domain) ### url.domainToASCII(domain)
<!-- YAML <!-- YAML
added: v7.4.0 added:
- v7.4.0
- v6.13.0
--> -->
* `domain` {string} * `domain` {string}
@ -859,7 +871,9 @@ console.log(url.domainToASCII('xn--iñvalid.com'));
### url.domainToUnicode(domain) ### url.domainToUnicode(domain)
<!-- YAML <!-- YAML
added: v7.4.0 added:
- v7.4.0
- v6.13.0
--> -->
* `domain` {string} * `domain` {string}
@ -881,6 +895,9 @@ console.log(url.domainToUnicode('xn--iñvalid.com'));
``` ```
### url.fileURLToPath(url) ### url.fileURLToPath(url)
<!-- YAML
added: v10.12.0
-->
* `url` {URL | string} The file URL string or URL object to convert to a path. * `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. * Returns: {string} The fully-resolved platform-specific Node.js file path.
@ -942,6 +959,9 @@ console.log(url.format(myURL, { fragment: false, unicode: true, auth: false }));
``` ```
### url.pathToFileURL(path) ### url.pathToFileURL(path)
<!-- YAML
added: v10.12.0
-->
* `path` {string} The path to convert to a File URL. * `path` {string} The path to convert to a File URL.
* Returns: {URL} The file URL object. * Returns: {URL} The file URL object.