![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
hand-ranker
Advanced tools
Returns the best possible 5-card poker hand from an array of N >= 5 cards.
npm install hand-ranker
A card is represented by an object with properties 's' and 'v', where 's' describes the suit (s = spade, h = heart, c = club, d = diamond) and 'v' describes the value (1 = ace, 13 = king).
bestHand(cards)
- returns a results object with the best 5-card hand (sorted), a string describing the hand, an integer hand value (0 = high card, 8 = straight flush)
var ranker = require('hand-ranker');
var cards = [
{ s: 's', v: 10 },
{ s: 'c', v: 1 },
{ s: 's', v: 13 },
{ s: 's', v: 1 },
{ s: 'd', v: 1 },
{ s: 's', v: 12 },
{ s: 's', v: 11 }
];
var result = ranker.bestHand(cards);
/*
result:
{
hand: [
{ s: 's', v: 10 },
{ s: 's', v: 11 },
{ s: 's', v: 12 },
{ s: 's', v: 13 },
{ s: 's', v: 1 }
],
type: 'straight flush',
val: 8
}
*/
MIT
FAQs
a poker hand ranking module
The npm package hand-ranker receives a total of 2 weekly downloads. As such, hand-ranker popularity was classified as not popular.
We found that hand-ranker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.