Use single quotes :P

This commit is contained in:
Michael Jackson
2018-12-17 09:38:05 -08:00
parent ada37035cd
commit 19b2e5574b
93 changed files with 792 additions and 791 deletions

View File

@ -3,14 +3,14 @@ function createSearch(query) {
const params = keys.reduce(
(memo, key) =>
memo.concat(
query[key] === ""
query[key] === ''
? key // Omit the trailing "=" from key=
: `${key}=${encodeURIComponent(query[key])}`
),
[]
);
return params.length ? `?${params.join("&")}` : "";
return params.length ? `?${params.join('&')}` : '';
}
module.exports = createSearch;