@gnoesiboe/run-concurrently
Version:
Command line tool to use 'concurrently' with a JSON configuration, to make it more readable and easier to manage.
19 lines (13 loc) • 444 B
JavaScript
const colors = ['yellow', 'blue', 'cyan', 'magenta', 'green', 'gray'];
function determineColorForIndex(index) {
const noOfColors = colors.length;
if (index < 0) {
return determineColorForIndex(Math.abs(index));
}
if (index >= noOfColors) {
return determineColorForIndex(index - noOfColors);
}
return colors[index];
}
exports.determineColorForIndex = determineColorForIndex;
exports.colors = colors;