Function: getGroupedRenderedCookies() โ
getGroupedRenderedCookies(
cookieSpec
,options
):Promise
<string
[]>
Defined in: src/core/cookies/getGroupedRenderedCookies.ts:39
Retrieves and renders cookies in a grouped format based on their source files.
Parameters โ
cookieSpec โ
The cookie specification containing search criteria
domain โ
string
= CookieDomainSchema
(optional) The domain to filter cookies by
name โ
string
= CookieNameSchema
The name of the cookie to search for
options โ
Omit
<{ format
: "merged"
| "grouped"
; separator
: string
; showFilePaths
: boolean
; }, "format"
> = {}
Options for rendering the cookies
Returns โ
Promise
<string
[]>
An array of strings, each representing a group of cookies from a source file
Example โ
typescript
// Basic usage - get all cookies named "sessionId" grouped by source file
const cookies = await getGroupedRenderedCookies({ name: "sessionId" });
// Get cookies with domain filter and custom rendering options
const domainCookies = await getGroupedRenderedCookies(
{
name: "userPref",
domain: "example.com"
},
{
showFilePaths: true,
separator: " | "
}
);