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 🙏

© 2026 – Pkg Stats / Ryan Hefner

aces-high-core

v4.3.2

Published

Base framework for card and deck functionality

Readme

Aces High Core

Aces High Core is a foundational TypeScript library designed to support card game implementations. It provides reusable components and abstractions for building card games like Cribbage, Poker, and beyond. This library serves as the backbone for the Aces High Cribbage and Aces High Poker engines.

Features

  • Card Handling: Classes and utilities for modeling cards, decks, and hands.
  • Game Logic: Extendable abstractions for implementing game rules and mechanics.
  • Shared Utilities: Helper methods for operations like combinations, shuffling, and comparisons.
  • TypeScript Support: Fully written in TypeScript to provide strong typing and modern JavaScript features.

Installation

To install the library, use npm or yarn:

npm install aces-high-core

or

yarn add aces-high-core

Getting Started

Here’s a quick example of how to use Aces High Core to work with cards and decks:

import { Card, Deck, Suits, Faces } from "aces-high-core";

// Create a new deck of cards
const deck = new Deck();
deck.fullShuffle();

// Draw five cards
const hand = deck.draw(5);
console.log("Your hand:", hand);

Key Classes and Modules

  • Card: Represents a standard playing card with a suit and face value.
  • Deck: A standard deck of 52 cards with shuffling and drawing capabilities.
  • CardHand: Represents a player's hand, with utilities for adding, removing, and analyzing cards.
  • Utilities:
    • getCombinations: Generate combinations of cards for scoring logic.
    • shuffle: Randomize the order of cards in a deck or hand.

Use Cases

  • Cribbage Engine: Used in Aces High Cribbage to handle card combinations, scoring, and game logic.
  • Poker Engine: Supports Aces High Poker with abstractions for poker hands and rules.

Development

To contribute to Aces High Core, clone the repository and install dependencies:

git clone https://github.com/asmitty92/aces-high-core.git
cd aces-high-core
npm install

Running Tests

Aces High Core is fully tested to ensure reliability. Run the test suite using:

npm test

Roadmap

Here are some planned features and improvements:

  • Add support for more card games (e.g., Blackjack, Rummy).
  • Enhance documentation with in-depth guides and examples.
  • Optimize performance for larger-scale games.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Related Projects

Contact

For questions or suggestions, feel free to open an issue or contact @asmitty92 directly.