index.js
function applyOptionsToArgs(args, options) {
    var newArgs = cloneArgs(args);
    newArgs.host = options.hostname;
    newArgs.port = parseInt(options.port, 10);
    newArgs.db = parseInt(options.database, 10);
    newArgs.auth_pass = options.password;
    newArgs.password = options.password;
    if(options.query && options.query.ttl){
      newArgs.ttl = parseInt(options.query.ttl, 10);
    }
    return newArgs;
  }
function applyOptionsToArgs(args, options) {
    var newArgs = cloneArgs(args);
    newArgs.host = options.hostname;
    newArgs.port = parseInt(options.port, 10);
    newArgs.db = parseInt(options.database, 10);
    newArgs.auth_pass = options.password;
    newArgs.password = options.password;
    if(options.query && options.query.ttl){
      newArgs.ttl = parseInt(options.query.ttl, 10);
    }
    return newArgs;
  }
function applyOptionsToArgs ( args , options ) { var newArgs = cloneArgs ( args ) ; newArgs . host = options . hostname ; newArgs . port = parseInt ( options . port , 10 ) ; newArgs . db = parseInt ( options . database , 10 ) ; newArgs . auth_pass = options . password ; newArgs . password = options . password ; if ( options . query && options . query . ttl ) { newArgs . ttl = parseInt ( options . query . ttl , 10 ) ; } return newArgs ; }
Apply some options like hostname, port, db, ttl, auth_pass, password
from options to newArgs host, port, db, auth_pass, password and ttl and return clone of args
@param {Object} args
@param {Object} options
@returns {Object} clone of args param with properties set to those of options
Apply some options like hostname port db ttl auth_pass password from options to newArgs host port db auth_pass password and ttl and return clone of args