UNPKG

serverless-spy

Version:

CDK-based library for writing elegant integration tests on AWS serverless architecture and an additional web console to monitor events in real time.

13 lines (11 loc) 311 B
module['exports'] = function(colors) { // RoY G BiV var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; return function(letter, i, exploded) { if (letter === ' ') { return letter; } else { return colors[rainbowColors[i++ % rainbowColors.length]](letter); } }; };