Skip to main content
Home

A simple poker library written in TypeScript.

This package works with Cloudflare Workers, Node.js, Deno, BrowsersIt is unknown whether this package works with Bun
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
This package works with Browsers
JSR Score
64%
Published
a year ago (2.2.0)

Poker.js

A simple card poker library written in TypeScript.

Installation

npm install @creativenull/pokerjs

Deno

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

Test

npm run test

Usage

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);

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@creativenull/pokerjs

Import symbol

import * as pokerjs from "@creativenull/pokerjs";
or

Import directly with a jsr specifier

import * as pokerjs from "jsr:@creativenull/pokerjs";

Add Package

pnpm i jsr:@creativenull/pokerjs
or (using pnpm 10.8 or older)
pnpm dlx jsr add @creativenull/pokerjs

Import symbol

import * as pokerjs from "@creativenull/pokerjs";

Add Package

yarn add jsr:@creativenull/pokerjs
or (using Yarn 4.8 or older)
yarn dlx jsr add @creativenull/pokerjs

Import symbol

import * as pokerjs from "@creativenull/pokerjs";

Add Package

vlt install jsr:@creativenull/pokerjs

Import symbol

import * as pokerjs from "@creativenull/pokerjs";

Add Package

npx jsr add @creativenull/pokerjs

Import symbol

import * as pokerjs from "@creativenull/pokerjs";

Add Package

bunx jsr add @creativenull/pokerjs

Import symbol

import * as pokerjs from "@creativenull/pokerjs";