decodeBase64

Decodes Base64 content. Traditionally, JavaScript would use atob to decode Base64, but the function does not exist in Sentinel JavaScripts because there is no window object.

Signatures

beacon.decodeBase64(base64);

Parameters

base64

The Base64-encoded content to decode.

Return Values

Type Notes
String The decoded binary data.

Examples

Decode a hello world message

const decoded = beacon.decodeBase64('SGVsbG8gV29ybGQ=');
beacon.debugPrint(decoded); // Outputs "Hello World"

See Also