| 1 |
"use strict"; |
| 2 |
|
| 3 |
var clc = require("../"); |
| 4 |
|
| 5 |
console.log("Erasing screen .."); |
| 6 |
|
| 7 |
setTimeout(function () { |
| 8 |
process.stdout.write(clc.erase.screen); |
| 9 |
|
| 10 |
console.log("This a line of text that should not be cleared"); |
| 11 |
process.stdout.write("This line will be cleared but cursor will be here ->"); |
| 12 |
|
| 13 |
setTimeout(function () { |
| 14 |
process.stdout.write(clc.erase.line); |
| 15 |
process.stdout.write("\nMoving cursor backwards and deleting (from here): to the right"); |
| 16 |
|
| 17 |
setTimeout(function () { |
| 18 |
process.stdout.write(clc.move(-13, 0)); |
| 19 |
process.stdout.write(clc.erase.lineRight); |
| 20 |
}, 2000); |
| 21 |
}, 2000); |
| 22 |
}, 2000); |