yunlongzha_try_nodejs
Version:
try it
1 lines • 20.5 kB
JSON
{"_id":"cookie-parser","_rev":"114-16eac8115a0a31a923f61986ebda13e5","name":"cookie-parser","description":"cookie parsing with signatures","dist-tags":{"latest":"1.4.0"},"versions":{"1.0.0":{"name":"cookie-parser","version":"1.0.0","description":"cookie parsing with signatures","keywords":["cookie","middleware"],"repository":{"type":"git","url":"git://github.com/expressjs/cookie-parser.git"},"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"dependencies":{},"devDependencies":{"mocha":">= 1.17.0","connect":"2.13.0","supertest":"0.9.0","cookie-signature":"1.0.3"},"licenses":"MIT","main":"./index.js","engines":{"node":">= 0.10.0"},"scripts":{"test":"mocha --ui bdd --reporter list -- test/*.js"},"bugs":{"url":"https://github.com/expressjs/cookie-parser/issues"},"homepage":"https://github.com/expressjs/cookie-parser","_id":"cookie-parser@1.0.0","dist":{"shasum":"a1fafa99da2a28dc3f28eefd8c61db6b98ecd2f9","tarball":"http://registry.npmjs.org/cookie-parser/-/cookie-parser-1.0.0.tgz"},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"shtylman","email":"shtylman@gmail.com"},"maintainers":[{"name":"shtylman","email":"shtylman@gmail.com"}],"directories":{}},"1.0.1":{"name":"cookie-parser","version":"1.0.1","description":"cookie parsing with signatures","keywords":["cookie","middleware"],"repository":{"type":"git","url":"git://github.com/expressjs/cookie-parser.git"},"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"dependencies":{"cookie":"0.1.0","cookie-signature":"1.0.3"},"devDependencies":{"mocha":"~1.17.0","connect":"2.13.0","supertest":"0.9.0"},"licenses":"MIT","main":"./index.js","engines":{"node":">= 0.10.0"},"scripts":{"test":"mocha --ui bdd --reporter list -- test/*.js"},"bugs":{"url":"https://github.com/expressjs/cookie-parser/issues"},"homepage":"https://github.com/expressjs/cookie-parser","_id":"cookie-parser@1.0.1","dist":{"shasum":"17bd622c9717cd0858a912a9fef4c0362360a7b0","tarball":"http://registry.npmjs.org/cookie-parser/-/cookie-parser-1.0.1.tgz"},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"shtylman","email":"shtylman@gmail.com"},"maintainers":[{"name":"shtylman","email":"shtylman@gmail.com"}],"directories":{}},"1.1.0":{"name":"cookie-parser","version":"1.1.0","description":"cookie parsing with signatures","keywords":["cookie","middleware"],"repository":{"type":"git","url":"git://github.com/expressjs/cookie-parser.git"},"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"dependencies":{"cookie":"0.1.2","cookie-signature":"1.0.3"},"devDependencies":{"mocha":"~1.18.2","supertest":"~0.12.1"},"licenses":"MIT","main":"./index.js","engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha --ui bdd --reporter list -- test/*.js"},"bugs":{"url":"https://github.com/expressjs/cookie-parser/issues"},"homepage":"https://github.com/expressjs/cookie-parser","_id":"cookie-parser@1.1.0","dist":{"shasum":"2f8265aa3b55733a85eef207f0e2530c3e8cf705","tarball":"http://registry.npmjs.org/cookie-parser/-/cookie-parser-1.1.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"}],"directories":{}},"1.2.0":{"name":"cookie-parser","description":"cookie parsing with signatures","version":"1.2.0","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"licenses":"MIT","repository":{"type":"git","url":"git://github.com/expressjs/cookie-parser"},"keywords":["cookie","middleware"],"dependencies":{"cookie":"0.1.2","cookie-signature":"1.0.3"},"devDependencies":{"istanbul":"0.2.10","mocha":"~1.20.1","supertest":"~0.13.0"},"engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha --reporter dot test/","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec test/"},"bugs":{"url":"https://github.com/expressjs/cookie-parser/issues"},"homepage":"https://github.com/expressjs/cookie-parser","_id":"cookie-parser@1.2.0","dist":{"shasum":"1d8eedf6e67e16cecd863e3fb62c9799fa20ec7f","tarball":"http://registry.npmjs.org/cookie-parser/-/cookie-parser-1.2.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"}],"directories":{}},"1.3.0":{"name":"cookie-parser","description":"cookie parsing with signatures","version":"1.3.0","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"licenses":"MIT","repository":{"type":"git","url":"git://github.com/expressjs/cookie-parser"},"keywords":["cookie","middleware"],"dependencies":{"cookie":"0.1.2","cookie-signature":"1.0.3"},"devDependencies":{"istanbul":"0.2.10","mocha":"~1.20.1","supertest":"~0.13.0"},"engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha --reporter dot test/","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec test/"},"bugs":{"url":"https://github.com/expressjs/cookie-parser/issues"},"homepage":"https://github.com/expressjs/cookie-parser","_id":"cookie-parser@1.3.0","dist":{"shasum":"57273407a1f1e958825e5c58c828f35a70ff7074","tarball":"http://registry.npmjs.org/cookie-parser/-/cookie-parser-1.3.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"}],"directories":{}},"1.3.1":{"name":"cookie-parser","description":"cookie parsing with signatures","version":"1.3.1","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"licenses":"MIT","repository":{"type":"git","url":"git://github.com/expressjs/cookie-parser"},"keywords":["cookie","middleware"],"dependencies":{"cookie":"0.1.2","cookie-signature":"1.0.3"},"devDependencies":{"istanbul":"0.2.10","mocha":"~1.20.1","supertest":"~0.13.0"},"engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha --reporter dot test/","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec test/"},"bugs":{"url":"https://github.com/expressjs/cookie-parser/issues"},"homepage":"https://github.com/expressjs/cookie-parser","_id":"cookie-parser@1.3.1","dist":{"shasum":"30bfc2906a04489d59bcb9e32f90db08e04bb51e","tarball":"http://registry.npmjs.org/cookie-parser/-/cookie-parser-1.3.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"}],"directories":{}},"1.3.2":{"name":"cookie-parser","description":"cookie parsing with signatures","version":"1.3.2","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"licenses":"MIT","repository":{"type":"git","url":"git://github.com/expressjs/cookie-parser"},"keywords":["cookie","middleware"],"dependencies":{"cookie":"0.1.2","cookie-signature":"1.0.4"},"devDependencies":{"istanbul":"0.2.12","mocha":"~1.20.1","supertest":"~0.13.0"},"engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha --reporter dot test/","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec test/"},"bugs":{"url":"https://github.com/expressjs/cookie-parser/issues"},"homepage":"https://github.com/expressjs/cookie-parser","_id":"cookie-parser@1.3.2","dist":{"shasum":"52211cc82c955d79ff0c088954407724e19cf562","tarball":"http://registry.npmjs.org/cookie-parser/-/cookie-parser-1.3.2.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"}],"directories":{}},"1.3.3":{"name":"cookie-parser","description":"cookie parsing with signatures","version":"1.3.3","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"licenses":"MIT","repository":{"type":"git","url":"https://github.com/expressjs/cookie-parser"},"keywords":["cookie","middleware"],"dependencies":{"cookie":"0.1.2","cookie-signature":"1.0.5"},"devDependencies":{"istanbul":"0.3.2","mocha":"~1.21.4","supertest":"~0.13.0"},"files":["lib/","LICENSE","HISTORY.md","index.js"],"engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha --reporter spec --bail --check-leaks test/","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"},"gitHead":"893bf91a8a4e49c63b6e32065991b13a7d27ed4c","bugs":{"url":"https://github.com/expressjs/cookie-parser/issues"},"homepage":"https://github.com/expressjs/cookie-parser","_id":"cookie-parser@1.3.3","_shasum":"7e3a2c745f4b460d5a340e578a0baa5d7725fe37","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"}],"dist":{"shasum":"7e3a2c745f4b460d5a340e578a0baa5d7725fe37","tarball":"http://registry.npmjs.org/cookie-parser/-/cookie-parser-1.3.3.tgz"},"directories":{}},"1.3.4":{"name":"cookie-parser","description":"cookie parsing with signatures","version":"1.3.4","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"licenses":"MIT","repository":{"type":"git","url":"https://github.com/expressjs/cookie-parser"},"keywords":["cookie","middleware"],"dependencies":{"cookie":"0.1.2","cookie-signature":"1.0.6"},"devDependencies":{"istanbul":"0.3.5","mocha":"~2.1.0","supertest":"0.15.0"},"files":["lib/","LICENSE","HISTORY.md","index.js"],"engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha --reporter spec --bail --check-leaks test/","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"},"gitHead":"94764a584c70f26049b14c6ad845c8b0ed0e478b","bugs":{"url":"https://github.com/expressjs/cookie-parser/issues"},"homepage":"https://github.com/expressjs/cookie-parser","_id":"cookie-parser@1.3.4","_shasum":"193035a5be97117a21709b3aa737f6132717bda6","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"}],"dist":{"shasum":"193035a5be97117a21709b3aa737f6132717bda6","tarball":"http://registry.npmjs.org/cookie-parser/-/cookie-parser-1.3.4.tgz"},"directories":{}},"1.3.5":{"name":"cookie-parser","description":"cookie parsing with signatures","version":"1.3.5","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/expressjs/cookie-parser"},"keywords":["cookie","middleware"],"dependencies":{"cookie":"0.1.3","cookie-signature":"1.0.6"},"devDependencies":{"istanbul":"0.3.9","mocha":"2.2.5","supertest":"1.0.1"},"files":["lib/","LICENSE","HISTORY.md","index.js"],"engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha --reporter spec --bail --check-leaks test/","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"},"gitHead":"8133968c429c3f48eb8e3ed54932c52743ac9034","bugs":{"url":"https://github.com/expressjs/cookie-parser/issues"},"homepage":"https://github.com/expressjs/cookie-parser","_id":"cookie-parser@1.3.5","_shasum":"9d755570fb5d17890771227a02314d9be7cf8356","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"dougwilson","email":"doug@somethingdoug.com"},{"name":"defunctzombie","email":"shtylman@gmail.com"}],"dist":{"shasum":"9d755570fb5d17890771227a02314d9be7cf8356","tarball":"http://registry.npmjs.org/cookie-parser/-/cookie-parser-1.3.5.tgz"},"directories":{}},"1.4.0":{"name":"cookie-parser","description":"cookie parsing with signatures","version":"1.4.0","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"contributors":[{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"}],"license":"MIT","repository":{"type":"git","url":"https://github.com/expressjs/cookie-parser"},"keywords":["cookie","middleware"],"dependencies":{"cookie":"0.2.2","cookie-signature":"1.0.6"},"devDependencies":{"istanbul":"0.3.20","mocha":"2.2.5","supertest":"1.1.0"},"files":["LICENSE","HISTORY.md","index.js"],"engines":{"node":">= 0.8.0"},"scripts":{"test":"mocha --reporter spec --bail --check-leaks test/","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"},"gitHead":"7defc09815f04dc7b665fd220b8705fba8d9573d","bugs":{"url":"https://github.com/expressjs/cookie-parser/issues"},"homepage":"https://github.com/expressjs/cookie-parser","_id":"cookie-parser@1.4.0","_shasum":"73323d5a7de341078c446109c622d2f7008164ee","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"dougwilson","email":"doug@somethingdoug.com"},"maintainers":[{"name":"dougwilson","email":"doug@somethingdoug.com"},{"name":"defunctzombie","email":"shtylman@gmail.com"}],"dist":{"shasum":"73323d5a7de341078c446109c622d2f7008164ee","tarball":"http://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.0.tgz"},"directories":{}}},"readme":"# cookie-parser\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Node.js Version][node-version-image]][node-version-url]\n[![Build Status][travis-image]][travis-url]\n[![Test Coverage][coveralls-image]][coveralls-url]\n\nParse `Cookie` header and populate `req.cookies` with an object keyed by the cookie\nnames. Optionally you may enable signed cookie support by passing a `secret` string,\nwhich assigns `req.secret` so it may be used by other middleware.\n\n## Installation\n\n```sh\n$ npm install cookie-parser\n```\n\n## API\n\n```js\nvar express = require('express')\nvar cookieParser = require('cookie-parser')\n\nvar app = express()\napp.use(cookieParser())\n```\n\n### cookieParser(secret, options)\n\n- `secret` a string or array used for signing cookies. This is optional and if not specified, will not parse signed cookies. If a string is provided, this is used as the secret. If an array is provided, an attempt will be made to unsign the cookie with each secret in order.\n- `options` an object that is passed to `cookie.parse` as the second option. See [cookie](https://www.npmjs.org/package/cookie) for more information.\n - `decode` a function to decode the value of the cookie\n\n### cookieParser.JSONCookie(str)\n\nParse a cookie value as a JSON cookie. This will return the parsed JSON value if it was a JSON cookie, otherwise it will return the passed value.\n\n### cookieParser.JSONCookies(cookies)\n\nGiven an object, this will iterate over the keys and call `JSONCookie` on each value. This will return the same object passed in.\n\n### cookieParser.signedCookie(str, secret)\n\nParse a cookie value as a signed cookie. This will return the parsed unsigned value if it was a signed cookie and the signature was valid, otherwise it will return the passed value.\n\nThe `secret` argument can be an array or string. If a string is provided, this is used as the secret. If an array is provided, an attempt will be made to unsign the cookie with each secret in order.\n\n### cookieParser.signedCookies(cookies, secret)\n\nGiven an object, this will iterate over the keys and check if any value is a signed cookie. If it is a signed cookie and the signature is valid, the key will be deleted from the object and added to the new object that is returned.\n\nThe `secret` argument can be an array or string. If a string is provided, this is used as the secret. If an array is provided, an attempt will be made to unsign the cookie with each secret in order.\n\n## Example\n\n```js\nvar express = require('express')\nvar cookieParser = require('cookie-parser')\n\nvar app = express()\napp.use(cookieParser())\n\napp.get('/', function(req, res) {\n console.log(\"Cookies: \", req.cookies)\n})\n\napp.listen(8080)\n\n// curl command that sends an HTTP request with two cookies\n// curl http://127.0.0.1:8080 --cookie \"Cho=Kim;Greet=Hello\"\n```\n\n### [MIT Licensed](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/cookie-parser.svg\n[npm-url]: https://npmjs.org/package/cookie-parser\n[node-version-image]: https://img.shields.io/node/v/cookie-parser.svg\n[node-version-url]: http://nodejs.org/download/\n[travis-image]: https://img.shields.io/travis/expressjs/cookie-parser/master.svg\n[travis-url]: https://travis-ci.org/expressjs/cookie-parser\n[coveralls-image]: https://img.shields.io/coveralls/expressjs/cookie-parser/master.svg\n[coveralls-url]: https://coveralls.io/r/expressjs/cookie-parser?branch=master\n[downloads-image]: https://img.shields.io/npm/dm/cookie-parser.svg\n[downloads-url]: https://npmjs.org/package/cookie-parser\n","maintainers":[{"name":"dougwilson","email":"doug@somethingdoug.com"},{"name":"defunctzombie","email":"shtylman@gmail.com"}],"time":{"modified":"2015-09-18T19:15:21.387Z","created":"2014-02-15T16:25:08.464Z","1.0.0":"2014-02-15T16:25:08.464Z","1.0.1":"2014-02-21T05:06:16.709Z","1.1.0":"2014-05-12T23:50:32.243Z","1.2.0":"2014-06-18T03:48:48.231Z","1.3.0":"2014-06-18T04:12:20.674Z","1.3.1":"2014-06-18T04:15:41.681Z","1.3.2":"2014-06-26T17:40:20.078Z","1.3.3":"2014-09-06T04:45:10.315Z","1.3.4":"2015-02-15T19:11:21.934Z","1.3.5":"2015-05-20T01:42:40.288Z","1.4.0":"2015-09-18T19:15:21.387Z"},"readmeFilename":"README.md","homepage":"https://github.com/expressjs/cookie-parser","keywords":["cookie","middleware"],"repository":{"type":"git","url":"https://github.com/expressjs/cookie-parser"},"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca","url":"http://tjholowaychuk.com"},"bugs":{"url":"https://github.com/expressjs/cookie-parser/issues"},"users":{"83057396":true,"masanorinyo":true,"runningtalus":true,"roboterhund87":true,"mswanson1524":true,"matteospampani":true,"dofy":true,"imzhi":true,"alexandermac":true,"damocles":true,"tsm91":true,"javimaravillas":true,"lucasmciruzzi":true,"clunt":true,"f124275809":true,"dlpowless":true,"andreaspag":true,"x_soth":true,"manxisuo":true,"vboctor":true,"dongxu":true,"markthethomas":true,"shaneli":true,"flyslow":true,"staraple":true,"iamwiz":true,"damianof":true,"joris-van-der-wel":true,"nikitka_m":true,"program247365":true,"luuhoangnam":true,"nex":true,"nickeljew":true,"buzzalderaan":true,"bpatel":true,"freshlogic":true,"johnny.young":true,"m412c0":true,"jack546":true,"isik":true,"dwayneford":true,"boyw165":true,"gztomas":true,"justincann":true,"stephn_r":true,"52u":true,"adamlu":true,"vbv":true,"wangnan0610":true,"xgheaven":true,"vwal":true,"decoda":true,"grantcarthew":true,"animaldna":true,"panlw":true,"kparkov":true,"kungkk":true,"ramzesucr":true,"wfcookie":true,"reecegoddard":true,"hema":true,"n1kkou":true,"crazyjingling":true,"kaperstone":true,"josejaguirre":true,"antanst":true,"christopher.urquidi":true,"volving":true,"kenkao":true,"zhiquan.yu":true,"imd92":true,"vteixeira":true,"andrew.medvedev":true,"bian17888":true,"jonyweb":true,"shadowlong":true,"novalu":true,"rbartoli":true,"wut":true,"dbck":true,"justinliao":true,"davidbraun":true,"stand__sure":true,"djamseed":true,"qbylucky":true},"license":"MIT","contributors":[{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"}],"_attachments":{},"_etag":"\"AZ6Z9Q1FQBIKOU4T7J181TX6W\""}