Travis build: 1226

This commit is contained in:
30secondsofcode
2018-01-13 22:59:27 +00:00
parent 0848d7a69b
commit 9f5127819a
3 changed files with 74 additions and 2 deletions

View File

@ -8,7 +8,13 @@ Use `Array.reduce()` and `decodeURIComponent()` to create an object with all key
```js
const parseCookie = str =>
str.split(';').map(v => v.split('=')).reduce((acc,v) => {acc[decodeURIComponent(v[0].trim())] = decodeURIComponent(v[1].trim()); return acc},{});
str
.split(';')
.map(v => v.split('='))
.reduce((acc, v) => {
acc[decodeURIComponent(v[0].trim())] = decodeURIComponent(v[1].trim());
return acc;
}, {});
```
```js