index.js
function Mongootils(){
  if (arguments[0] && arguments[0].constructor && arguments[0].constructor.name === 'NativeConnection'){
    this.connection = arguments[0];
    this.uri        = this.getConnectionURI();
    this.options    = this.connection.options;
  } else {
    this.uri     = arguments[0];
    this.options = arguments[1];
  }

}
function Mongootils(){
  if (arguments[0] && arguments[0].constructor && arguments[0].constructor.name === 'NativeConnection'){
    this.connection = arguments[0];
    this.uri        = this.getConnectionURI();
    this.options    = this.connection.options;
  } else {
    this.uri     = arguments[0];
    this.options = arguments[1];
  }

}
@constructor

@param {string} uri     - Mongoose connection URI.
@param {object} options - Mongoose connection options.
@see http://mongoosejs.com/docs/connections.html