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.

README.md 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. # mime-types
  2. [![NPM Version][npm-image]][npm-url]
  3. [![NPM Downloads][downloads-image]][downloads-url]
  4. [![Node.js Version][node-version-image]][node-version-url]
  5. [![Build Status][travis-image]][travis-url]
  6. [![Test Coverage][coveralls-image]][coveralls-url]
  7. The ultimate javascript content-type utility.
  8. Similar to [node-mime](https://github.com/broofa/node-mime), except:
  9. - __No fallbacks.__ Instead of naively returning the first available type, `mime-types` simply returns `false`,
  10. so do `var type = mime.lookup('unrecognized') || 'application/octet-stream'`.
  11. - No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`.
  12. - Additional mime types are added such as jade and stylus via [mime-db](https://github.com/jshttp/mime-db)
  13. - No `.define()` functionality
  14. Otherwise, the API is compatible.
  15. ## Install
  16. ```sh
  17. $ npm install mime-types
  18. ```
  19. ## Adding Types
  20. All mime types are based on [mime-db](https://github.com/jshttp/mime-db),
  21. so open a PR there if you'd like to add mime types.
  22. ## API
  23. ```js
  24. var mime = require('mime-types')
  25. ```
  26. All functions return `false` if input is invalid or not found.
  27. ### mime.lookup(path)
  28. Lookup the content-type associated with a file.
  29. ```js
  30. mime.lookup('json') // 'application/json'
  31. mime.lookup('.md') // 'text/x-markdown'
  32. mime.lookup('file.html') // 'text/html'
  33. mime.lookup('folder/file.js') // 'application/javascript'
  34. mime.lookup('cats') // false
  35. ```
  36. ### mime.contentType(type)
  37. Create a full content-type header given a content-type or extension.
  38. ```js
  39. mime.contentType('markdown') // 'text/x-markdown; charset=utf-8'
  40. mime.contentType('file.json') // 'application/json; charset=utf-8'
  41. ```
  42. ### mime.extension(type)
  43. Get the default extension for a content-type.
  44. ```js
  45. mime.extension('application/octet-stream') // 'bin'
  46. ```
  47. ### mime.charset(type)
  48. Lookup the implied default charset of a content-type.
  49. ```js
  50. mime.charset('text/x-markdown') // 'UTF-8'
  51. ```
  52. ### var type = mime.types[extension]
  53. A map of content-types by extension.
  54. ### [extensions...] = mime.extensions[type]
  55. A map of extensions by content-type.
  56. ## License
  57. [MIT](LICENSE)
  58. [npm-image]: https://img.shields.io/npm/v/mime-types.svg?style=flat
  59. [npm-url]: https://npmjs.org/package/mime-types
  60. [node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat
  61. [node-version-url]: http://nodejs.org/download/
  62. [travis-image]: https://img.shields.io/travis/jshttp/mime-types.svg?style=flat
  63. [travis-url]: https://travis-ci.org/jshttp/mime-types
  64. [coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-types.svg?style=flat
  65. [coveralls-url]: https://coveralls.io/r/jshttp/mime-types
  66. [downloads-image]: https://img.shields.io/npm/dm/mime-types.svg?style=flat
  67. [downloads-url]: https://npmjs.org/package/mime-types