UNPKG

lib-curses

Version:

Simple node.js library for work with console

13 lines (12 loc) 313 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.clearLine = clearLine; /** * Clears specified line in terminal. * * @param {number} y - Y coordinate of line to be cleared. * @returns {void} */ function clearLine(y) { process.stdout.write(`\x1b[${y + 1};0H\x1b[K`); }