{"_id":"@botpoker/all-combs","_rev":"1-803eea404f8ff1bc2c7ed93a63019c38","name":"@botpoker/all-combs","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@botpoker/all-combs","version":"1.0.0","description":"Produce all the 21 possible combinations of texas hold'em cards","main":"index.js","scripts":{"lint":"eslint index.js tests/*.js","test":"npm run lint && jest"},"repository":{"type":"git","url":"git+https://github.com/brunoscopelliti/poker-combinations.git"},"keywords":["poker","hold'em","combinations"],"author":{"name":"Bruno Scopelliti"},"license":"MIT","bugs":{"url":"https://github.com/brunoscopelliti/poker-combinations/issues"},"homepage":"https://github.com/brunoscopelliti/poker-combinations","devDependencies":{"eslint":"7.25.0","eslint-config-bruno":"3.0.0","jest":"26.6.3","pre-commit":"1.2.2"},"gitHead":"6eb1e947212256dc71df323a333139ae20e315fe","_id":"@botpoker/all-combs@1.0.0","_nodeVersion":"15.9.0","_npmVersion":"7.5.3","dist":{"integrity":"sha512-aXLVi+2UYoMo8qrg/GsArc+y8f5az3v2Etepa7sAcqsD5AgPfgI/WWehfjJ8rbFO18jS8qG2Cb+RWc7/obRVbw==","shasum":"66cfcf555207a2bc184c1393283725a24eada3e7","tarball":"https://registry.npmjs.org/@botpoker/all-combs/-/all-combs-1.0.0.tgz","fileCount":10,"unpackedSize":5731,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjqNDCRA9TVsSAnZWagAAfsIP/3xlx9XsxWjk4GnlS3gb\njmFrBIi7x+K4SHUYSv5ciG/DmGePp1koOh1lNtcMDW6gS2bmd2zRaTFi7UvS\nseYcRJ5BacOU2L1t1skSaCdYrJ43p2Ekvu+eJhDVuK43lm7pWdSbIc7P4IkI\nNSZfJ2D4U8mWCd48MOYvuNO8ZA+SjykAmN7EenFMM87faaHAo7w3JoaX1IDo\ntYNIXe+e9uWWU9GmssxL7fcFf0iBb/OOE5u7URgx3jA2zLAneaRdocKA31B6\nC25turL9K1WqPT7Y6xfKuPoteDwrm/mRWVqGAK4kZ3Dy1HJTn15gZv4iOrN1\n9p4GeIjvdncXd4Box17OMhmPJTjxH/gJpI6DlPy9DTsFS5Y+aP214ExnnadH\nKdarSyd/Yt/zNh/EAviHmP+8q/gSolZrIEvU99wFL+fNrJgnfs9Y7Xaxi72E\n0JQzcnMaCo0Cl2pZqC+Q00Nboy37Joigrl+jO5N1n0rc07bgBFhPXo3BNdyx\nvgKEX6XMklW6YpQtWyjmBQhm7iR+dzkUlvTZxE1Dj3c4vfDP7PNsaMxJYvXd\nQLRFYfBsl2XFlDXiAK8O0KIwgYfoEwhMWLa3JzOwMttmwHI8oMiFMYrUemy6\nxF+ifPiPzFMvdJxSW8ocj6UqDJbdTSUNpOujr7c5k6yjxIaCB5PQ5Snp21B2\nZRKX\r\n=AFw7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAoUBtyo+mCXkBOgAf2JmqfBqMu9aUB2GNeUt/T6AVfcAiEAlnK1muuKafbdY63yh4cwiyOTWTevZzLePzMlnzmD4N0="}]},"_npmUser":{"name":"brunoscopelliti","email":"me@brunoscopelliti.com"},"directories":{},"maintainers":[{"name":"brunoscopelliti","email":"me@brunoscopelliti.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/all-combs_1.0.0_1619960643511_0.9399439392425268"},"_hasShrinkwrap":false}},"time":{"created":"2021-05-02T13:04:03.133Z","1.0.0":"2021-05-02T13:04:03.692Z","modified":"2022-04-04T20:14:27.592Z"},"maintainers":[{"name":"brunoscopelliti","email":"me@brunoscopelliti.com"}],"description":"Produce all the 21 possible combinations of texas hold'em cards","homepage":"https://github.com/brunoscopelliti/poker-combinations","keywords":["poker","hold'em","combinations"],"repository":{"type":"git","url":"git+https://github.com/brunoscopelliti/poker-combinations.git"},"author":{"name":"Bruno Scopelliti"},"bugs":{"url":"https://github.com/brunoscopelliti/poker-combinations/issues"},"license":"MIT","readme":"# @botpoker/all-combs\n\nWhen you're playing Texas Hold'em Poker, you only have two cards in your hands.\n\nIn case you've managed to stay active in the game until the showdown, you've now five more cards on the table to form your best combination. So, a total of seven cards from which extracting the strongest 5-cards combination.\n\nSupposing the order doesn't matter (and in fact it doesn't matter at all)... how many combinations of groups of five cards can you form from a bigger group of seven cards (your personal two cards, and the other five on the table)?\n\nIt turns out that there is a whole branch of math [[1]](https://en.wikipedia.org/wiki/Combination) that strives to answer this kind of questions... the answer is 42... mmm well not exactly, but almost, it's **21**.\n\nIf you, like me, are interested to know exactly what these 21 combinations are, you can use this **@botpoker/all-combs** module I've made.\n\nIt's a pretty simple, and small JavaScript module, without dependencies; it exports just a function you can use to get those combinations you're interested in.\n\n```js\nconst getCombinations = require(\"@botpoker/all-combs\");\nconst comb = getCombinations([1, 2, 3, 4, 5, 6, 7]);\n  // it's the same that const comb = getCombinations([1,2,3,4,5,6,7], 5);\n\ncomb.length // = 42/2\n```\n\n## NPM\n\nHey npm folks, you can install [@botpoker/all-combs](https://www.npmjs.com/package/@botpoker/all-combs) via npm:\n\n```\nnpm i @botpoker/all-combs\n```\n\n... but probably you already knew.\n","readmeFilename":"README.md"}