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.

12 lines (11 loc) 454 B
module['exports'] = function(colors) { var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta', 'brightYellow', 'brightRed', 'brightGreen', 'brightBlue', 'brightWhite', 'brightCyan', 'brightMagenta']; return function(letter, i, exploded) { return letter === ' ' ? letter : colors[ available[Math.round(Math.random() * (available.length - 2))] ](letter); }; };