perf: monochrome

This commit is contained in:
shanmite 2022-10-31 12:34:42 +08:00
parent 8e77afadc3
commit 92f700384e

View File

@ -213,10 +213,7 @@ const utils = {
* @returns
*/
rainbow(msg) {
const
colors = ['red', 'yellow', 'green', 'cyan', 'blue', 'magenta'],
colorsCount = colors.length;
this.proPrint(msg.map(it => it.split('').map((l, i) => chalk[colors[i % colorsCount]](l)).join('')), '\n')
this.proPrint(msg.map(it => it.split('').map(l => chalk.hex("#89cff0")(l)).join('')), '\n')
},
/**
* @param {number} done