Function: getFirefoxCookie() โ
getFirefoxCookie(
cookieSpec
):Promise
<ExportedCookie
[]>
Defined in: src/core/cookies/getFirefoxCookie.ts:27
Retrieves cookies from Firefox browser storage that match the specified criteria.
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
Returns โ
Promise
<ExportedCookie
[]>
An array of ExportedCookie objects that match the specification
Throws โ
Will catch and handle any errors during cookie querying, logging a warning to the console without throwing to the caller
Example โ
typescript
import { getFirefoxCookie } from "@mherod/get-cookie";
// Get all cookies named "sessionId" from Firefox
const cookies = await getFirefoxCookie({ name: "sessionId" });
// Get cookies named "userPref" from specific domain in Firefox
const domainCookies = await getFirefoxCookie({
name: "userPref",
domain: "example.com"
});