Skip to content

Instantly share code, notes, and snippets.

@ShapeGroup
Last active June 19, 2021 20:23
Show Gist options
  • Save ShapeGroup/34bbc47200277f987b3fea2a15aceeab to your computer and use it in GitHub Desktop.
Save ShapeGroup/34bbc47200277f987b3fea2a15aceeab to your computer and use it in GitHub Desktop.
js-kit-base-64
//// 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