Achal Dave
Achal Dave

Reputation: 4399

nodejs delete stdout line

You can delete individual characters using the process.stdout module, but how do you delete an entire line without having to print individual spaces?

Upvotes: 1

Views: 2404

Answers (1)

Achal Dave
Achal Dave

Reputation: 4399

Couldn't find this documented, but ended up finding it by running process.stdout.__proto__. There's a clearLine function:

process.stdout.clearLine()

Upvotes: 5

Related Questions