Last active
August 29, 2015 14:06
-
-
Save ovcharik/c0eef241b0f40072cda5 to your computer and use it in GitHub Desktop.
Parse cookies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.cookie.split(";").map(function(s){return s.trim().split("=")}).reduce(function(p,c){c[0]&&(p[c[0]]=c[1]);return p;},{}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment