Last change
on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
454 bytes
|
Line | |
---|
1 | module['exports'] = function(colors) {
|
---|
2 | var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green',
|
---|
3 | 'blue', 'white', 'cyan', 'magenta', 'brightYellow', 'brightRed',
|
---|
4 | 'brightGreen', 'brightBlue', 'brightWhite', 'brightCyan', 'brightMagenta'];
|
---|
5 | return function(letter, i, exploded) {
|
---|
6 | return letter === ' ' ? letter :
|
---|
7 | colors[
|
---|
8 | available[Math.round(Math.random() * (available.length - 2))]
|
---|
9 | ](letter);
|
---|
10 | };
|
---|
11 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.