Decode and encode Hearthstone deckstrings.
Any deckstring or deck definition returned by this library will be canonical. This means that the cards and heroes are sorted in ascending order by dbf id.
A mapping between dbf ids and cards can be found at HearthstoneJSON.
Install the package from npm using your favourite package manager:
$ yarn add deckstrings
;const deck =cards: 1 2 2 2 3 2 4 1 // [dbfid, count] pairsheroes: 7 // Garrosh Hellscreamformat: 1 // 1 for Wild, 2 for Standard;const deckstring = ;console; // AAEBAQcBBAMBAgMAconst decoded = ;console; // true