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.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # EE First
  2. [![NPM version][npm-image]][npm-url]
  3. [![Build status][travis-image]][travis-url]
  4. [![Test coverage][coveralls-image]][coveralls-url]
  5. [![License][license-image]][license-url]
  6. [![Downloads][downloads-image]][downloads-url]
  7. [![Gittip][gittip-image]][gittip-url]
  8. Get the first event in a set of event emitters and event pairs,
  9. then clean up after itself.
  10. ## Install
  11. ```sh
  12. $ npm install ee-first
  13. ```
  14. ## API
  15. ```js
  16. var first = require('ee-first')
  17. ```
  18. ### first(arr, listener)
  19. Invoke `listener` on the first event from the list specified in `arr`. `arr` is
  20. an array of arrays, with each array in the format `[ee, ...event]`. `listener`
  21. will be called only once, the first time any of the given events are emitted. If
  22. `error` is one of the listened events, then if that fires first, the `listener`
  23. will be given the `err` argument.
  24. The `listener` is invoked as `listener(err, ee, event, args)`, where `err` is the
  25. first argument emitted from an `error` event, if applicable; `ee` is the event
  26. emitter that fired; `event` is the string event name that fired; and `args` is an
  27. array of the arguments that were emitted on the event.
  28. ```js
  29. var ee1 = new EventEmitter()
  30. var ee2 = new EventEmitter()
  31. first([
  32. [ee1, 'close', 'end', 'error'],
  33. [ee2, 'error']
  34. ], function (err, ee, event, args) {
  35. // listener invoked
  36. })
  37. ```
  38. [npm-image]: https://img.shields.io/npm/v/ee-first.svg?style=flat-square
  39. [npm-url]: https://npmjs.org/package/ee-first
  40. [github-tag]: http://img.shields.io/github/tag/jonathanong/ee-first.svg?style=flat-square
  41. [github-url]: https://github.com/jonathanong/ee-first/tags
  42. [travis-image]: https://img.shields.io/travis/jonathanong/ee-first.svg?style=flat-square
  43. [travis-url]: https://travis-ci.org/jonathanong/ee-first
  44. [coveralls-image]: https://img.shields.io/coveralls/jonathanong/ee-first.svg?style=flat-square
  45. [coveralls-url]: https://coveralls.io/r/jonathanong/ee-first?branch=master
  46. [license-image]: http://img.shields.io/npm/l/ee-first.svg?style=flat-square
  47. [license-url]: LICENSE.md
  48. [downloads-image]: http://img.shields.io/npm/dm/ee-first.svg?style=flat-square
  49. [downloads-url]: https://npmjs.org/package/ee-first
  50. [gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
  51. [gittip-url]: https://www.gittip.com/jonathanong/