Skip to content

Instantly share code, notes, and snippets.

@allenhwkim
Last active September 20, 2024 22:39
Show Gist options
  • Select an option

  • Save allenhwkim/19c2f36a7afa6f0c507008613e966d1b to your computer and use it in GitHub Desktop.

Select an option

Save allenhwkim/19c2f36a7afa6f0c507008613e966d1b to your computer and use it in GitHub Desktop.
Cookie Class
@allenhwkim
Copy link
Author

allenhwkim commented Sep 20, 2024

there's a bug in getAll where it fails if the cookie value contains = (which is legal in cookie values), for example it would fail on the cookie
...

Updated with

      let [k, ...v] = el.split('=');
      cookie[k.trim()] = v.join('=');

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