Being totally new into node.js environment and philosophy i would like answers to few questions. I had downloaded the node.js for windows installer and also node package man
Based on sanatgersappa's answer and some other info I found, here's what I've come up with:
function clear() {
var stdout = "";
if (process.platform.indexOf("win") != 0) {
stdout += "\033[2J";
} else {
var lines = process.stdout.getWindowSize()[1];
for (var i=0; i
To make things easier, I've released this as an npm package called cli-clear.