component-cookie

1.1.5 • Public • Published

cookie

Cookie component.

Installation

$ component install component/cookie

Example

// set
cookie('name', 'tobi')
cookie('name', 'tobi', { path: '/' })
cookie('name', 'tobi', { maxage: 60000 }) // in milliseconds
cookie('species', 'ferret')

// get
var name = cookie('name')
// => "tobi"

var cookies = cookie()
// => { name: "tobi", species: "ferret" }

// clear
cookie('name', null)

License

MIT

Dependencies (1)

Dev Dependencies (1)

Package Sidebar

Install

npm i component-cookie

Weekly Downloads

66,143

Version

1.1.5

License

MIT

Unpacked Size

3.62 kB

Total Files

4

Last publish

Collaborators

  • dominicbarnes
  • stephenmathieson
  • jongleberry
  • segment-ulysse