code: function to64(index, count) {
      let result = '';
  
      while (--count >= 0) { // Result char count.
          result += itoa64[index & 63]; // Get corresponding char.
          index = index >> 6; // Move to next one.
      }
  
      return result;
  }
docs: To 64 bit version.