This typescript library goal is to parse Holdem Poker
hand range
notations and to return the full list of hands they represent
A good way to understand what this does, is to have a look on src/__tests__/e2e.test.ts
file
const ranges = parse("99+/AKs+");
const result = enumerateHandRanges(ranges).map(formatHand).join(" ").trim();
const expected =
"9h9s 9h9c 9h9d 9s9c 9s9d 9c9d ThTs ThTc ThTd TsTc TsTd TcTd JhJs JhJc JhJd JsJc JsJd JcJd QhQs QhQc QhQd QsQc QsQd QcQd KhKs KhKc KhKd KsKc KsKd KcKd AhAs AhAc AhAd AsAc AsAd AcAd AhKh AsKs AcKc AdKd";
expect(result).toEqual(expected);
This library is still under development and is not yet complete.