sortedCardsWithJoker = _.sortBy(lines, ([hand, _bid]) => {
const [jokers, rest] = _.partition(hand, (x) => x === "J");
const jokersCount = jokers.length;
let freq = getFrequencyTable(rest);
if (freq.length) {
freq[0][1] += jokersCount;
} else {
freq = [["J", 5]];
}
return String.fromCharCode(
getHand(freq),
...Array.from(hand).map((x) => getCardScore_[x])
);
})