Last active
June 19, 2021 20:23
-
-
Save ShapeGroup/34bbc47200277f987b3fea2a15aceeab to your computer and use it in GitHub Desktop.
js-kit-base-64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//// JS KIT - B64 | |
//// MIT LICENCE | |
//// Credit: alberto marà | |
// how to use: | |
// var mydata = b64.encode('myjsobjectorstring'); | |
// var mydata = b64.decode('myjsobjectorstring'); | |
const b64 = { | |
encode: data => { return window.btoa(data); }, | |
decode: data => { return window.atob(data); } | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment