build/lib/buffer-utils.js
function bufferToArrayBuffer(buf) {
  const arr = new ArrayBuffer(buf.length);
  const view = new Uint8Array(arr);
  for (let i = 0; i < buf.length; ++i) {
    view[i] = buf[i];
  }
  return arr;
}
function bufferToArrayBuffer(buf) {
  const arr = new ArrayBuffer(buf.length);
  const view = new Uint8Array(arr);
  for (let i = 0; i < buf.length; ++i) {
    view[i] = buf[i];
  }
  return arr;
}
function bufferToArrayBuffer ( buf ) { const arr = new ArrayBuffer ( buf . length ) ; const view = new Uint8Array ( arr ) ; for ( let i = 0 ; i < buf . length ; ++ i ) { view [ i ] = buf [ i ] ; } return arr ; }
Buffer -> ArrayBuffer
@param {Buffer|Uint8Array} buf
@returns {ArrayBuffer}
Buffer - > ArrayBuffer