Travis build: 1620

This commit is contained in:
30secondsofcode
2019-12-11 18:39:58 +00:00
parent df6abd7ced
commit ad07ba1012
14 changed files with 872 additions and 872 deletions

View File

@ -13,10 +13,10 @@ Return the `queryString` or an empty string when the `queryParameters` are falsy
const objectToQueryString = queryParameters => {
return queryParameters
? Object.entries(queryParameters).reduce((queryString, [key, val], index) => {
const symbol = queryString.length === 0 ? '?' : '&';
queryString += typeof val === 'string' ? `${symbol}${key}=${val}` : '';
return queryString;
}, '')
const symbol = queryString.length === 0 ? '?' : '&';
queryString += typeof val === 'string' ? `${symbol}${key}=${val}` : '';
return queryString;
}, '')
: '';
};
```