node_modules/mongodb/lib/operations/mongo_client_ops.js
/**
 * Connect to MongoDB using a url as documented at
 *
 *  docs.mongodb.org/manual/reference/connection-string/
 *
 * Note that for replicasets the replicaSet query parameter is required in the 2.0 driver
 *
 * @method
 * @param {MongoClient} mongoClient The MongoClient instance with which to connect.
 * @param {MongoClient~connectCallback} [callback] The command result callback
 */
Connect to MongoDB using a url as documented at
docs.mongodb.org/manual/reference/connection-string

Note that for replicasets the replicaSet query parameter is required in the 2.0 driver

@method
@param {MongoClient} mongoClient The MongoClient instance with which to connect.
@param {MongoClient~connectCallback} [callback] The command result callback
Connect to MongoDB using a url as documented at docs . mongodb . org / manual / reference / connection - string Note that for replicasets the replicaSet query parameter is required in the 2 . 0 driver @method @param { MongoClient } mongoClient The MongoClient instance with which to connect . @param { MongoClient~connectCallback } [ callback ] The command result callback
function connectOp(mongoClient, err, callback) {
  if (err) return callback(err);
  connect(mongoClient, mongoClient.s.url, mongoClient.s.options, err => {
    if (err) return callback(err);
    callback(null, mongoClient);
  });
}
function connectOp ( mongoClient , err , callback ) { if ( err ) return callback ( err ) ; connect ( mongoClient , mongoClient . s . url , mongoClient . s . options , err => { if ( err ) return callback ( err ) ; callback ( null , mongoClient ) ; } ) ; }
Connect to MongoDB using a url as documented at
  docs.mongodb.org/manual/reference/connection-string
Connect to MongoDB using a url as documented at docs . mongodb . org / manual / reference / connection - string
// Did we have a validation error // Fallback to callback based connect