Update formatting

This commit is contained in:
Isabelle Viktoria Maciohsek
2022-01-30 18:28:03 +02:00
parent 9cb319d726
commit 843c4c4894
7 changed files with 8 additions and 8 deletions

View File

@ -7,7 +7,7 @@ lastUpdated: 2020-10-22T20:24:04+03:00
Generates a query string from the key-value pairs of the given object.
- Use `Array.prototype.reduce()` on `Object.entries(queryParameters)` to create the query string.
- Use `Array.prototype.reduce()` on `Object.entries()` to create the query string from `queryParameters`.
- Determine the `symbol` to be either `?` or `&` based on the length of `queryString`.
- Concatenate `val` to `queryString` only if it's a string.
- Return the `queryString` or an empty string when the `queryParameters` are falsy.