@consumidor-positivo/ts-utils - v1.16.0
    Preparing search index...

    Function removeCookie

    • Removes a cookie by name. Note: To successfully remove a cookie, you must provide the same path and domain that were used when the cookie was set.

      Parameters

      • name: string

        The name of the cookie to remove

      • options: Pick<SetCookieOptions, "path" | "domain"> = {}

        Optional path and domain that match the cookie's original settings

      Returns void

      // Remove a simple cookie
      removeCookie('session');

      // Remove a cookie with specific path and domain
      removeCookie('token', { path: '/app', domain: 'example.com' });