1.3.0 • Published 5 years ago

sd-browser-cookie v1.3.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

cookie

Cookie存储工具

Usage

const cookie = require('sd-browser-cookie');

// 保存cookie
cookie.set('key', value, option)
cookie.set({
  'key1': value1,
  'key2': value2
}, option)

// option

{
  expires: 7, // 过期时间, 支持number、Date、时间字符串
  path: '',
  domain: '',
  secure: true
}

// 获取cookie
cookie.get('key')

// 获取所有cookie对象
cookie.all()

// 删除cookie
cookie.remove('key')

// 清除所有cookie
cookie.clear()
1.3.0

5 years ago

1.2.0

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago