src/message.js
function stringToUint8Array(str) {
  const arr = new Uint8Array(str.length);
  for (let i = 0, j = str.length; i < j; i++) {
    arr[i] = str.charCodeAt(i);
  }
  return arr;
}
function stringToUint8Array(str) {
  const arr = new Uint8Array(str.length);
  for (let i = 0, j = str.length; i < j; i++) {
    arr[i] = str.charCodeAt(i);
  }
  return arr;
}
function stringToUint8Array ( str ) { const arr = new Uint8Array ( str . length ) ; for ( let i = 0 , j = str . length ; i < j ; i ++ ) { arr [ i ] = str . charCodeAt ( i ) ; } return arr ; }
Converts a String to a Uint8Array.
@param {String} str string that should be converted
@returns {Uint8Array}
Converts a String to a Uint8Array .