Untitled

mail@pastecode.io avatar
unknown
plain_text
17 days ago
203 B
1
Indexable
Never
function getCookie(name: string) {
  const value = `; ${document.cookie};`
  const parts = value.split(`; ${name}=`);
  if (parts.length === 2) return parts.pop().split(';').shift();
  return undefined
}
Leave a Comment