// Loaded from https://deno.land/x/tinyhttp@0.1.18/extensions/res/cookie.ts import { Req, Res } from '../../deps.ts' import * as cookie from 'https://deno.land/std@0.101.0/http/cookie.ts' export const setCookie = (req: Request, res: Response) => ( name: string, value: string, options?: Omit ): Response => { cookie.setCookie(req, { value, name, ...options }) return res } export const clearCookie = (res: Response) => (name: string): Response => { cookie.deleteCookie(res, name) return res }