clear terminal node js

JavaScript
process.stdout.write('\x1Bc'); 
Source

Also in JavaScript: