]> git.r.bdr.sh - rbdr/generador-de-insultos/commitdiff
Makes all nouns lowercase
authorBen Beltran <redacted>
Sun, 6 Sep 2015 01:21:15 +0000 (20:21 -0500)
committerBen Beltran <redacted>
Sun, 6 Sep 2015 01:21:15 +0000 (20:21 -0500)
lib/InsultGenerator.js

index 2d49dc1f4f44de592e77e08edf4a81f84e97cff4..7951204f503bf42d0cbea73420020411dee49802 100644 (file)
@@ -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) {