Skip to content

Commit

Permalink
simplification
Browse files Browse the repository at this point in the history
also known as "im trying to get my daily commit in"
  • Loading branch information
ghluka committed Apr 29, 2024
1 parent 6019bdf commit 3badcb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions techdemos/encode/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const output = document.getElementById("outputText");

const codes = {
"Base64": {
encode: text => btoa(text),
decode: text => atob(text)
encode: btoa,
decode: atob
},
"Base16 (Hexadecimal)": {
encode: text => text.split("").map(c => c.charCodeAt(0).toString(16).padStart(2, "0")).join("").toUpperCase(),
Expand Down

0 comments on commit 3badcb5

Please sign in to comment.