code: function viewToBuffer(view) {
    const buf = Buffer.from(view.buffer);
  
    if (view.byteLength !== view.buffer.byteLength) {
      return buf.slice(view.byteOffset, view.byteOffset + view.byteLength);
    }
  
    return buf;
  }
docs: Converts an `ArrayBuffer` view into a buffer.
  
  @param {(DataView|TypedArray)} view The view to convert
  @return {Buffer} Converted view
  @private