examples/rctsockets/index.ios.js
function toByteArray(obj) {
  var uint = new Uint8Array(obj.length);
  for (var i = 0, l = obj.length; i < l; i++){
    uint[i] = obj.charCodeAt(i);
  }

  return new Uint8Array(uint);
}
function toByteArray(obj) {
  var uint = new Uint8Array(obj.length);
  for (var i = 0, l = obj.length; i < l; i++){
    uint[i] = obj.charCodeAt(i);
  }

  return new Uint8Array(uint);
}
function toByteArray ( obj ) { var uint = new Uint8Array ( obj . length ) ; for ( var i = 0 , l = obj . length ; i < l ; i ++ ) { uint [ i ] = obj . charCodeAt ( i ) ; } return new Uint8Array ( uint ) ; }
only works for 8-bit chars
only works for 8 - bit chars