From: Ben Beltran Date: Sun, 6 Sep 2015 01:21:15 +0000 (-0500) Subject: Makes all nouns lowercase X-Git-Url: https://git.r.bdr.sh/rbdr/generador-de-insultos/commitdiff_plain/f66f0639a6b320722f4c5d2f294f133fb04bcd54?ds=sidebyside Makes all nouns lowercase --- diff --git a/lib/InsultGenerator.js b/lib/InsultGenerator.js index 2d49dc1..7951204 100644 --- a/lib/InsultGenerator.js +++ b/lib/InsultGenerator.js @@ -149,9 +149,9 @@ var InsultGenerator = Class({}, "InsultGenerator")({ }, _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) {