lib/utils.js
function maxWireVersion(topologyOrServer) {
  if (topologyOrServer.ismaster) {
    return topologyOrServer.ismaster.maxWireVersion;
  }

  if (topologyOrServer.description) {
    return topologyOrServer.description.maxWireVersion;
  }

  return null;
}
function maxWireVersion(topologyOrServer) {
  if (topologyOrServer.ismaster) {
    return topologyOrServer.ismaster.maxWireVersion;
  }

  if (topologyOrServer.description) {
    return topologyOrServer.description.maxWireVersion;
  }

  return null;
}
function maxWireVersion ( topologyOrServer ) { if ( topologyOrServer . ismaster ) { return topologyOrServer . ismaster . maxWireVersion ; } if ( topologyOrServer . description ) { return topologyOrServer . description . maxWireVersion ; } return null ; }
A helper function for determining `maxWireVersion` between legacy and new topology
instances

@private
@param {(Topology|Server)} topologyOrServer
A helper function for determining maxWireVersion between legacy and new topology instances