# hoyle

> Javascript Poker Hand Evaluator

Latest version **0.3.0** (published 2019-05-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install hoyle
pnpm add hoyle
yarn add hoyle
bun add hoyle
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2019-05-29 |
| First published | 2012-09-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.16.0 |
| Dependencies | 0 |
| Unpacked size | 61.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 27 |
| Author | Mark Percival |
| Maintainers | mdp |
| Keywords | poker, poker-hand, poker-hands |

## Links

- npm: https://www.npmjs.com/package/hoyle
- Repository: https://github.com/mdp/hoyle
- Homepage: https://github.com/mdp/hoyle#readme
- Issues: https://github.com/mdp/hoyle/issues
- npm.io page: https://npm.io/package/hoyle

## Recent versions

- 0.3.0 (latest) — 2019-05-29
- 0.2.2 — 2013-06-21
- 0.2.1 — 2012-11-25
- 0.2.0 — 2012-09-19
- 0.1.5 — 2012-09-19

## README

[![Build
Status](https://secure.travis-ci.org/mdp/hoyle.png)](http://travis-ci.org/mdp/hoyle)

![Hoyle](http://img.mdp.im.s3.amazonaws.com/2013m15u0001_2008035_0000084.jpg_18631321mjcge.jpg)

# Hoyle

## A Javascript poker hand evaluator (Written in Coffeescript)

### Example

    Hand = require('hoyle').Hand

    describe "Finding winning hands", ->
      it "should detect the winning hand from a list", ->
        gary = Hand.make(["2s","3s","4h","5c","As","Ts","8d"])
        mike = Hand.make(["5s","Ts","3h","Ac","2s","Ts","8d"])
        steve = Hand.make(["5s","5h","3s","3c","2s","Ts","3d"])
        winners = Hand.pickWinners([gary, mike, steve])
        winners.length.should.equal 1
        winners[0].should.equal steve
        winners[0].name.should.equal "Full house"

### Install

    npm install hoyle

### Install and use locally

    git clone git://github.com/mdp/hoyle.git
    cd hoyle
    npm install
    npm run-script prepublish
    npm link

### Testing

    npm install
    npm test

### Notes

- Handles making the best poker hand out of 5-7 cards
- Written for code clarity, not speed (But still plenty fast for many
uses) See
["The Great Poker Hand Evaluator
Roundup"](http://web.archive.org/web/20140625212722/http://codingthewheel.com/archives/poker-hand-evaluator-roundup/)
for a deeper dive into speedy poker hand evaluators.

---
_Source: https://npm.io/package/hoyle · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
