Ein Projekt das es ermöglicht Beerpong über das Internet von zwei unabhängigen positionen aus zu spielen. Entstehung im Rahmen einer Praktikumsaufgabe im Fach Interaktion.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

package.json 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {
  2. "name": "on-finished",
  3. "description": "Execute a callback when a request closes, finishes, or errors",
  4. "version": "2.1.0",
  5. "contributors": [
  6. {
  7. "name": "Douglas Christopher Wilson",
  8. "email": "doug@somethingdoug.com"
  9. },
  10. {
  11. "name": "Jonathan Ong",
  12. "email": "me@jongleberry.com",
  13. "url": "http://jongleberry.com"
  14. }
  15. ],
  16. "license": "MIT",
  17. "repository": {
  18. "type": "git",
  19. "url": "git://github.com/jshttp/on-finished"
  20. },
  21. "dependencies": {
  22. "ee-first": "1.0.5"
  23. },
  24. "devDependencies": {
  25. "istanbul": "0.3.0",
  26. "mocha": "~1.21.4"
  27. },
  28. "engine": {
  29. "node": ">= 0.8.0"
  30. },
  31. "files": [
  32. "HISTORY.md",
  33. "LICENSE",
  34. "index.js"
  35. ],
  36. "scripts": {
  37. "test": "mocha --reporter spec --bail --check-leaks test/",
  38. "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
  39. "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
  40. },
  41. "readme": "# on-finished\n\n[![NPM Version](http://img.shields.io/npm/v/on-finished.svg?style=flat)](https://www.npmjs.org/package/on-finished)\n[![Node.js Version](http://img.shields.io/badge/node.js->=_0.8-brightgreen.svg?style=flat)](http://nodejs.org/download/)\n[![Build Status](http://img.shields.io/travis/jshttp/on-finished.svg?style=flat)](https://travis-ci.org/jshttp/on-finished)\n[![Coverage Status](https://img.shields.io/coveralls/jshttp/on-finished.svg?style=flat)](https://coveralls.io/r/jshttp/on-finished)\n\nExecute a callback when a request closes, finishes, or errors.\n\n## Install\n\n```sh\n$ npm install on-finished\n```\n\n## API\n\n```js\nvar onFinished = require('on-finished')\n```\n\n### onFinished(res, listener)\n\nAttach a listener to listen for the response to finish. The listener will\nbe invoked only once when the response finished. If the response finished\nto to an error, the first argument will contain the error.\n\nListening to the end of a response would be used to close things associated\nwith the response, like open files.\n\n```js\nonFinished(res, function (err) {\n // clean up open fds, etc.\n})\n```\n\n### onFinished(req, listener)\n\nAttach a listener to listen for the request to finish. The listener will\nbe invoked only once when the request finished. If the request finished\nto to an error, the first argument will contain the error.\n\nListening to the end of a request would be used to know when to continue\nafter reading the data.\n\n```js\nvar data = ''\n\nreq.setEncoding('utf8')\nres.on('data', function (str) {\n data += str\n})\n\nonFinished(req, function (err) {\n // data is read unless there is err\n})\n```\n\n### onFinished.isFinished(res)\n\nDetermine if `res` is already finished. This would be useful to check and\nnot even start certain operations if the response has already finished.\n\n### onFinished.isFinished(req)\n\nDetermine if `req` is already finished. This would be useful to check and\nnot even start certain operations if the request has already finished.\n\n### Example\n\nThe following code ensures that file descriptors are always closed\nonce the response finishes.\n\n```js\nvar destroy = require('destroy')\nvar http = require('http')\nvar onFinished = require('finished')\n\nhttp.createServer(function onRequest(req, res) {\n var stream = fs.createReadStream('package.json')\n stream.pipe(res)\n onFinished(res, function (err) {\n destroy(stream)\n })\n})\n```\n\n## License\n\n[MIT](LICENSE)\n",
  42. "readmeFilename": "README.md",
  43. "bugs": {
  44. "url": "https://github.com/jshttp/on-finished/issues"
  45. },
  46. "_id": "on-finished@2.1.0",
  47. "_from": "on-finished@2.1.0"
  48. }