{"_id":"@botpoker/hand","_rev":"1-369d26dea26743d2631cbb18430e4275","name":"@botpoker/hand","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@botpoker/hand","version":"1.0.0","description":"Evaluate poker hold'em hands","main":"index.js","scripts":{"lint":"eslint lib/** tests/*.js","test":"npm run lint && tap tests/*.js --coverage-report=html"},"repository":{"type":"git","url":"git+https://github.com/brunoscopelliti/poker-has.git"},"keywords":["poker","texas hold'em","evaluate poker hands","hold'em poker"],"author":{"name":"Bruno Scopelliti"},"license":"MIT","bugs":{"url":"https://github.com/brunoscopelliti/poker-has/issues"},"homepage":"https://github.com/brunoscopelliti/poker-has","devDependencies":{"eslint":"7.25.0","eslint-config-bruno":"3.0.0","pre-commit":"1.2.2","tap":"15.0.6"},"gitHead":"28befff847b085eb3f0b8c8a2d55927c8e159d3a","_id":"@botpoker/hand@1.0.0","_nodeVersion":"15.9.0","_npmVersion":"7.5.3","dist":{"integrity":"sha512-ASNeNCe6RQcCTfBukcMT/vkYqFwQiF6rua2IyPwnPBvm1wdLf48ZJu+sZ80QP/uiPOoRamKaRbLZLATkHdCnGA==","shasum":"7d55c6b0193396faa00284dc8f49d3d0698afd9e","tarball":"https://registry.npmjs.org/@botpoker/hand/-/hand-1.0.0.tgz","fileCount":42,"unpackedSize":190826,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjlZVCRA9TVsSAnZWagAAS2sP/3ywzdVxTQXk7vuoyO81\noevdYO4hXnzsHA4qAvOYYybX9rChNa3w6s17pQP++UGBtjfB0xXH0vWQSBA8\nskYWsAJ9ka5kDL9dhj2DnhxSIh05WN5k0rXKBUAnnYZfc6JfBLWr/yZV6m9Y\nsgb7TCmBwhSOtxr43W74lijiNGIZyd84mp1VgSBZ5zDiEcN4klcBaAS9LCAt\nTCz3cuQ4T3nv1uIqfdamL6WnfvI8f5+9jWj+G0JSJiGcsFhhMFv/g7aEajOb\n4uoj/lj3eJDszTxzsrediqaZclmV9pqBrbpST6RziIJtDTcE9dj3KtaDbt+J\nZ7+Mi2Pe6Ca8yHngOcHNlq1Dn7nfdtpWTPvzZ3XI6oqdCdkVOaRwkPkvY4jz\nQ4WYIegh+0cwYkHyHY6U32cp+20KctK1wxDw0YNDDbBseh6Ut0+WORnD5+e3\n9YZ5q3lXJD1StDV8YQC+2OVgO8YAznKciTvNhwDJLPepcfkhNPHuL0xyNVGi\nY0D9D0vpoL1hfDw+qk8lHXMyNsD0WiCLzU1T2c2jCx6FQRK779mrmdW5OqJl\ngDTZAYvlDcGtQeu60U0sqluDUekYPY2YA0Vfgygd2foJmtbKK/lm2aUYDsIB\njWqjIkSmYxJ/ZeKyZrBzGb8YGwB2jSTX3f9UtSr9sAmzLYuZe3kNz/MVmMl7\nbGi3\r\n=6U0Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICCj+KB+Y32BdekhD75KHQQGh6bQhuQ8PWb7yLo+bmr9AiAI2ey/oE4FvUtWp24y/djzf7pXRKpMSYeIpB5mTE5Z8w=="}]},"_npmUser":{"name":"brunoscopelliti","email":"me@brunoscopelliti.com"},"directories":{},"maintainers":[{"name":"brunoscopelliti","email":"me@brunoscopelliti.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hand_1.0.0_1619940948899_0.5508946852780037"},"_hasShrinkwrap":false}},"time":{"created":"2021-05-02T07:35:48.548Z","1.0.0":"2021-05-02T07:35:49.090Z","modified":"2022-04-04T20:14:28.085Z"},"maintainers":[{"name":"brunoscopelliti","email":"me@brunoscopelliti.com"}],"description":"Evaluate poker hold'em hands","homepage":"https://github.com/brunoscopelliti/poker-has","keywords":["poker","texas hold'em","evaluate poker hands","hold'em poker"],"repository":{"type":"git","url":"git+https://github.com/brunoscopelliti/poker-has.git"},"author":{"name":"Bruno Scopelliti"},"bugs":{"url":"https://github.com/brunoscopelliti/poker-has/issues"},"license":"MIT","readme":"# @botpoker/hand\n\nYou can install [@botpoker/hand](https://www.npmjs.com/package/@botpoker/hand) via npm:\n\n```\nnpm i @botpoker/hand --save\n```\n\n## About @botpoker/hand\n\n**@botpoker/hand** does just one thing: it tries to guess the strength of a given poker combination. It exports only one method:\n\n```js\nconst whatIs = require(\"@botpoker/hand\");\n```\n\nThe `whatIs` function expects to be called with an array of five *cards*.\nA `card` is an object with properties `rank`, and `type`, like the one used by [poker-deck](https://github.com/brunoscopelliti/poker-deck).\n\n```js\nwhatIs([\n  { rank: \"6\", type: \"H\" },\n  { rank: \"7\", type: \"D\" },\n  { rank: \"9\", type: \"S\" },\n  { rank: \"8\", type: \"C\" },\n  { rank: \"5\", type: \"C\" },\n]);\n```\n\nThis is a straight of 9... however `@botpoker/hand` know this is a combination with a strength of **4** compared to the other possible poker combinations.\n\n```js\nwhatIs([\n  { rank: \"2\", type: \"D\" },\n  { rank: \"3\", type: \"D\" },\n  { rank: \"J\", type: \"D\" },\n  { rank: \"5\", type: \"D\" },\n  { rank: \"6\", type: \"D\" },\n]);\n```\n\nThis is a flush, and the highest card is Jack; so this combination has a strength of **5**. In this case the expected result is:\n\n```js\n{ \n  name: \"Flush\",\n  strength: 5,\n  rank: \"J\",\n  kickers: [\"6\", \"5\", \"3\", \"2\"],\n}\n```\n","readmeFilename":"README.md"}