projects
/
VSoRC
/
.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Websocket
[VSoRC/.git]
/
node_modules
/
node-static
/
node_modules
/
colors
/
lib
/
maps
/
rainbow.js
1
module['exports'] = function(colors) {
2
// RoY G BiV
3
var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta'];
4
return function(letter, i, exploded) {
5
if (letter === ' ') {
6
return letter;
7
} else {
8
return colors[rainbowColors[i++ % rainbowColors.length]](letter);
9
}
10
};
11
};
12