bytes.toBase64()

Convert an FQL Bytes value to a Base64-encoded string.

Signature

toBase64() => String

Description

Converts an FQL Bytes value to a Base64-encoded string. A Bytes value stores a byte array, represented as a Base64-encoded string. You can use Bytes to store binary data in a Fauna database.

This method is equivalent to bytes.toString().

Parameters

None.

Return value

Type Description

String

Base64-encoded String.

Examples

Bytes("SGVsbG8sIEZhdW5hIQ==").toBase64()

The method returns a String:

"SGVsbG8sIEZhdW5hIQ=="
\