TIL: Clean Way of Resetting NodeJS Console

This issue has haunted me for over a week now. Just when I thought I’d figured out the answer, I found more problems with the solution. But I’ve finally stumbled across an answer that’s exactly what I wanted.

Found on this gist here, this is a relatively straight forward way of cleaning up the console completed and getting it ready for new writes. In my case, it’s the perfect way to clear it console between each write update when writing stats out.