3 [![NPM Version][npm-image]][npm-url]
\r
4 [![NPM Downloads][downloads-image]][downloads-url]
\r
5 [![Node.js Version][node-version-image]][node-version-url]
\r
6 [![Build Status][travis-image]][travis-url]
\r
7 [![Test Coverage][coveralls-image]][coveralls-url]
\r
9 cookie is a basic cookie parser and serializer. It doesn't make assumptions about how you are going to deal with your cookies. It basically just provides a way to read and write the HTTP cookie headers.
\r
11 See [RFC6265](http://tools.ietf.org/html/rfc6265) for details about the http header for cookies.
\r
20 var cookie = require('cookie');
\r
22 var hdr = cookie.serialize('foo', 'bar');
\r
25 var cookies = cookie.parse('foo=bar; cat=meow; dog=ruff');
\r
26 // cookies = { foo: 'bar', cat: 'meow', dog: 'ruff' };
\r
31 The serialize function takes a third parameter, an object, to set cookie options. See the RFC for valid values.
\r
37 > absolute expiration date for the cookie (Date object)
\r
40 > relative max age of the cookie from when the client receives it (seconds)
\r
43 > domain for the cookie
\r
55 [npm-image]: https://img.shields.io/npm/v/cookie.svg
\r
56 [npm-url]: https://npmjs.org/package/cookie
\r
57 [node-version-image]: https://img.shields.io/node/v/cookie.svg
\r
58 [node-version-url]: http://nodejs.org/download/
\r
59 [travis-image]: https://img.shields.io/travis/jshttp/cookie/master.svg
\r
60 [travis-url]: https://travis-ci.org/jshttp/cookie
\r
61 [coveralls-image]: https://img.shields.io/coveralls/jshttp/cookie/master.svg
\r
62 [coveralls-url]: https://coveralls.io/r/jshttp/cookie?branch=master
\r
63 [downloads-image]: https://img.shields.io/npm/dm/cookie.svg
\r
64 [downloads-url]: https://npmjs.org/package/cookie
\r