lib/helpers.js
function toBuffer (object) {
  if (Buffer.isBuffer(object)) return object
  if (object.buffer) return object.buffer
  throw new TypeError('Could not output buffer type.')
}
function toBuffer (object) {
  if (Buffer.isBuffer(object)) return object
  if (object.buffer) return object.buffer
  throw new TypeError('Could not output buffer type.')
}
function toBuffer ( object ) { if ( Buffer . isBuffer ( object ) ) return object if ( object . buffer ) return object . buffer throw new TypeError ( 'Could not output buffer type.' ) }
There is an inconsistency when accessing a record depending on the method, it may be either a native `Buffer` or BSON object wrapper. We only want native buffers.
There is an inconsistency when accessing a record depending on the method it may be either a native Buffer or BSON object wrapper . We only want native buffers .