lib/util/prompt-suggestion.js
function (question, answer) {
  var choiceValues = _.map(question.choices, 'value');
  var choiceIndex = choiceValues.indexOf(answer);

  // Check if answer is not equal to default value
  if (question.default !== choiceIndex) {
    return true;
  }

  return false;
}
function (question, answer) {
  var choiceValues = _.map(question.choices, 'value');
  var choiceIndex = choiceValues.indexOf(answer);

  // Check if answer is not equal to default value
  if (question.default !== choiceIndex) {
    return true;
  }

  return false;
}
function ( question , answer ) { var choiceValues = _ . map ( question . choices , 'value' ) ; var choiceIndex = choiceValues . indexOf ( answer ) ; // Check if answer is not equal to default value if ( question . default !== choiceIndex ) { return true ; } return false ; }
Return true if the answer should be store in
the global store, otherwise false.

@param  {Object}       question Inquirer prompt item
@param  {String|Array} answer   The inquirer answer
@return {Boolean}               Answer to be stored
@private
Return true if the answer should be store in the global store otherwise false .