MCPcopy Create free account
hub / github.com/jshttp/cookie / StringifyOptions

Interface StringifyOptions

src/index.ts:146–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146export interface StringifyOptions {
147 /**
148 * Specifies a function that will be used to encode a [cookie-value](https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1).
149 * Since value of a cookie has a limited character set (and must be a simple string), this function can be used to encode
150 * a value into a string suited for a cookie's value, and should mirror `decode` when parsing.
151 * The default function preserves roundtrip-safe cookie-octet values and uses `encodeURIComponent` otherwise.
152 */
153 encode?: (str: string) => string;
154}
155
156/**
157 * Stringifies an object into an HTTP `Cookie` header.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…