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

Readme

Keywords

none

Package Sidebar

Install

npm i component-cookie

Weekly Downloads

68,980

Version

1.1.5

License

MIT

Unpacked Size

3.62 kB

Total Files

4

Last publish

Collaborators

  • dominicbarnes
  • stephenmathieson
  • jongleberry
  • segment-ulysse