Miss any of our Open RFC calls?Watch the recordings here! »

tough-cookie-file-store

2.0.2 • Public • Published

tough-cookie-file-store

NPM

A JSON file store implementation for tough-cookie module

Version npm npm Downloads Build Status Coverage Status dependencies Status JavaScript Style Guide Donate

Installation

$ npm install tough-cookie-file-store

Usage

const { CookieJar, Cookie } = require('tough-cookie')
const CookieFileStore = require('tough-cookie-file-store').FileCookieStore
const cookieJar = new CookieJar(new CookieFileStore('./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

Install

npm i tough-cookie-file-store

DownloadsWeekly Downloads

3,059

Version

2.0.2

License

MIT

Unpacked Size

31.5 kB

Total Files

13

Last publish

Collaborators

  • avatar