# tough-cookie-file-store

> A JSON file store for tough-cookie module

Latest version **3.3.0** (published 2025-12-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install tough-cookie-file-store
pnpm add tough-cookie-file-store
yarn add tough-cookie-file-store
bun add tough-cookie-file-store
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.3.0 |
| Published | 2025-12-12 |
| First published | 2016-02-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=16 |
| Dependencies | 1 |
| Unpacked size | 92.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 23 |
| Author | Ivan Marban |
| Maintainers | ivanmarban |
| Keywords | HTTP, cookie, cookies, set-cookie, cookiejar, jar, RFC6265, RFC2965, store, file, json |

## Links

- npm: https://www.npmjs.com/package/tough-cookie-file-store
- Repository: https://github.com/ivanmarban/tough-cookie-file-store
- Issues: https://github.com/ivanmarban/tough-cookie-file-store/issues
- npm.io page: https://npm.io/package/tough-cookie-file-store

## Dependencies (1)

- [tough-cookie](https://npm.io/package/tough-cookie.md) ^6.0.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 3.3.0 (latest) — 2025-12-12
- 3.2.1 — 2025-07-03
- 3.2.0 — 2025-06-27
- 3.1.0 — 2025-06-23
- 3.0.2 — 2025-06-06
- 3.0.1 — 2025-04-26
- 3.0.0 — 2025-04-20
- 2.0.3 — 2021-09-28
- 2.0.2 — 2020-05-16
- 2.0.1 — 2020-05-05
- 2.0.0 — 2020-05-03
- 1.2.0 — 2017-10-02
- 1.1.1 — 2016-08-09
- 1.1.0 — 2016-02-10
- 1.0.0 — 2016-02-10

## README

# tough-cookie-file-store

[![NPM](https://nodei.co/npm/tough-cookie-file-store.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/tough-cookie-file-store/)

A JSON file store implementation for [tough-cookie][0] module

[![Version npm](https://img.shields.io/npm/v/tough-cookie-file-store.svg)](https://www.npmjs.com/package/tough-cookie-file-store)
[![npm Downloads](https://img.shields.io/npm/dw/tough-cookie-file-store.svg)](https://npmcharts.com/compare/tough-cookie-file-store?minimal=true)
[![Tests Status](https://github.com/ivanmarban/tough-cookie-file-store/actions/workflows/ci.yaml/badge.svg?branch=master)](https://github.com/ivanmarban/tough-cookie-file-store/actions/workflows/tests.yml)
[![Coverage Status](https://codecov.io/gh/ivanmarban/tough-cookie-file-store/graph/badge.svg?token=J7gn5JV9dd)](https://codecov.io/gh/ivanmarban/tough-cookie-file-store)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Installation
``` sh
$ npm install tough-cookie-file-store
```

## Usage
``` js
import { CookieJar, Cookie } from 'tough-cookie'
import FileCookieStore from 'tough-cookie-file-store'
const cookieJar = new CookieJar(new FileCookieStore('./cookie.json'))
const cookie = Cookie.parse('foo=bar; Domain=example.com; Path=/')
cookieJar.setCookie(cookie, 'http://example.com', function (error, cookie) {
  console.log(cookie)
})
```

## License
MIT

[0]: https://github.com/salesforce/tough-cookie

---
_Source: https://npm.io/package/tough-cookie-file-store · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
