-
-
Save samelm/2fd4ecf76b973c9b2a0c595e12d6f664 to your computer and use it in GitHub Desktop.
This file contains hidden or 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