Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Cookie component
JavaScript
branch: master

This branch is 28 commits behind component:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
Makefile
Readme.md
component.json
index.js

Readme.md

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

Something went wrong with that request. Please try again.