function encode64 (input) {
  // base64 strings are 4/3 larger than the original string
  input = encodeUTF8(input) // convert non-ASCII characters
  return window.btoa(input) // Use native if available
}
Converts a string to base64.
@function module:utilities.encode64
@param {string} input
@returns {string} Base64 output