Utility functions for reading and setting cookies in the browser and from server-side CouchDB functions (lists, shows, updates etc).
Read cookies currently stored in the browser, returning an object keyed by cookie name.
Reads browser cookies and returned the value of the named cookie.
Parameters
- name String - the name of the cookie to read
Creates a string for storing a cookie on the browser.
Parameters
- req Object - the CouchDB request object
- opt Object - properties for the cookie (name, value, path, days)
Sets a cookie on the browser, for use client-side only.
Parameters
- req Object - the CouchDB request object
- opt Object - properties for the cookie (name, value, path, days)
Creates a Set-Cookie header on a CouchDB response object. Returning the response object with the updated Set-Cookie headers.
Parameters
- req Object - the CouchDB request object
- res Object - the CouchDB response object
- opt Object - properties for the cookie (name, value, path, days)