Serializes any object, encodes it to a buffer, and outputs a Base64 string.
The object to serialize and encode
A Base64 string representation of the serialized object
const token = encodeBase64({ user: 'michael' }); Copy
const token = encodeBase64({ user: 'michael' });
Serializes any object, encodes it to a buffer, and outputs a Base64 string.