{"name":"cookie-cutter","description":"Browserify-compatible module to get and set cookies in the browser","version":"0.1.0","repository":{"type":"git","url":"git://github.com/substack/cookie-cutter.git"},"main":"index.js","keywords":["cookie","browser","browserify"],"license":"MIT","author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"_id":"cookie-cutter@0.1.0","dist":{"shasum":"46b492fd748f88928c1102a85c204eddad5d3355","tarball":"http://registry-npm.ywwl.com/cookie-cutter/download/cookie-cutter-0.1.0.tgz","integrity":"sha512-DpbedUMYmoXxoA0OT/ZH+e673bSpZtROmn2imQsjCCiCptnGe7MSs2qom3PnFfviznEheAChpK5AZX4ux6NnHw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEuIQoEgeNiIQG2A+hwAFGq9bMTm33yn8l0fZW9pRD2SAiEAggc3THPUl9Mq0LDoU/4H4ZnNhIgkvkvzM9VDdJcYBrE="}],"size":1668,"noattachment":false,"key":"/cookie-cutter/-/cookie-cutter-0.1.0.tgz"},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"substack","email":"mail@substack.net"},"maintainers":[{"name":"substack","email":"mail@substack.net"}],"directories":{},"readme":"cookie-cutter\n=============\n\nSet and get cookies in the browser or in node with `document`.\n\nIn your browser code with [browserify](http://github.com/substack/node-browserify):\n\n````javascript\nvar cookie = require('cookie-cutter');\nvar times = parseInt(cookie.get('times'), 10) || 0;\ncookie.set('times', times + 1);\n````\n\nand `times` will increment every time the page is reloaded.\n\nmethods\n=======\n\n````javascript\nvar cookie = require('cookie-cutter');\n````\n\ncookie(document)\n----------------\n\nReturn a new cookie object with `.get()` and `.set()` operating on `document`.\n\n`document.cookie` should be a non-referentially transparent setter/getter combo\nlike the DOM's variant where assignment with optional path and expiry creates a\nnew cookie in the getter as a key=value pair.\n\ncookie.get(key)\n---------------\n\nReturn the cookie value for `key`.\n\ncookie.set(key, value, opts={})\n-------------------------------\n\nSet the cookie at `key` to `value` with optional parameters `expires` and `path`.\n\nTo unset a cookie, use a date in the past, ex: ```{ expires: new Date(0) }```\n\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n    npm install cookie-cutter\n\nlicense\n=======\n\nMIT/X11\n","publish_time":1369726914114,"_cnpm_publish_time":1369726914114,"dist-tags":{"latest":"0.2.0"}}