()
| 94 | let colorIndex = 0; |
| 95 | |
| 96 | const start = () => { |
| 97 | timer = setInterval(() => { |
| 98 | process.stdout.write('\r'); |
| 99 | |
| 100 | const color = opts.colors![colorIndex % opts.colors!.length]; |
| 101 | process.stdout.write(chalk.hex(color)(text)); |
| 102 | |
| 103 | colorIndex++; |
| 104 | }, opts.interval!); |
| 105 | }; |
| 106 | |
| 107 | const stop = () => { |
| 108 | if (timer) { |