# serialize

**Kind:** Function

**Source:** [`src/utils/cookie.ts`](https://github.com/honojs/hono/blob/main/src/utils/cookie.ts#L261)

**Part of:** [Utils](subsystem-src-utils)

## Signature

```ts
function serialize(name: Name, value: string, opt: CookieConstraint<Name>): string
```

## Parameters

| Name | Type |
|---|---|
| `name` | `Name` |
| `value` | `string` |
| `opt` | `CookieConstraint<Name>` |

**Returns:** `string`

## Used by

1 reference from 1 file. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### Imported by (1)

- `getCookie` — `src/helper/cookie/index.ts`:27
