lib/util/prompt-suggestion.js
function (question, defaultValue) {
  var choiceValues = _.map(question.choices, function (choice) {
    if (typeof choice === 'object') {
      return choice.value;
    } else {
      return choice;
    }
  });

  return choiceValues.indexOf(defaultValue);
}
function (question, defaultValue) {
  var choiceValues = _.map(question.choices, function (choice) {
    if (typeof choice === 'object') {
      return choice.value;
    } else {
      return choice;
    }
  });

  return choiceValues.indexOf(defaultValue);
}
function ( question , defaultValue ) { var choiceValues = _ . map ( question . choices , function ( choice ) { if ( typeof choice === 'object' ) { return choice . value ; } else { return choice ; } } ) ; return choiceValues . indexOf ( defaultValue ) ; }
Returns the default value for a list.

@param  {Object} question    Inquirer prompt item
@param  {*} defaultValue     The stored default value
@return {*}                  Default value to set
@private
Returns the default value for a list .