Persists a CookieJar on disk and reloads it on startup.
const store = new CookieStore('/absolute/path/bbCookies.json');const jar = store.cookieJar;// … use jar with fetch-cookie …store.save(); // whenever you want to flush to disk Copy
const store = new CookieStore('/absolute/path/bbCookies.json');const jar = store.cookieJar;// … use jar with fetch-cookie …store.save(); // whenever you want to flush to disk
Absolute path for the JSON file used to persist cookies.
The underlying CookieJar.
Clears all cookies from the jar and persists the empty state to disk.
Serialises the current CookieJar and writes it to disk. Creates parent directories if they do not exist.
Persists a CookieJar on disk and reloads it on startup.
Example