Function encodeBase64

  • Encodes a payload to base64.

    Parameters

    • payload: string

      The data to be encoded.

    Returns string

    The base64-encoded payload.

    Example

    const data = 'Hello, world!';
    const encodedData = encodeBase64(data);
    console.log(encodedData); // Base64-encoded data

Generated using TypeDoc