Created
September 15, 2020 10:12
-
-
Save sergeysova/a25a6f1ea6ad358d9d3dd7176e68b6ac to your computer and use it in GitHub Desktop.
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
function readCookies(cookie) { | |
const cookies = cookie.replaceAll("; ", "&"); | |
const params = new URLSearchParams(cookies); | |
return Object.fromEntries(params.entries()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oneliner: