Trying to clear the command prompt buffer on windows from node.js.
This is what i'm trying that's not working:
var exec = require('child_process').exec;
var child = exec('cls', function(err, stdout, stderr) {
if (err) throw err;
});
It still accumulates a scroll bar, which displeases me. It doesn't appear that CLS is ever really executed. If I replace cls with ls, it'll show a list of files though.
I use process.stdout.write('\u001B[2J\u001B[0;0f');
but not sure it is gonna help you. Let me know anyways.