Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (21 sloc) 413 Bytes

cookie

Cookie component.

Installation

$ component install component/cookie

Example

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

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

// clear
cookie('name', null)

License

MIT