Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
提取cookie
// 提取cookie
((cookies) => {
window.COOKIES = cookies.reduce((cur, next) => {
const [k, v] = next.split('=')
cur[k] = v
return cur
}, {})
})(document.cookie.split('; '))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment