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 🙏

© 2024 – Pkg Stats / Ryan Hefner

hha

v0.7.1

Published

Poker HandHistory Analyzer

Downloads

26

Readme

hha build status

Poker HandHistory Analyzer

Status

Analyzes holdem hands.

Installation

npm install hha

API

analyze

Analyzes a given PokerHand which has been parsed by the HandHistory Parser hhp. Relative player positions are calculated, i.e. cutoff, button, etc. Players are included in order of action on flop.

The analyzed hand then can be visualized by hhv.

For an example of an analyzed hand please view json output of an analyzed hand.

Parameters

Returns object the analyzed hand

filterInactives

Filters all players who didn't act in the hand or just folded.

Parameters

Returns Array<Object> all players that were active in the hand

hha.script

Scripts what happened in a hand into a actions script array. This array can be read top down to replay the hand.

The players and info fields from the analyzed data are copied over. Each action includes the index at which the player that's executing the action can be found in the players array.

Structure of returned object:

info: object containing hand info
table: object containing info about the table like total seats
board: object cards on the board
players: array of all players at the table including all info about their stacks
actions:
 preflop  : array of preflop actions
 flop     : array of flop actions
 turn     : array of turn actions
 river    : array of river actions
 showdown : array of showdown actions

Parameters

  • data object analyzed hand data @see hha()

Returns object

hha.storyboard

Takes a script of actions and calculates the states for each. Adds pointers to the state at the beginning of each script.

This is useful if you try to jump around in the hand and reset the state of the table.

Parameters

  • script Object created via @see hha:script

hha.summary

Converts a hand that was analyzed and then scripted to a summary representation.

The summary has the following properties:

  • header: contains game info, like room, pokertype, blinds, etc.
  • seats: lists the seats of the players including pos, chips and hero indicators
  • chipsStackRatio: hero's M for tournaments, his BBs for cash games
  • preflopSummary: hero's cards and position
  • preflopActions: action types + amounts of each player by position
  • flopSummary: pot at flop, board and playersInvolved
  • flopActions: same as preflopActions
  • turnSummary: pot at turn, turn card and playersInvolved
  • turnActions: same as preflopActions
  • riverSummary: pot at river, river card and playersInvolved
  • riverActions: same as preflopActions
  • totalPot: total money in the pot
  • spoilers: players whos cards are known by position

Parameters

Returns Object the hand summarized

License

MIT