Node.Js on windows - How to clear console

前端 未结 19 1487
迷失自我
迷失自我 2020-12-02 08:51

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

19条回答
  •  情深已故
    2020-12-02 09:15

    This clears the console on Windows and puts the cursor at 0,0:

    var util = require('util');
    util.print("\u001b[2J\u001b[0;0H");
    

    or

    process.stdout.write("\u001b[2J\u001b[0;0H");
    

提交回复
热议问题