cookie-cloud
TypeScript icon, indicating that this package has built-in type declarations

1.6.0 • Public • Published

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();

Readme

Keywords

none

Package Sidebar

Install

npm i cookie-cloud

Weekly Downloads

3

Version

1.6.0

License

MIT

Unpacked Size

15.8 kB

Total Files

8

Last publish

Collaborators

  • chenpx976