Skip to content

9j/marvel-snap-deckstrings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published