Clarify documentation

master
Sven Slootweg 5 years ago
parent f416d22b34
commit e80f024efe

@ -60,6 +60,8 @@ console.log(modified4); // http://example.com:8080/path
Generates a modified URL. Returns the modified URL as a string. Keep in mind that the `query` object is *not* merged by default; see the `mergeQuery` option below to change that.
This function does __not__ change the `baseUrl` string or the `newProperties` object you pass in; it creates and returns a new URL string entirely.
- __baseUrl:__ The URL that you want to modify, as a string.
- __newProperties:__ The properties of the URL that you want to change, following the naming conventions of the [legacy URL object](https://nodejs.org/api/url.html#url_legacy_url_api). Like in that API, `query` takes precedence over `search`, and `hostname`/`port` take precedence over `host`. All keys are optional.
- __options:__ *(Optional.)* An object of extra options.

Loading…
Cancel
Save