text: (function(root) {
  
    function bufferToArrayBuffer(buffer) {
      var ab = new ArrayBuffer(buffer.length);
      var view = new Uint8Array(ab);
      for (var i = 0; i < buffer.length; ++i) {
        view[i] = buffer[i];
      }
      return ab;
    }
  
    if (typeof exports !== 'undefined') {
      if (typeof module !== 'undefined' && module.exports) {
        exports = module.exports = bufferToArrayBuffer;
      }
      exports.bufferToArrayBuffer = bufferToArrayBuffer;
    } else if (typeof define === 'function' && define.amd) {
      define([], function() {
        return bufferToArrayBuffer;
      });
    } else {
      root.bufferToArrayBuffer = bufferToArrayBuffer;
    }
  
  })(this);
  