Naboo's Podracing Misadventure
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

component-cookie

1.1.3 • 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

Keywords

none

install

npm i component-cookie

Downloadsweekly downloads

9,824

version

1.1.3

license

MIT

repository

githubgithub

last publish

collaborators

  • avatar
  • avatar