Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
KilledByAPixel committed Aug 4, 2021
1 parent b0f8f22 commit a4481ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,15 @@ <h1>JSONCrush Demo - Compress JSON into URL friendly strings</h1>
const stringToCrush = textarea_JSON.value;

// Just call JSON crush to crush your string!
const crushed = textarea_crushed_uri.value = JSONCrush.crush(stringToCrush);
const crushed = JSONCrush.crush(stringToCrush);

// To uncrush call JSONUncrush on the crushed string.
const uncrushed = JSONCrush.uncrush(crushed);
textarea_uncrushed.value = uncrushed;

// We can verify that the uncrushed string matches the orginal string
div_crush_result.innerHTML = stringToCrush == uncrushed? "SUCCESS: Strings match!" : "ERROR: Strings don't match!";
textarea_crushed_uri.value = crushed;
textarea_uncrushed.value = uncrushed;
}

function PreformUnitTests()
Expand Down

0 comments on commit a4481ca

Please sign in to comment.