Last active
December 12, 2016 14:37
-
-
Save GianlucaGuarini/dde731e5ae34b90c1774bf0728a5384f to your computer and use it in GitHub Desktop.
Simple function to read a named cookie from the document.cookie string
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage
Test string:
django_language=de; csrftoken=SuktrIZlUwvk4E0LoKyIHVraBlG0UiLn; _ga=GA1.1.409523848.1476253469; __atuvc=32%7C46%2C0%7C47%2C0%7C48%2C33%7C49%2C143%7C50; ajs_user_id=null; ajs_group_id=null; ajs_anonymous_id=%222646bc13-49e5-43ae-a204-7641fd6027ca%22; intercom-id-pcdclcus=c489b10f-34c4-4fc2-8d9c-fa190b3ab937; __atuvs=584e8c24077fa261047; created_snowflakes="e12e3901-c966-4088-abdb-7415e232dfad\054c08669a1-e11e-4f75-8d78-a45001f6fe97"