How to use "btoa" (and "atob") in Javascript?

Ive tried to base64 encode a string in javascript by using “btoa(mystring)”.

“StackTrace: ReferenceError: btoa is not defined”

Am I missing a require?


atob and btoa are part of the browser’s API and currently not available in FuseJS. You’ll need to use a polyfill, e.g.:

Thank you for quick reply.