bin/thumbd.js
function buildOpts (keys) {
  var opts = {}
  var pairs = _.pairs(keys)
  for (var i in pairs) {
    var argvKey = pairs[i][0]
    var envKey = argvKey.toUpperCase()
    var configKey = pairs[i][1]
    opts[configKey] = argv[argvKey] || config.get(configKey)
    if (opts[configKey] === null) {
      throw Error("The environment variable '" + envKey + "', or command line parameter '--" + argvKey + "' must be set.")
    }
  }
  return opts
}
function buildOpts (keys) {
  var opts = {}
  var pairs = _.pairs(keys)
  for (var i in pairs) {
    var argvKey = pairs[i][0]
    var envKey = argvKey.toUpperCase()
    var configKey = pairs[i][1]
    opts[configKey] = argv[argvKey] || config.get(configKey)
    if (opts[configKey] === null) {
      throw Error("The environment variable '" + envKey + "', or command line parameter '--" + argvKey + "' must be set.")
    }
  }
  return opts
}
function buildOpts ( keys ) { var opts = { } var pairs = _ . pairs ( keys ) for ( var i in pairs ) { var argvKey = pairs [ i ] [ 0 ] var envKey = argvKey . toUpperCase ( ) var configKey = pairs [ i ] [ 1 ] opts [ configKey ] = argv [ argvKey ] || config . get ( configKey ) if ( opts [ configKey ] === null ) { throw Error ( "The environment variable '" + envKey + "', or command line parameter '--" + argvKey + "' must be set." ) } } return opts }
Extract the command line parameters

@param object keys A mapping of cli option => config key names

@return object
Extract the command line parameters