1.6.0 • Published 8 months ago

cookie-cloud v1.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

cookie cloud

base project https://github.com/easychen/CookieCloud

Install

npm install cookie-cloud

Usage

// use example
import CookieManager from 'cookie-cloud';
const cookie = new CookieManager(config);
export const getLoginData = async (domain: string) => {
  const cookieObj: any = await cookie.getCookes(domain);
  const xxx_token = cookie.getCookieByName(cookieObj.cookie_data_str, 'xxx_token');
  return {
    xxx_token,
    cookie_data_str: cookieObj.cookie_data_str,
  };
};

config example

recommend use dot-config-next

// use config
const config = {
  uuid: "your_uuid_here",
  password: "your_password_here",
  endpoint: "http://your_endpoint_here",
};
// or
// use dot-config
import ConfigManager from 'dot-config-next';
const config = new ConfigManager('cookie-cloud').readConfig();
1.6.0

8 months ago

1.5.2

9 months ago

1.5.1

9 months ago

1.5.0

9 months ago

1.4.1

9 months ago

1.4.0

9 months ago

1.3.0

10 months ago

1.2.0

10 months ago

1.1.0

10 months ago

1.0.0

10 months ago