@@ -198,47 +198,6 @@ The formatting process operates as follows:
198
198
string, an [ ` Error ` ] [ ] is thrown.
199
199
* ` result ` is returned.
200
200
201
- ## url.format(URL[ , options] )
202
-
203
- > Stability: 1 - Experimental
204
-
205
- * ` URL ` {URL} A [ WHATWG URL] [ ] object
206
- * ` options ` {Object}
207
- * ` auth ` {boolean} ` true ` if the serialized URL string should include the
208
- username and password, ` false ` otherwise. Defaults to ` true ` .
209
- * ` fragment ` {boolean} ` true ` if the serialized URL string should include the
210
- fragment, ` false ` otherwise. Defaults to ` true ` .
211
- * ` search ` {boolean} ` true ` if the serialized URL string should include the
212
- search query, ` false ` otherwise. Defaults to ` true ` .
213
- * ` unicode ` {boolean} ` true ` if Unicode characters appearing in the host
214
- component of the URL string should be encoded directly as opposed to being
215
- Punycode encoded. Defaults to ` false ` .
216
-
217
- Returns a customizable serialization of a URL String representation of a
218
- [ WHATWG URL] [ ] object.
219
-
220
- The URL object has both a ` toString() ` method and ` href ` property that return
221
- string serializations of the URL. These are not, however, customizable in
222
- any way. The ` url.format(URL[, options]) ` method allows for basic customization
223
- of the output.
224
-
225
- For example:
226
-
227
- ``` js
228
- const myURL = new URL (' https://a:b@你好你好?abc#foo' );
229
-
230
- console .log (myURL .href );
231
- // Prints https://a:b@xn--6qqa088eba/?abc#foo
232
-
233
- console .log (myURL .toString ());
234
- // Prints https://a:b@xn--6qqa088eba/?abc#foo
235
-
236
- console .log (url .format (myURL, {fragment: false , unicode: true , auth: false }));
237
- // Prints 'https://你好你好?abc'
238
- ```
239
-
240
- * Note* : This variation of the ` url.format() ` method is currently considered to
241
- be experimental.
242
201
243
202
## url.parse(urlString[ , parseQueryString[ , slashesDenoteHost]] )
244
203
<!-- YAML
0 commit comments