npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

poker-odds-calculator

v0.4.0

Published

A pre-flop and post-flop odds calculator for Texas Holdem

Downloads

1,279

Readme

♠️♥️ Poker Odds Calculator ♣️♦️

CI Latest Stable Version

An easy-to-use pre-flop & post-flop odds calculator for Texas Hold'em and Short Deck Hold'em (6+)

✨ Features

  • ♠️ Texas Hold’em and Short Deck Hold’em support
  • ⚡ Fast odds calculation (CLI & API)
  • 🎲 Calculate equity for any number of hands
  • 🧑‍💻 Node.js & TypeScript ready
  • 🧪 100% tested, production ready

📦 Installation

npm install poker-odds-calculator

🖥️ CLI Usage

Pre-Flop Odds

Let's say we want to know the odds for these 3 hands: J♥J♠ vs T♦T♠ vs A♣K♣:

npx poker-odds-calculator JhJs TdTs AcKc

Post-Flop Odds

On a 7♦9♦T♠ board (with 2 cards to come), with two hands:

npx poker-odds-calculator -b 7d9dTs JhJs JdQd
npx poker-odds-calculator --board 7d9dTs7s JhJs JdQd

-b denotes the board

Short Deck

To calculate odds using the short deck (6+) rules, override the game variant with -g/--game:

npx poker-odds-calculator -g short -b 7d9dTs JhJs JdQd
npx poker-odds-calculator --game short --board 7d9dTs7s JhJs JdQd

🛠️ API Usage

Calculate odds programmatically in TypeScript/Node:

import {CardGroup, OddsCalculator} from 'poker-odds-calculator';

const player1Cards = CardGroup.fromString('JhJs');
const player2Cards = CardGroup.fromString('JdQd');
const board = CardGroup.fromString('7d9dTs');

const result = OddsCalculator.calculate([player1Cards, player2Cards], board);

console.log(`Player #1 - ${player1Cards} - ${result.equities[0].getEquity()}%`);
console.log(`Player #2 - ${player2Cards} - ${result.equities[1].getEquity()}%`);

For Short Deck odds:

const result = OddsCalculator.calculate([player1Cards, player2Cards], board, 'short');

📄 License

This project is licensed under the MIT License - see the LICENSE.md file for details.