fix lint errors

This commit is contained in:
Vyrtsev Mikhail
2019-07-15 17:57:43 -05:00
committed by Umputun
parent 9e726d5769
commit 8cd5533aed
5 changed files with 33 additions and 31 deletions
+8 -10
View File
@@ -4,17 +4,15 @@ export function parseQuery(search: string): { [key: string]: string } {
return search
.substr(1)
.split('&')
.map(
(chunk): [string, string] => {
const parts = chunk.split('=');
if (parts.length < 2) {
parts[1] = '';
} else {
parts[1] = decodeURIComponent(parts[1]);
}
return parts as [string, string];
.map((chunk): [string, string] => {
const parts = chunk.split('=');
if (parts.length < 2) {
parts[1] = '';
} else {
parts[1] = decodeURIComponent(parts[1]);
}
)
return parts as [string, string];
})
.reduce<{ [key: string]: string }>((c, x) => {
c[x[0]] = x[1];
return c;