I'm seeing some weird behavior where my messages get output twice. For example, when trying to log out "Starting server" I instead see "Starting server 0 Starting server". Looks like messages.map(white) is the problem. It is the equivalent of writing messages.map((item, index, array) => white(item, index, array)) where instead we just want to be colorizing the item.
I'm seeing some weird behavior where my messages get output twice. For example, when trying to log out "Starting server" I instead see "Starting server 0 Starting server". Looks like
messages.map(white)
is the problem. It is the equivalent of writingmessages.map((item, index, array) => white(item, index, array))
where instead we just want to be colorizing the item.