},
_getNoun : function _getNoun() {
- var index;
+ var index, noun;
index = Math.floor(Math.random()*this.nouns.length);
- return Promise.resolve(this.nouns[index]);
+ return Promise.resolve(this.nouns[index].toLowerCase());
},
_generateInsult : function _generateInsult(verb, noun) {
// Super dumb pluralizer
_pluralize : function _pluralize(noun) {
console.log(noun);
- if (["a","e,","i","o","u"].indexOf(noun[noun.length - 1]) >= 0) {
+ if (["a","e","i","o","u"].indexOf(noun[noun.length - 1]) >= 0) {
return noun + "s"
}