Created
January 7, 2019 09:09
-
-
Save ccapndave/5b80543440d63dbffbb3cfd79fecbc55 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
{ | |
base64ToBuffer: base64 => new TextEncoder().encode(atob(base64)), | |
bufferToBase64: buffer => btoa(String.fromCharCode(...new Uint8Array(buffer))) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment