1.0.0 • Published 7 months ago
@nodecfdi/tough-cookie-file-store v1.0.0
@nodecfdi/tough-cookie-file-store
A JSON file store implementation for tough-cookie module.
!WARNING This package is native ESM and no longer provides a CommonJS export. If your project uses CommonJS, you will have to convert to ESM. Please don't open issues for questions regarding CommonJS / ESM.
About of @nodecfdi/tough-cookie-file-store
A JSON file store implementation for tough-cookie module
Installation
NPM
npm install @nodecfdi/tough-cookie-file-storeYARN
yarn add @nodecfdi/tough-cookie-file-storePNPM
pnpm add @nodecfdi/tough-cookie-file-storeUsage
import { FileCookieStore } from '@nodecfdi/tough-cookie-file-store';
import { CookieJar, Cookie } from 'tough-cookie';
const cookieJar = new CookieJar(new FileCookieStore('cookies.json'));
const cookie = Cookie.parse('foo=bar; Domain=example.com; Path=/');
await cookieJar.setCookie(cookie, 'https://example.com');Contributing
Contributions are welcome. Please read CONTRIBUTING for more details and remember to review the CHANGELOG.
Copyright and License
The @nodecfdi/tough-cookie-file-store library is copyright © NodeCfdi and licensed for use under the MIT License (MIT). Please see LICENSE for more information.
1.0.0
7 months ago