Skip to content

Instantly share code, notes, and snippets.

@theStrangeAdventurer
Created November 5, 2017 23:32
Show Gist options
  • Save theStrangeAdventurer/428ab803d7287edbc5b8524bc114c100 to your computer and use it in GitHub Desktop.
Save theStrangeAdventurer/428ab803d7287edbc5b8524bc114c100 to your computer and use it in GitHub Desktop.
Decode base64 data JS
function b64DecodeUnicode(str) {
return decodeURIComponent(Array.prototype.map.call(atob(str), function(c) {
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)
}).join(''))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment