@trashpanda001/helpers
    Preparing search index...

    Function deleteCookie

    • Delete the given cookie.

      The domain and path options should match what was used to set the cookie. See nukeCookie for a way to delete cookies with all permutations of domains, subdomains, paths, and subpaths.

      Parameters

      • name: string

        the cookie name

      • Optionaloptions: Readonly<CookieOptions>

        cookie options

      Returns void

      Error if called during SSR

      import { deleteCookie } from "@trashpanda001/helpers/cookie"

      deleteCookie("foo")
      // Set-Cookie: foo=; Path=/; Secure; Same-Site=Lax; Max-Age=0
      deleteCookie("bar", { domain: "example.com" })
      // Set-Cookie: foo=; Domain=example.com; Path=/; Secure; Same-Site=Lax; Max-Age=0