From 7868b6a00308ab1789f069c030f1645fec62fdc8 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Wed, 5 Dec 2018 10:44:37 +0100 Subject: doc: list all versions WHATWG URL api was added PR-URL: https://github.com/nodejs/node/pull/24847 Reviewed-By: Luigi Pinca Reviewed-By: Sam Roberts Reviewed-By: Vse Mozhet Byt --- doc/api/url.md | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) (limited to 'doc/api/url.md') diff --git a/doc/api/url.md b/doc/api/url.md index 04abdf69b0..ae53c98778 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -73,7 +73,9 @@ const myURL = ### Class: URL * `obj` {Object} An object representing a collection of key-value pairs @@ -627,7 +633,9 @@ console.log(params.toString()); #### Constructor: new URLSearchParams(iterable) * `iterable` {Iterable} An iterable object whose elements are key-value pairs @@ -785,7 +793,9 @@ console.log(params.toString()); #### urlSearchParams.sort() 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) * `domain` {string} @@ -859,7 +871,9 @@ console.log(url.domainToASCII('xn--iñvalid.com')); ### url.domainToUnicode(domain) * `domain` {string} @@ -881,6 +895,9 @@ console.log(url.domainToUnicode('xn--iñvalid.com')); ``` ### url.fileURLToPath(url) + * `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. @@ -942,6 +959,9 @@ console.log(url.format(myURL, { fragment: false, unicode: true, auth: false })); ``` ### url.pathToFileURL(path) + * `path` {string} The path to convert to a File URL. * Returns: {URL} The file URL object. -- cgit v1.2.3