Skip to content

fangjianwei/tough-cookie-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A framework of Cookie Store

tough-cookie-framework is a framework of tough-cookie module. See tough-cookie documentation for more info.

installation

$ npm install tough-cookie-framework

Options

options : a javascript object.<br>

{
   key:string,
   get:function(key,callback){},
   put:function(key,data){} 
}

Usage

  var CookieStoreFramework = require("tough-cookie-framework");
  var CookieJar = require("tough-cookie").CookieJar;
  var storeEngine = new StoreEngine(); //your store engine impl

  var jar = new CookieJar(new CookieStoreFramework({
      key:'abcd',
      get:function(key,callback){
          storeEngine.get(key,callback);
      },
      put:function(key,value,callback){
          storeEngine.put(key,value,callback);
      }
  });
  

License

MIT

About

private learning project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published