Guest User

Untitled

a guest
Feb 15th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. const parseCookie = str =>
  2. str
  3. .split(';')
  4. .map(v => v.split('='))
  5. .reduce((acc, v) => {
  6. acc[decodeURIComponent(v[0].trim())] = decodeURIComponent(v[1].trim());
  7. return acc;
  8. }, {});
Add Comment
Please, Sign In to add comment