Skip to content

Instantly share code, notes, and snippets.

@codebubb
Last active December 18, 2022 13:41
Show Gist options
  • Select an option

  • Save codebubb/ab5cfaf8b70d198e55a5642e9a63ab37 to your computer and use it in GitHub Desktop.

Select an option

Save codebubb/ab5cfaf8b70d198e55a5642e9a63ab37 to your computer and use it in GitHub Desktop.
Decode Cookie string to a single object
document.cookie
.split(';')
.map(cookie => cookie.split('='))
.reduce((accumulator, [key, value]) => ({ ...accumulator, [key.trim()]: decodeURIComponent(value) }), {});
@123luki

123luki commented May 17, 2022

Copy link
Copy Markdown

image
Hallo Kannst du mir vielleicht sagen was da gemacht wurde?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment