-
-
Save Zatte/f33242aa2ab7dbc5f57ed0a5a7145604 to your computer and use it in GitHub Desktop.
[Read cookies] Read cookies
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