validateCardString
Returns true if a single card string parses (Ah, 10c, …).
validateCardString(card: string): boolean
Import
const poker = require('poker-calculations');
When to use
Use at form boundaries before calling evaluators or simulators—cheaper than try/catch on heavier APIs.
How to use
if (!poker.validateCardString(userInput)) {
throw new Error('Invalid card');
}