diff options
Diffstat (limited to 'deps/npm/node_modules/colors/lib/maps/random.js')
-rw-r--r-- | deps/npm/node_modules/colors/lib/maps/random.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/deps/npm/node_modules/colors/lib/maps/random.js b/deps/npm/node_modules/colors/lib/maps/random.js index 88219dafeb3..5cd101fae2b 100644 --- a/deps/npm/node_modules/colors/lib/maps/random.js +++ b/deps/npm/node_modules/colors/lib/maps/random.js @@ -1,12 +1,8 @@ var colors = require('../colors'); -module['exports'] = (function() { - var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', - 'blue', 'white', 'cyan', 'magenta']; +module['exports'] = (function () { + var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta']; return function(letter, i, exploded) { - return letter === ' ' ? letter : - colors[ - available[Math.round(Math.random() * (available.length - 2))] - ](letter); + return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 1))]](letter); }; -})(); +})();
\ No newline at end of file |