Created
April 7, 2018 11:11
-
-
Save tsavola/877c2c3a04fcbbbf94afc985abab4938 to your computer and use it in GitHub Desktop.
JavaScript (ES6) oneliner for URL-safe base-64 of arraybuffer contents.
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
| btoa(String.fromCharCode(...new Uint8Array(data))).replace(/\+/g, "-").replace(/\//g, "_") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment