cardStringsHaveDuplicate
true if any two entries map to the same card. Accepts string[] or packed Uint8Array. Throws if any entry is invalid.
cardStringsHaveDuplicate(cards: CardInput): boolean
Import
const poker = require('poker-calculations');
When to use
Use before simulations or comparisons when cards come from user input or multiple sources.
How to use
const hole = ['Ah', 'Ad'];
if (poker.cardStringsHaveDuplicate(hole)) {
console.log('Duplicate cards in hole');
}