diff options
Diffstat (limited to 'vnfmarket/src/main/webapp/vnfmarket/node_modules/colors/lib/maps/rainbow.js')
-rw-r--r-- | vnfmarket/src/main/webapp/vnfmarket/node_modules/colors/lib/maps/rainbow.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/vnfmarket/src/main/webapp/vnfmarket/node_modules/colors/lib/maps/rainbow.js b/vnfmarket/src/main/webapp/vnfmarket/node_modules/colors/lib/maps/rainbow.js new file mode 100644 index 00000000..a7ce24e6 --- /dev/null +++ b/vnfmarket/src/main/webapp/vnfmarket/node_modules/colors/lib/maps/rainbow.js @@ -0,0 +1,13 @@ +var colors = require('../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); + } + }; +})(); + |