marvel-snap-deckstrings
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

deckstrings for Marvel Snap

npm

Decode and encode Marvel Snap deckstrings.

Install

Install the package from npm using your favourite package manager:

$ yarn add marvel-snap-deckstrings

Usage

import { encode, decode } from "marvel-snap-deckstrings";

const deck = {
  cards: ["ProfessorX", "JessicaJones", "AmericaChavez", "Enchantress"], // dbfId[]
};

const deckstring = encode(deck);
console.log(deckstring); // eyJDYXJkcyI6W3siQ2Fy

const decoded = decode(deckstring);
console.log(JSON.stringify(deck) === JSON.stringify(decoded)); // true

Readme

Keywords

none

Package Sidebar

Install

npm i marvel-snap-deckstrings

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

6.39 kB

Total Files

7

Last publish

Collaborators

  • vv2