index.js
function getCommand(argv) {
  let command = argv._[0] || 'help';

  // Allow shorthand "-v" for version
  if (argv.v) {
    command = 'version';
  }

  // Allow shorthand "-h" for help
  if (argv.h) {
    command = 'help';
  }

  return command;
}
function getCommand(argv) {
  let command = argv._[0] || 'help';

  // Allow shorthand "-v" for version
  if (argv.v) {
    command = 'version';
  }

  // Allow shorthand "-h" for help
  if (argv.h) {
    command = 'help';
  }

  return command;
}
function getCommand ( argv ) { let command = argv . _ [ 0 ] || 'help' ; // Allow shorthand "-v" for version if ( argv . v ) { command = 'version' ; } // Allow shorthand "-h" for help if ( argv . h ) { command = 'help' ; } return command ; }
Determines the correct command based on the argv param.
@param {Object} argv
Determines the correct command based on the argv param .