{"name":"cookie-cutter","description":"Browserify-compatible module to get and set cookies in the browser","version":"0.1.1","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"},"bugs":{"url":"https://github.com/substack/cookie-cutter/issues"},"homepage":"https://github.com/substack/cookie-cutter","_id":"cookie-cutter@0.1.1","dist":{"shasum":"4503fd9dd35ec7000ce945ef9cca31d75fe9ccea","tarball":"http://registry-npm.ywwl.com/cookie-cutter/download/cookie-cutter-0.1.1.tgz","integrity":"sha512-ZYfibNuFIgGNUy8durb76zj0zLGv1JHtAM43JvuS/ezRO8Hx3yW5hec6PVuqYH8AYB6FlT0W230LlTrWEJocZg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCU8fc3MJXl7DcDs9/XzjRvIPAfQJ4RF5z5nsiCccDINQIgNP3ibk72L/AkB5MHVbQy9zSA9neSc3Rkqs7VVInDDhk="}],"size":1707,"noattachment":false,"key":"/cookie-cutter/-/cookie-cutter-0.1.1.tgz"},"_from":".","_npmVersion":"1.3.21","_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":1388916075609,"_cnpm_publish_time":1388916075609,"dist-tags":{"latest":"0.2.0"}}