An open API service indexing awesome lists of open source software.

https://github.com/creativenull/pokerjs

A simple poker library written in TypeScript
https://github.com/creativenull/pokerjs

card playing-cards poker

Last synced: about 2 months ago
JSON representation

A simple poker library written in TypeScript

Awesome Lists containing this project

README

        

# Poker.js

A simple card poker library written in TypeScript.

## Installation

```sh
npm install @creativenull/pokerjs
```

### Deno

```ts
import { Poker } from "jsr:@creativenull/pokerjs@2";
```

## Test

```sh
npm run test
```

## Usage

```ts
import { Poker } from "@creativenull/pokerjs";

const poker = new Poker();
const player1 = { id: "player1", hand: poker.getPlayerHand() };
const player2 = { id: "player2", hand: poker.getPlayerHand() };

const winner = poker.winner([player1, player2]);
console.log(winner);
```