• Converts a string to a Base64 URL-encoded data URI.

    This function uses the stringToBase64 function to encode the string in Base64, and then returns it as a data URI in the format suitable for embedding JavaScript.

    Parameters

    • string: string

      The string to encode into a Base64 URL.

    Returns string

    The Base64-encoded data URI, prefixed with data:application/javascript;base64,.