tough-cookie-file-store
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/tough-cookie-file-store package

3.0.1 • Public • Published

tough-cookie-file-store

NPM

A JSON file store implementation for tough-cookie module

Version npm npm Downloads Tests Status Coverage Status JavaScript Style Guide

Installation

$ npm install tough-cookie-file-store

Usage

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

Package Sidebar

Install

npm i tough-cookie-file-store

Weekly Downloads

8,698

Version

3.0.1

License

MIT

Unpacked Size

32.4 kB

Total Files

15

Last publish

Collaborators

  • ivanmarban