开发者社区> 镜像站> NPM> hhp
hhp
Poker HandHistory Parser
Last updated 2 years ago by thlorenz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install hhp 
SYNC missed versions from official npm registry.

hhp build status

become a patron

Poker HandHistory Parser

Status

Parses PokerStars, Ignition, PartyPoker and Pacific (888) Hold'em hands, tourneys, SNGs and Cash.

Installation

npm install hhp

API

parseHand

Parses PokerHand Histories as output by the given online Poker Rooms. Autodetects the game type and the PokerRoom.

The parsed hands can then be further analyzed with the hha module.

As an example this hand is parsed into this object representation.

Parameters

  • input string the textual representation of one poker hand as written to the HandHistory folder
  • opts object? various options
    • opts.infoOnly boolean? denotes that only the header line of the hand is parsed and only the info object returned
    • opts.buyinFile string? file name overrides buyin for rooms that don't include it in the history like Ignition

Returns object representation of the given hand to be used as input for other tools like hha

canParse

Determines if any of the parsers can parse the passed hand(s).

Parameters

Returns Boolean true if it knows how to parse this text

extractHands

Extracts all hands from a given text file.

Parameters

  • txt string the text containing the hands

Returns Array<Array> an array of hands, each hand split into lines

parseHands

Parses multiple hands from a given text.

Parameters

  • input string the textual representation of the poker hands as written to the HandHistory folder
  • opts object? various options, passed along to parseHand

Returns object parsed hands and errors encountered: { parsedHands: Array, errors: Array, count: Number }

License

MIT

Current Tags

  • 1.1.1                                ...           latest (2 years ago)

18 Versions

  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.5.4                                ...           3 years ago
  • 0.5.3                                ...           3 years ago
  • 0.5.2                                ...           3 years ago
  • 0.5.1                                ...           3 years ago
  • 0.5.0                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
  • 0.3.3                                ...           4 years ago
  • 0.3.2                                ...           4 years ago
  • 0.3.1                                ...           4 years ago
  • 0.3.0                                ...           4 years ago
  • 0.2.2                                ...           4 years ago
  • 0.2.1                                ...           4 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (4)
Dependents (0)
None