src/sentence_mgr.js
function feeling(mood) {
  const rnum = Math.floor(Math.random() * 10);
  const adjectives = wordLib.getWords(mood + "_feeling_adjs");
  //var degrees = getWords("neutral_degrees") + getWords(mood + "_degrees");
  const degrees = wordLib.getWords("neutral_degrees").concat(wordLib.getWords(mood + "_degrees"));

  const adj = nu.ingToEd(nu.chooseFrom(adjectives));
  const degree = nu.chooseFrom(degrees);
  let ending;
  if (mood === "good") {
    ending = wordLib.positiveIntensify();
  } else {
    ending = wordLib.consolation();
  }
  const exciting = (mood === "GOOD" && rnum <= 5);
  const are = nu.chooseFrom([" are", "'re"]);
  const sentence = `You${are} feeling ${degree} ${adj}${ending}`;
  return nu.sentenceCase(sentence, exciting);
}
function feeling(mood) {
  const rnum = Math.floor(Math.random() * 10);
  const adjectives = wordLib.getWords(mood + "_feeling_adjs");
  //var degrees = getWords("neutral_degrees") + getWords(mood + "_degrees");
  const degrees = wordLib.getWords("neutral_degrees").concat(wordLib.getWords(mood + "_degrees"));

  const adj = nu.ingToEd(nu.chooseFrom(adjectives));
  const degree = nu.chooseFrom(degrees);
  let ending;
  if (mood === "good") {
    ending = wordLib.positiveIntensify();
  } else {
    ending = wordLib.consolation();
  }
  const exciting = (mood === "GOOD" && rnum <= 5);
  const are = nu.chooseFrom([" are", "'re"]);
  const sentence = `You${are} feeling ${degree} ${adj}${ending}`;
  return nu.sentenceCase(sentence, exciting);
}
function feeling ( mood ) { const rnum = Math . floor ( Math . random ( ) * 10 ) ; const adjectives = wordLib . getWords ( mood + "_feeling_adjs" ) ; //var degrees = getWords("neutral_degrees") + getWords(mood + "_degrees"); const degrees = wordLib . getWords ( "neutral_degrees" ) . concat ( wordLib . getWords ( mood + "_degrees" ) ) ; const adj = nu . ingToEd ( nu . chooseFrom ( adjectives ) ) ; const degree = nu . chooseFrom ( degrees ) ; let ending ; if ( mood === "good" ) { ending = wordLib . positiveIntensify ( ) ; } else { ending = wordLib . consolation ( ) ; } const exciting = ( mood === "GOOD" && rnum <= 5 ) ; const are = nu . chooseFrom ( [ " are" , "'re" ] ) ; const sentence = ` ${ are } ${ degree } ${ adj } ${ ending } ` ; return nu . sentenceCase ( sentence , exciting ) ; }
A mood-based feeling
@param mood
@returns {*}
A mood - based feeling