{"_id":"@agonyz/poker-odds-calculator","name":"@agonyz/poker-odds-calculator","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@agonyz/poker-odds-calculator","version":"0.1.0","description":"A pre-flop and post-flop odds calculator for Texas Holdem","bin":{"poker-odds-calculator":"dist/bin/poker-odds-calculator.js"},"main":"./dist/index.js","typings":"./dts/index.d.ts","scripts":{"build":"rm -rf dist/* && rm -rf dts/* && tsc","test":"mocha --config .mocharc.json","cover":"NODE_ENV=test nyc --report-dir coverage npm t"},"repository":{"type":"git","url":"git+https://github.com/agonyz/node-poker-odds-calculator.git"},"keywords":["poker","odds","equity"],"author":{"name":"Mickael Burguet","email":"www.rundef.com"},"contributors":[{"name":"Frank Ficzak","email":"dev@agonyz.de","url":"https://agonyz.de"}],"license":"MIT","engines":{"node":">= 6.0.0","npm":">= 3"},"dependencies":{"chai":"^4.3.6","chalk":"^4.1.2","commander":"^12.1.0","lodash":"^4.17.21"},"devDependencies":{"@types/chai":"^4.3.16","@types/chalk":"^0.4.31","@types/commander":"^2.12.0","@types/lodash":"^4.17.7","@types/mocha":"^10.0.7","@types/node":"^20.14.11","coveralls":"^3.1.1","mocha":"^10.6.0","nyc":"^17.0.0","prettier":"^3.3.3","ts-node":"^10.9.2","typescript":"^5.5.3"},"nyc":{"include":["src/*.ts"],"exclude":["node_modules","dts"],"extension":[".ts"],"require":["ts-node/register"],"reporter":["json","html","lcov"],"all":true},"_id":"@agonyz/poker-odds-calculator@0.1.0","gitHead":"340b2987c31065f24f363fcf453624b5723ccb10","bugs":{"url":"https://github.com/agonyz/node-poker-odds-calculator/issues"},"homepage":"https://github.com/agonyz/node-poker-odds-calculator#readme","_nodeVersion":"20.13.1","_npmVersion":"10.5.2","dist":{"integrity":"sha512-5LnMZs+N2FYrpQFTHlHMLspgGJlBbcs2SXLC76NrqeZbB1Yj494K6Ezw8G/PGjM9PFJRI/MS7zyEsiduYgCGjg==","shasum":"7b8f35e8c4b473b60d572bdb42eaa2f8e692fbde","tarball":"https://registry.npmjs.org/@agonyz/poker-odds-calculator/-/poker-odds-calculator-0.1.0.tgz","fileCount":35,"unpackedSize":83699,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDURuN/v8bSyGHZVmLkDduiy9ZvstqdsPl3mAt4aQMHlAiEAgFNwwWlgTZdBlYp5m1f3w167Dix2WYysxZYseXRQ7aQ="}]},"_npmUser":{"name":"agonyz","email":"agonyz@outlook.de"},"directories":{},"maintainers":[{"name":"agonyz","email":"agonyz@outlook.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/poker-odds-calculator_0.1.0_1721434668616_0.5951823282306112"},"_hasShrinkwrap":false}},"time":{"created":"2024-07-20T00:17:48.518Z","0.1.0":"2024-07-20T00:17:48.824Z","modified":"2024-07-20T00:17:49.103Z"},"maintainers":[{"name":"agonyz","email":"agonyz@outlook.de"}],"description":"A pre-flop and post-flop odds calculator for Texas Holdem","homepage":"https://github.com/agonyz/node-poker-odds-calculator#readme","keywords":["poker","odds","equity"],"repository":{"type":"git","url":"git+https://github.com/agonyz/node-poker-odds-calculator.git"},"contributors":[{"name":"Frank Ficzak","email":"dev@agonyz.de","url":"https://agonyz.de"}],"author":{"name":"Mickael Burguet","email":"www.rundef.com"},"bugs":{"url":"https://github.com/agonyz/node-poker-odds-calculator/issues"},"license":"MIT","readme":"# Poker Odds Calculator\n\n[![Build Status](https://travis-ci.org/rundef/node-poker-odds-calculator.svg?branch=master)](https://travis-ci.org/rundef/node-poker-odds-calculator)\n[![Coverage Status](https://coveralls.io/repos/github/rundef/node-poker-odds-calculator/badge.svg?branch=master)](https://coveralls.io/github/rundef/node-poker-odds-calculator?branch=master)\n[![Latest Stable Version](https://img.shields.io/npm/v/poker-odds-calculator.svg)](https://www.npmjs.com/package/poker-odds-calculator)\n\nA pre-flop and post-flop odds calculator for Texas Holdem.\n\nForked from: https://github.com/rundef/node-poker-odds-calculator\n\n## Installation\n\n```bash\nnpm install poker-odds-calculator\n```\n\n## Console Usage\n\n#### Pre-flop odds\n\nLet's say that we want to know the odds of 3 pre-flop all-in players holding the following hands: J♥J♤ vs T♢T♤ vs A♧K♧ :\n\n```bash\nnode_modules/.bin/poker-odds-calculator JhJs TdTs AcKc\n```\n\n#### Post-flop odds\n\nLet's say that we want to know the odds of a player holding the J♢ and the Q♢ against a player with the J♥ and the J♤ on a 7♢9♢T♤ board, with 2 cards to come :\n\n```bash\nnode_modules/.bin/poker-odds-calculator -b 7d9dTs JhJs JdQd\nnode_modules/.bin/poker-odds-calculator --board 7d9dTs7s JhJs JdQd\n```\n> -b denotes the board\n\n#### Short deck\n To calculate odds for short deck, override the game variant with -g\n ```bash\nnode_modules/.bin/poker-odds-calculator -g short -b 7d9dTs JhJs JdQd\nnode_modules/.bin/poker-odds-calculator --game short --board 7d9dTs7s JhJs JdQd\n```\n\n## API Usage\n\nLet's take the previous example, but use the API instead:\n\n```js\nimport {CardGroup, OddsCalculator} from 'poker-odds-calculator';\n\nconst player1Cards = CardGroup.fromString('JhJs');\nconst player2Cards = CardGroup.fromString('JdQd');\nconst board = CardGroup.fromString('7d9dTs');\n\nconst result = OddsCalculator.calculate([player1Cards, player2Cards], board);\n\nconsole.log(`Player #1 - ${player1Cards} - ${result.equities[0].getEquity()}%`);\nconsole.log(`Player #2 - ${player2Cards} - ${result.equities[1].getEquity()}%`);\n```\n\nTo use Short Deck:\n```js\nconst result = OddsCalculator.calculate([player1Cards, player2Cards], board, undefined, 'short');\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.","readmeFilename":"README.md"}