A decorator for fetch functions (both native and polyfill like node-fetch) to support automatic cookie storage and sending. v3.2.0 is stable, with frequent updates. Key differentiator: simple wrapper API, supports custom tough-cookie jar, and works with any fetch-compatible library. Ships TypeScript definitions. Heavily depends on tough-cookie for cookie management.
npm install fetch-cookieNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage: create fetch wrapper, make requests that automatically handle cookies.
Use import syntax or dynamic import. Or stick with v2 if CJS required.
Update import to default import and call makeFetchCookie(fetch) instead of fetchCookie(fetch).
Run npm install tough-cookie.
Use node-fetch@3 or native fetch.
Migrate to v3 import style.
Change to import or use dynamic import().
Use the package's main entry point via import.
Use import makeFetchCookie from 'fetch-cookie' (default import).