{"_id":"@bluepostit/round-robin","name":"@bluepostit/round-robin","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@bluepostit/round-robin","version":"1.0.0","description":"Generates matches of pairs of array elements, in round-robin fashion","main":"index.js","scripts":{"format":"prettier --write index.js test","test":"jest","test:watch":"jest --watch"},"author":{"name":"bluepostit"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/bluepostit/round-robin.git"},"publishConfig":{"access":"public"},"devDependencies":{"jest":"^28.1.2","prettier":"^2.7.1"},"gitHead":"08d7ad92a52d83f3b43483f80d972acc648785ac","bugs":{"url":"https://github.com/bluepostit/round-robin/issues"},"homepage":"https://github.com/bluepostit/round-robin#readme","_id":"@bluepostit/round-robin@1.0.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-fSCDJvFU3sCC9WCmcvPTUzojZdolX1C0kzeh+rkQ3+j8L1AOKuLZoQLiEcianw204ju2eINJBwhAmtaGmdsdKQ==","shasum":"25059e8756ac11944e8b970db4d6b672134afc47","tarball":"https://registry.npmjs.org/@bluepostit/round-robin/-/round-robin-1.0.0.tgz","fileCount":6,"unpackedSize":4733,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDZujiNt7LnjqwOYLcIDouahocHVgisCTvmb4ls1D63jAiEA5bWd53GkHxLc38GOZICkIFGZV6aCY4YprylFgwYLQPQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiyxNfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoQlBAAgKHy20/CCK/urDgzylK0CVOeH1Z6s4fI6Sr8K6xYvC8KAbq9\r\nM7KfIUXYEsdQJN7qg2HR5ePnjODwp+BS4KHb+4kY1SFec1SJlGLKPgOWFG92\r\nvDMbv1KldIDfizo+HqL48fMLmFhs8xIQwmoiWNJ0Zz/SC/K+F3b7Y+CBTXru\r\no9qlyhJlpS6yTFvlbh9PDh8fk2RcVT5Q3HOHiOqp/zNznYjaLpilBzdo5RSQ\r\nNxcj9QFn7ZxgK/j5IA6Ci+k48XNLXdrRE813JlVMq3mTvoMO2ihwkzvipP2X\r\nxSASzIiImUJ38jF4KUUF4J/qLl3jMsyZfJi0sAiya3uAP19vFNQvxPTZiyWT\r\nqgzBnYjWXqWkupEO4swS0i+AY4tnSdgvLdSdaRpzTo6kZ6GXwC5clw+5DVno\r\nOqcgJiAZaN7X1c0KxyQIdoAq5oK1liKCoGMe5/RnU6yXpTRJsOUC6acgfrSu\r\nTLIJm2FQPSyoQ9UfqnC5AFzlC/oGpDTCceZBqTMl4YwGnlEdjj3PCBMQe5Hd\r\nYr/TCpWOzhOsIJ0lXfQHmDCJ0Z1BNtciriTN/XmGZLKpm9g8qNXNwhV5tWeX\r\nHs9AdDCgOZmDaQlwB8s01jLFEbOmwTmENLbMITSAOmWsWltNW7TNuNUWn3xb\r\nkoUDGi6MqJqwOM4zN/VeZre4trc5FqDdYrg=\r\n=pX2P\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bluepostit","email":"bluepostit101@gmail.com"},"directories":{},"maintainers":[{"name":"bluepostit","email":"bluepostit101@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/round-robin_1.0.0_1657475935015_0.7900728599373434"},"_hasShrinkwrap":false}},"time":{"created":"2022-07-10T17:58:54.962Z","1.0.0":"2022-07-10T17:58:55.212Z","modified":"2022-07-10T17:58:55.343Z"},"maintainers":[{"name":"bluepostit","email":"bluepostit101@gmail.com"}],"description":"Generates matches of pairs of array elements, in round-robin fashion","homepage":"https://github.com/bluepostit/round-robin#readme","repository":{"type":"git","url":"git+https://github.com/bluepostit/round-robin.git"},"author":{"name":"bluepostit"},"bugs":{"url":"https://github.com/bluepostit/round-robin/issues"},"license":"ISC","readme":"# Round Robin Scheduler\n\nGiven an array of players, the `schedule` function returns an array of pairings, such that each player is paired with every other player.\n\nThis is a translation from Ruby into JavaScript of @ssaunier's [Round Robin Tournament](https://github.com/ssaunier/round_robin_tournament).\n\n## Usage\n\n```js\nconst schedule = require('@bluepostit/round-robin')\n\nconst colors = ['red', 'orange', 'yellow', 'green']\nconst colorPairings = schedule(colors)\nconsole.log(colorPairings)\n\n// Output should be:\n[\n  [ [ 'red', 'orange' ], [ 'yellow', 'green' ] ],\n  [ [ 'yellow', 'orange' ], [ 'green', 'red' ] ],\n  [ [ 'green', 'orange' ], [ 'red', 'yellow' ] ]\n]\n\n\nconst teams = ['first', 'second', 'third']\nconst teamPairings = schedule(teams)\nconsole.log(teamPairings)\n\n// Output should be\n[\n  [ [ 'first', 'second' ], [ 'third', null ] ],\n  [ [ 'third', 'second' ], [ null, 'first' ] ],\n  [ [ null, 'second' ], [ 'first', 'third' ] ]\n]\n```\n","readmeFilename":"README.md"}