Get a cookie by name.
Returns a URI decoded value, or an empty string if the cookie does not exist.
the cookie name
the cookie value or an empty string if not found
Error if called during SSR
import { getCookie } from "@trashpanda001/helpers/cookie"getCookie("foo") // "bar"getCookie("unknown") // "" Copy
import { getCookie } from "@trashpanda001/helpers/cookie"getCookie("foo") // "bar"getCookie("unknown") // ""
Get a cookie by name.
Returns a URI decoded value, or an empty string if the cookie does not exist.