Mon 21 Jul 22:43:21 CEST 2025
This commit is contained in:
parent
429f178e75
commit
7b5cbbc630
13
js/doc/maps/rainbow.js
Normal file
13
js/doc/maps/rainbow.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
var colors = Require('doc/colors');
|
||||||
|
|
||||||
|
module['exports'] = (function () {
|
||||||
|
var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV
|
||||||
|
return function (letter, i, exploded) {
|
||||||
|
if (letter === " ") {
|
||||||
|
return letter;
|
||||||
|
} else {
|
||||||
|
return colors[rainbowColors[i++ % rainbowColors.length]](letter);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user