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 🙏

© 2024 – Pkg Stats / Ryan Hefner

pdetail

v0.4.1

Published

Companion package to prange which provides more detail for each combo in a card range.

Downloads

196

Readme

pdetail build status

Companion package to prange which provides more detail for each combo in a card range.

const { detailRange } = require('pdetail')
console.log(detailRange('AKs')) 
// => Set { 'AhKh', 'AsKs', 'AdKd', 'AcKc' }

Installation

npm install pdetail

API

detailRangeAll

Returns all possible 1326 combinations of cards one might hold.

Returns Set set of all possible card combos

detailRangeIn

Provides all combos of the card range that are found in the provided set.

Parameters

  • set Set to be queried for the combos that are represented by the range
  • cards String the cards for which to give a detailed combo range, i.e. 'AKs'

Returns Set all combos that are represented by the given range and also found in the set

detailRange

Provides all possible combinations of a given part of a card range.

 '99'  => '9h9s', '9h9d', '9h9c', '9s9d', '9s9c', '9d9c'

 'AKs' => 'AhKh', 'AsKs', 'AdKd', 'AcKc'

 'KQo' => 'KhQs', 'KhQd', 'KhQc', 'KsQh', 'KsQd', 'KsQc',
          'KdQh', 'KdQs', 'KdQc', 'KcQh', 'KcQs', 'KcQd'

 'JT'  => 'JhTh', 'JhTs', 'JhTd', 'JhTc', 'JsTh', 'JsTs', 'JsTd', 'JsTc',
          'JdTh', 'JdTs', 'JdTd', 'JdTc', 'JcTh', 'JcTs', 'JcTd', 'JcTc'

Parameters

  • cards String the cards for which to give a detailed combo range, i.e. 'AKs' Note: that AKs is considered the same as KAs and no duplicate combos will be included

Returns Set set of all possible combinations on how to hold the combo

rangeFromDetail

Calculates a range from the detail combos, i.e. obtained via detailRange.

Returns any object with the following props:- {Map} pairs: all pairs found grouped, i.e. AA: { AdAs, AdAc ... }

  • {Map} suiteds: all suiteds found grouped, i.e. AKs: { AdKd, AcKc ... }
  • {Map} offsuits: all offsuits found grouped, i.e. AKo: { AdKc, AcKs ... }
  • {Set} incomplete: all incomplete ranges, i.e. AA if one possible AA combo was missing
  • {Set} complete: all complete ranges, i.e. AA if none possible AA combo was missing
  • {Set} all: union of incomplete and complete

License

MIT